Open lhecker opened 5 years ago
This is good and righteous work that needs a design -- a lot of the key input stuff that comes through TerminalInput
is that way for compatibility with the ReadConsoleInput API. That API can only transit WCHARs :smile:
Description of the new feature/enhancement
Starting with #2836 key events containing combinations like Shift. (here: US keyboard layout) will be mapped to their matching, potentially non-ASCII, counterparts (here: >). This is achieved using the
ToUnicodeEx
method.But this leads to a problem:
ToUnicodeEx
can potentially return multiple code points.TerminalInput::HandleKey
and itsKeyEvent
parameter only accept a single code point though.👉
TerminalInput
andKeyEvent
should be modified to accommodate multi-code-point characters (i.e. e.g. by replacingwchar_t
withstd::wstring
).