-
-
Notifications
You must be signed in to change notification settings - Fork 137
Text input yields Key::Unknown on windows_term using alt #102
Description
This relates to: console-rs/dialoguer#116
Dialoguer listens to Key::Unknown events to cancel the UserInput[1]. This works fine on Linux. On Windows however, windows_term generates Key::Unknown events for special characters.
On my English keyboard layout I can use the ¿ (alt+/) character to create these events. This results in the whole text_input crashing for dialoguer.
Originally I planned on just adding Key::Alt to the list. However winapi also seems to identify the key wrong (the events comes in as 0x12) which would reference the menu key[2]. Which should be incorrect.
I could map the events to Key::Composite just to mark that a key composition event is taking place or use Key::Alt and comment the location to add a fix if/when winapi is fixed/changed.