Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multi-code-point characters in TerminalInput::HandleKey #2853

Open
lhecker opened this issue Sep 23, 2019 · 1 comment
Open

Support multi-code-point characters in TerminalInput::HandleKey #2853

lhecker opened this issue Sep 23, 2019 · 1 comment
Labels
Area-Input Related to input processing (key presses, mouse, etc.) Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Product-Conhost For issues in the Console codebase Product-Terminal The new Windows Terminal.
Milestone

Comments

@lhecker
Copy link
Member

lhecker commented Sep 23, 2019

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 its KeyEvent parameter only accept a single code point though.

👉 TerminalInput and KeyEvent should be modified to accommodate multi-code-point characters (i.e. e.g. by replacing wchar_t with std::wstring).

@lhecker lhecker added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label Sep 23, 2019
@DHowett-MSFT DHowett-MSFT added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Area-Input Related to input processing (key presses, mouse, etc.) Product-Conhost For issues in the Console codebase Product-Terminal The new Windows Terminal. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Sep 23, 2019
@DHowett-MSFT
Copy link
Contributor

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 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Input Related to input processing (key presses, mouse, etc.) Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Product-Conhost For issues in the Console codebase Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests

3 participants