A way to read (from a console) a mix of “bindable keypresses” and Unicode? #489

Open
opened 2026-01-30 21:53:35 +00:00 by claunia · 0 comments
Owner

Originally created by @ilyaza on GitHub (Dec 17, 2018).

[Given a dearth of documentation on robust handling of user character input on Windows, I do not know whether this is a feature request, or not. So I post it here.]

As far as I understand, there is no way for a console application to process a mix of input of “accelerators” keypresses (such as Ctrl-Shift-= etc) and of Unicode characters. The major stumbling block is the recognition of dead keys: the application cannot tell a dead key from an “accelerator”.

(Using the undocumented flag of ToUnicodeEx(), one could do it if one knew the current “input locale” — but I see no way to find the input locale due to the console wrapper running with very high elevation…)

Question 1: is the analysis above valid? Or maybe there is some clever trick to circumvent this?

Question 2: is there going to be changes in this regard, so that applications can recognize dead keys

Question 3: A way to see changes of the “input locale” would be also beneficial!

Originally created by @ilyaza on GitHub (Dec 17, 2018). [Given a dearth of documentation on robust handling of user character input on Windows, I do not know whether this is a feature request, or not. So I post it here.] As far as I understand, there is no way for a console application to process a mix of input of “accelerators” keypresses (such as <kbd>Ctrl</kbd>-<kbd>Shift</kbd>-<kbd>=</kbd> etc) and of Unicode characters. The major stumbling block is the recognition of dead keys: the application cannot tell a dead key from an “accelerator”. (Using the undocumented flag of `ToUnicodeEx()`, one could do it if one knew the current “input locale” — but I see no way to find the input locale due to the console wrapper running with very high elevation…) Question 1: is the analysis above valid? Or maybe there is some clever trick to circumvent this? Question 2: is there going to be changes in this regard, so that applications can recognize dead keys Question 3: A way to see changes of the “input locale” would be also beneficial!
claunia added the Product-ConhostIssue-QuestionArea-Input labels 2026-01-30 21:53:35 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#489