Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Workaround for ambiguous values in Keypress Event?
Message
From
12/10/2001 07:25:56
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
11/10/2001 12:41:03
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00567078
Message ID:
00567477
Views:
20
>I use the Keypress Event to detect the keystrokes Shift-F2 through Shift-F7. Because these keys have identical values to the keys Shift-U through Shift-Z (85-90) I cannot tell the difference. The effect of this is that on some forms when the operator presses Shift-U (for example) nothing happens.
>
>Capslock and then "u" will result in a capital "U" however because the Keypress Event detects this as a non-shifted character.
>
>Is there a workaround that will reliably detect the difference between Shift-F2 and Shift-U, etc?
>
>TIA
>
>Peter Robinson

The third parameter of the KeyPress() method tells you whether Shift, Alt, or Ctrl is pressed. Perhaps you can use this.

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform