Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using Hot Keys
Message
From
14/04/2004 18:31:30
 
 
To
14/04/2004 13:40:55
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00894863
Message ID:
00894966
Views:
7
>Does any one have a good way to add the use of "Hot Keys" without the "Hot Key" oversteping the natural function of a key. Example: F3 will put a generic note into an editbox with:
>
>If nkeycode = 86 Then
> note function
>EndIf
>
>But if the user needs to type in a cap "V" which is the same nKeyCode(86) the note will also appear without intension.

Check the nShiftAltCtrl state variable for the proper condition, too. F3 by itself is a -2, not an 86, that's a shifted F3.

So you should:
DO CASE 
  CASE nShiftAltCtrl=0 AND nKeyCode=-2   && F3
    *...
  CASE nShiftAltCtrl=1 AND nKeyCode=86   && Shift-F3
ENDDO
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Reply
Map
View

Click here to load this message in the networking platform