Get/Change key states for NumLock, CapsLock and ScrollLock
Get the status of one of this keys with GetKeyState:
VK_ codes for this key types:
We can also obtain all keyboard status, and later, look for the state of the keys, with GetKeyboardState:
Finally, we can to set this states with SetKeyboardState:
NOTE: Something has changed since Delphi3 and Windows 98, and this code doesn't work...
Other method for all kind of Windows:
Consists in simulate the key press, for change its state.
Updated at 06/02/2004 Second Method