 |
SetKeyboardState ..msdn Add comment W32 Constants Translate this page |
 |
 |
|
The SetKeyboardState function copies a 256-byte array of keyboard key states into the calling thread"s keyboard input-state table. |
 |
 |
| Code examples: |
 |
|
|
 |
 |
| Declaration: |
 |
 |
BOOL SetKeyboardState(
LPBYTE lpKeyState
);
|
 |
 |
 |
| FoxPro declaration: |
 |
 |
DECLARE INTEGER SetKeyboardState IN user32;
STRING @ lpKeyState
|
 |
 |
 |
| Parameters: |
 |
lpKeyState
[in] Pointer to a 256-byte array that contains keyboard key states. |
 |
 |
| Return value: |
 |
| If the function succeeds, the return value is nonzero. |
 |
 |
| My comment: |
 |
This is the same table accessed by the GetKeyboardState and GetKeyState functions. Changes made to this table do not affect keyboard input to any other thread.
Because the SetKeyboardState function alters the input state of the calling thread and not the global input state of the system, an application cannot use SetKeyboardState to set the NUM LOCK, CAPS LOCK, or SCROLL LOCK (or the Japanese KANA) indicator lights on the keyboard. These can be set or cleared using SendInput to simulate keystrokes. |
 |
 |
| Word Index links for the SetKeyboardState : |
 |
|
|
 |
 |
| Translate this page: |
 |
|
 |
 |
| • |
 |
| Created: | 2004-07-15 09:24:59 | | Modified: | 2004-07-15 09:27:19 | Visited in last 7 days: 37 |