]> asedeno.scripts.mit.edu Git - PuTTY.git/commit
Handle the VK_PACKET virtual key code.
authorSimon Tatham <anakin@pobox.com>
Mon, 27 Jul 2015 19:06:02 +0000 (20:06 +0100)
committerSimon Tatham <anakin@pobox.com>
Mon, 27 Jul 2015 19:06:02 +0000 (20:06 +0100)
commit65f3500906c38ee3cf66cc75a015058e5bc6e56d
tree12d9bd2d27b35478b1861e325085e670d77b646b
parent67e5ceb9a8e6bc20fa0e0cf82ee9f89582e94112
Handle the VK_PACKET virtual key code.

This is generated in response to the SendInput() Windows API call, if
that in turn is passed an KEYBDINPUT structure with KEYEVENTF_UNICODE
set. That method of input generation is used by programs such as
'WinCompose' to send an arbitrary Unicode character as if it had been
typed at the keyboard, even if the keyboard doesn't actually provide a
key for it.

Like VK_PROCESSKEY, this key code is an exception to our usual policy
of manually translating keystrokes: we handle it by calling
TranslateMessage, to get back the Unicode character it contains as a
WM_CHAR message.

(If that Unicode character in turn is outside the BMP, it may come
back as a pair of WM_CHARs in succession containing UTF-16 surrogates;
if so, that's OK, because the new Unicode WM_CHAR handler can cope.)
windows/window.c