When pressing, say, Ctrl+S when using locale different from English (say, russian), default browser behavior is triggered.
🥰 Expected Behavior
They handled properly
🤬 Actual Behavior
It's not handled at all
📝 Steps to Reproduce
Have a different layout
Press Ctrl+S
It doesn't work
📌 Environment
zer0bin version: The one that's on https://stepbro.voring.me
Your OS: Arch Linux
Your browser: Firefox
:notebook: Notes
In keydown even handler (or, more specifically, in KeyboardEvent), key property contains letter, corresponding to the current layout, which doesn't make any sense for keyboard shortcuts. In case of russian layout, pressing Ctrl+S would look like pressing Ctrl+Ы, and since there's no shortcut for that, event is not being cancelled and browser handles it instead. Possible fix would be to replace event.key with event.code and replace corresponding checks (e.key == "s" -> e.code == "KeyS")
💡 Summary
When pressing, say, Ctrl+S when using locale different from English (say, russian), default browser behavior is triggered.
🥰 Expected Behavior
They handled properly
🤬 Actual Behavior
It's not handled at all
📝 Steps to Reproduce
📌 Environment
zer0bin version: The one that's on https://stepbro.voring.me Your OS: Arch Linux Your browser: Firefox
:notebook: Notes
In
keydown
even handler (or, more specifically, inKeyboardEvent
),key
property contains letter, corresponding to the current layout, which doesn't make any sense for keyboard shortcuts. In case of russian layout, pressing Ctrl+S would look like pressing Ctrl+Ы, and since there's no shortcut for that, event is not being cancelled and browser handles it instead. Possible fix would be to replaceevent.key
withevent.code
and replace corresponding checks (e.key == "s"
->e.code == "KeyS"
)