 |
GetKeyState ..msdn Add comment W32 Constants Translate this page |
 |
 |
|
The GetKeyState function retrieves the status of the specified virtual key. The status specifies whether the key is up, down, or toggled (on, offalternating each time the key is pressed). |
 |
 |
| Code examples: |
 |
|
|
 |
 |
| Declaration: |
 |
 |
SHORT GetKeyState(
int nVirtKey
);
|
 |
 |
 |
| FoxPro declaration: |
 |
 |
DECLARE INTEGER GetKeyState IN user32;
INTEGER vKey
|
 |
 |
 |
| Parameters: |
 |
nVirtKey
[in] Specifies a virtual key.
If the desired virtual key is a letter or digit (A through Z, a through z, or 0 through 9), nVirtKey must be set to the ASCII value of that character. For other keys, it must be a virtual-key code. |
 |
 |
| Return value: |
 |
| The return value specifies the status of the specified virtual key. |
 |
 |
| My comment: |
 |
The key status returned from this function changes as a thread reads key messages from its message queue. The status does not reflect the interrupt-level state associated with the hardware. Use the GetAsyncKeyState function to retrieve that information.
To retrieve state information for all the virtual keys, use the GetKeyboardState function. |
 |
 |
| Word Index links for the GetKeyState : |
 |
|
|
 |
 |
| Translate this page: |
 |
|
 |
 |
| |
 |
| Created: | 2004-07-15 09:21:59 | | Modified: | 2004-07-15 09:24:47 | Visited in last 7 days: 12 |