win32api.GetKeyboardState
string = GetKeyboardState()
Retrieves the status of the 256 virtual keys on the keyboard.
Win32 API References
Return Value
The return value is a string of exactly 256 characters. Each character represents the bitmask for a key - see the Win32 documentation for more details.