each keystroke leads to the appearance of a window, and each key has a key code (with the exception of special function keys of some keys, such as those used by gaming keyboards).
overwrite wndproc and get these messages to trigger your events.
source share