-
-
Notifications
You must be signed in to change notification settings - Fork 327
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
use setRawButtonDown/UpEvent #619
base: master
Are you sure you want to change the base?
Conversation
using setButtonDownEvent and setButtonUpEvent with non-US keyboard layouts sends the identifier from the keymap, not the keycode, this leads to some keys not registering at all (e.g. the "`" key between the esc and tab keys, on my azerty keyboard "²", reports as <` -> none "²"> when printing Ursina.win.get_keyboard_map()`, resulting in no event being triggered) when using the Raw versions, the event gets triggered with the scancode and therefore correctly reports "`" to the input method since buttonHold (setButtonRepeatEvent) triggers from a repeated Keystroke, this is not relevant there (as it also does not have a raw version, and is not used for held_keys)
This breaks key combinations, like Shift+Q to trigger the exit_button. |
whoops, lemme see if I can fix that then (tbh, personally not a big fan of how the combo key flow is written, but that's just my opinion ofcourse) |
@pokepetter got some progress but running into one last bump when it comes to Considering the Thank you for considering this potential enhancement for keyboard input (and input rebinding) |
Using
setButtonDownEvent
andsetButtonUpEvent
with non-US keyboard layouts sends the identifier from the keymap, not the scancode, this leads to some keys not registering at all (e.g. the"`"
key between the esc and tab keys, on my azerty keyboard"²"
, reports as<` -> none "²">
when printingUrsina().win.get_keyboard_map()
, resulting in no event being triggered)When using the
Raw
versions, the event gets triggered with the scancode and therefore correctly reports`
to the input methodSince
setButtonRepeatEvent('buttonHold')
references a repeated Keystroke, this is not relevant there (it also does not have a raw version, and is not used forheld_keys
)