You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I want to read a string from the user, I have to enable handlers for all the keys the user might press when entering a string. (I would also have a handler for the esc key -- it would abort reading the string, and a handler for the return key -- it would terminate the string and confirm.)
But which keys the user might press? That depends on the keyboard layout. So actually reading a string from the user is not so easy.
WIBNI Phoenix allowed me to read a key (any key) from the user, then look at the key and decide what to do next?
The text was updated successfully, but these errors were encountered:
I feel this starts to go out of scope for this app.
I could implement an event that would register all key presses, but those would not be exclusive. This would mean other apps might and would act on them as well. Not really useful.
You can implement this yourself by binding to all available keys in your local keyboard layout. Sure, it’s not a global solution across keyboard layouts. (We could have a setting to fix the keyboard layout.)
This starts to go outside of the intent of the app and I want to keep it clean.
A more suitable solution, which many are trying to mimic, would be to have a modal with an input. This way you could enter textual commands.
If I want to read a string from the user, I have to enable handlers for all the keys the user might press when entering a string. (I would also have a handler for the
esc
key -- it would abort reading the string, and a handler for thereturn
key -- it would terminate the string and confirm.)But which keys the user might press? That depends on the keyboard layout. So actually reading a string from the user is not so easy.
WIBNI Phoenix allowed me to read a key (any key) from the user, then look at the key and decide what to do next?
The text was updated successfully, but these errors were encountered: