





















































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!






















































getch();
Keyboard Input
Keyboard Input
vs
Keyboard Messages
Combinations of keys with ALT
generate WM_SYSKEYDOWN
Keyboard Messages
WM_KEYDOWN
WM_KEYDOWN
WM_KEYUP
WM_KEYUP
Initial State
(Shift Pressed)
(W Pressed)
(W Released)
(Shift Released)
Keystroke Messages Format WM_KEYDOWN WM_KEYUP WM_SYSKEYDOWN WM_SYSKEYUP
wParam: Virtual-key code
lParam: Additional message information
WINUSER.H identifier
wParam Keyboard key
91 92 93
VK_LWIN VK_RWIN VK_APPS
Left Windows key Right Windows key Application key
lParam of WM_KEYDOWN
Bits
0 - 15 16 - 23 24
Repeat count Scan code 1, if an Extended Key 0, otherwise
Extended Keys were not part of the standard IBM keyboard. These appeared on IBM 101- and 102-keys Enhanced Keyboards later.
WM_KEYDOWN
WM_KEYDOWN
WM_KEYUP
WM_KEYUP
Initial State
(Ctrl Pressed)
(F Pressed)
(F Released)
(Ctrl Released)
SHORT GetKeyState(
int nVirtKey virtual-key code
);