Keyboard Messages
Windows also notifies an application about keypresses by sending messages. Table 9.2 lists the most common messages.
Message | Meaning |
---|---|
WM_CHAR | The ASCII code for the letter if a character was pressed |
WM_KEYDOWN | Notification that a key has been depressed |
WM_KEYUP | Notification that a key has been released |
WM_SYSCHAR | The ASCII code for the letter pressed while the Alt key is pressed |
WM_SYSKEYDOWN | Notification that a key has been depressed while the Alt key is pressed |
WM_SYSKEYUP | Notification that a key has been released while the Alt key is pressed |
The WM_CHAR message is generated by the TranslateMessage function in the message loop of the thread. This function is discussed in Chapter 5, "Message ...
Get Microsoft Windows 2000 API SuperBible now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.