Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Win 2 API - <b>getkeyboardstate</b> get status of all 256 virtual keys http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
GetKeyboardState     Get Status of All 256 Virtual Keys

void GetKeyboardState(lpKeyState)
LPSTR lpKeyState; /* 256 byte buffer */


Returns:        256 bytes in the following format, one for each virtual
                key.

                 msb                                lsb
                +------------------   ------------------+
                |    |          Undefined          |    |
                +------------------   ------------------+
                  |                                  |
                +-------------+     +--------------------------------+
                | 1 = Key Down|     |1 = Pressed odd number of times |
                | 0 = Key Up  |     |0 = Pressed odd number of times |
                +-------------+     +--------------------------------+

See Also: GetAsyncKeyState SetKeyboardState

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson