Keyboard handling

Harold Hunt huntharo@msu.edu
Thu Apr 5 09:16:00 GMT 2001


I need a volunteer with an AltGr equipped keyboard and Spy++ to tell me the
difference between a normal VK_CONTROL WM_KEYDOWN message and the VK_CONTROL
WM_KEYDOWN message that immediately preceeds an extended (right key) VK_MENU
message.

For comparison, on a US keyboard I get the following messages when I press
left control followed by right alt, then I release left control and finally
release right alt:
1) WM_KEYDOWN nVirtKey: VK_CONTROL ScanCode: 1D fExtended: 0 fAltDown: 0
2) WM_KEYDOWN nVirtKey: VK_MENU ScanCode: 38 fExtended: 1 fAltDown: 1
3) WM_SYSKEYUP nVirtKey: VK_CONTROL ScanCode: 1D fExtended: 0 fAltDown: 1
4) WM_KEYUP nVirtKey: VK_MENU ScanCode: 38 fExtended: 1 fAltDown: 0

Microsoft claims that pressing AltGr will generate the following sequence of
messages:
1) WM_KEYDOWN nVirtKey: VK_CONTROL ScanCode: ?? fExtended: ? fAltDown: ?
2) WM_KEYDOWN nVirtKey: VK_MENU ScanCode: ?? fExtended: ? fAltDown: ?
3) WM_KEYUP nVirtKey: VK_CONTROL ScanCode: ?? fExtended: ? fAltDown: ?
4) WM_SYSKEYUP nVirtKey: VK_MENU ScanCode: ?? fExtended: ? fAltDown: ?

I need someone to fill in the blanks on the sequence of messages that AltGr
is supposed to generate; specifically, I need to know the ScanCodes,
fExtended state, and fAltDown state.

I have recreated the keyboard handling using Alexander's technique, and the
only remaining key that I need to work on is AltGr.

Harold



More information about the Cygwin-xfree mailing list