terminal/src/cascadia
Leonard Hecker b617c434a1
Fix #7064: Ignore key events without scan code (#7145)
Up until #4999 we deferred all key events to the character event handler
for which `ToUnicodeEx` returned a valid character and alternatively
those who aren't a special key combination as listed in
`TerminalInput`'s implementation.

Since #4999 we started acknowledging/handling all key events no matter
whether they're actually a known key combination. Given non-ASCII inputs
the Win32 `SendInput()` method generates certain sequences that aren't
recognizable combinations though and if they're handled by the key event
handler no follow up character event is sent containing the unicode
character.

This PR adds another condition and defers all key events without scan
code (i.e. those not representable by the current keyboard layout) to
the character event handler.

I'm absolutely not certain that this PR doesn't have a negative effect
on other kinds of inputs.

Is it common for key events to not contain a scan code? I personally
haven't seen it happen before AutoHotKey/SendInput.

Before this PR is merged it'd be nice to have a good testing plan in
place in order to ensure nothing breaks.

## Validation Steps Performed

Remapped `AltGr+8` to `»` using AutoHotKey using `<^>!8::SendInput {Raw}»`.
Ensured `»` is printed if `AltGr+8` is pressed.

Closes #7064
Closes #7120
2020-08-06 01:03:58 +00:00
..
CascadiaPackage Build and ship an actual binary named wt that just launches WT (#6860) 2020-07-10 22:41:37 +00:00
inc Add support for the Command Palette (#6635) 2020-06-26 20:38:02 +00:00
LocalTests_TerminalApp Move TerminalSettings object to TermApp Project (#7163) 2020-08-03 22:54:22 +00:00
PublicTerminalCore wpf: fixup mouse wheel events from screen coords (#7168) 2020-08-04 17:38:34 +00:00
ShellExtension Make the Shell Extension methods STDMETHODIMP (#6238) 2020-05-28 14:09:52 -07:00
TerminalApp Move TerminalSettings object to TermApp Project (#7163) 2020-08-03 22:54:22 +00:00
TerminalAzBridge Fix the build in VS 2019 16.7 (#6838) 2020-07-09 04:10:50 +00:00
TerminalConnection Replace old C headers (xxx.h) with modern ones (cxxx) (#5080) 2020-07-01 11:00:24 -07:00
TerminalControl Move TerminalSettings object to TermApp Project (#7163) 2020-08-03 22:54:22 +00:00
TerminalCore Fix #7064: Ignore key events without scan code (#7145) 2020-08-06 01:03:58 +00:00
TerminalSettings Move TerminalSettings object to TermApp Project (#7163) 2020-08-03 22:54:22 +00:00
UnitTests_TerminalCore Fix #7064: Ignore key events without scan code (#7145) 2020-08-06 01:03:58 +00:00
ut_app Convert most of our JSON deserializers to use type-based conversion (#6590) 2020-07-17 01:31:09 +00:00
WindowsTerminal Add support for running a wt commandline in the curent window WITH A KEYBINDING (#6537) 2020-07-17 21:05:29 +00:00
WindowsTerminalUniversal Fix the build in VS 2019 16.7 (#6838) 2020-07-09 04:10:50 +00:00
WinRTUtils Add support for the Command Palette (#6635) 2020-06-26 20:38:02 +00:00
WpfTerminalControl Send ENHANCED_KEY in Win32 input mode in the wpf/uwp controls (#7106) 2020-07-31 17:16:27 +00:00
WpfTerminalTestNetCore/WpfTerminalTestNetCore Fix 3 different bugs in the WPF control (#6464) 2020-06-11 18:05:43 +00:00
wt Build and ship an actual binary named wt that just launches WT (#6860) 2020-07-10 22:41:37 +00:00
CascadiaResources.build.items Add a new appxmanifest for preview (#5774) 2020-05-07 16:00:56 +00:00