]> 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>
Sat, 17 Oct 2015 16:30:17 +0000 (17:30 +0100)
commitd4e5b0dd1c2fbdc49bc5196918a489972349dc93
tree40cf7fa29ae8d9d816b29c4e679e5c4a415464d7
parent3dfb9ac8851fda0599b32495099cb91c2bbf4a62
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.)

(cherry picked from commit 65f3500906c38ee3cf66cc75a015058e5bc6e56d)
windows/window.c