Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Same codes for different keys
Message
From
08/11/2000 17:12:54
 
 
To
08/11/2000 11:17:12
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00439265
Message ID:
00439435
Views:
10
>Hi!
>
>I've encountered with following:
>Parameters Key1 and Key2 in the Keypress Event code have a similar values for different keys. For example, combinations Shift+F6 and Shift+Y have Key1=89 and Key2=1. How can I know what key has been pressed?

You can call the Win32 API function GetKeyboardState() which returns a char array that indicates the state of each key by scan code, including 'non-keystroke' keystrokes; it's listed in the API section here on UT.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform