void SetKeyboardState(lpKeyState)
This function copies the 256 bytes pointed to by the lpKeyState parameter into the Windows keyboard-state table.
Parameter | Type/Description |
lpKeyState | BYTE FAR * Points to an array of 256 bytes that contains keyboard key states. |
None.
In many cases, an application should call the GetKeyboardState function first to initialize the 256-byte array. The application should then change the desired bytes.
SetKeyboardState sets the LEDs and BIOS flags for the NUMLOCK, CAPSLOCK, and SCROLL LOCK keys according to the toggle state of the VK_NUMLOCK, VK_CAPITAL, and VK_OEM_SCROLL entries of the array.
For more information, see the description of GetKeyboardState, earlier in this chapter.