Replies: 1 comment 1 reply
-
I don't see it as egui:s job to communicate all input events (be it keyboard, joystick etc) to the user, but only those events that are relevant to a UI. I strain to think of a situation where a user interface (e.g. a web app) needs to be able to figure out if "the button left of the enter key" was pressed, no matter what keyboard layout was used. I also don't think the scancode is even available on web backends. If you want low level control I suggest you use |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
Egui uses virtual keyboard key codes to translate keyboard events to egui events. If a keyboard has multiple layouts I can check input for A-Z keys but not for '[' key for example.
Let's consider this code:
It prints:
I can check key 'A' by 'key' value.
But if I switch keyboard layout and press '[':
Different output for different languages but I want my code to work the same way for any layout.
How can I get raw key code instead of egui::Event::Key?
Beta Was this translation helpful? Give feedback.
All reactions