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
I am not a native user of a keyboard layout that has AltGr so forgive my ignorance. AltGr is a special key in the browser that registers two key events for CtrlLeft and AltRight. It is used to get to the symbols under the numbers that English users would normally use Shift for. !@#$%^&*()
This is especially painful if you want to bind Ctrl + Alt + [0-9] which works great work on English layouts but completely clobbers users with AltGr.
Many ways to implement in keymaster: A new mode like key.noAltgr() wouldn't fire events if we suspected the AltGr key to be pushed. Could be an extra string bit to add onto the hooks ctrl+alt+1-altgr, note the -altgr. Or could be a new option to key.filter(e, isAltgr)
This wouldn't be bullet proof as the only way I know how to detect AltGr is looking at the location property on the KeyboardEvent for the Ctrl and Alt keys; which doesn't account for someone actually pressing the left control and right alt (seems like a odd use case vs obliterating the whole userbase with AltGr though)
AltGr fires the following events:
Ctrl: { code: 'ControlLeft', location: 1, ... }
Alt: { code: 'AltRight', location: 2, ... }
As a note, we saw this mainly with AZERTY and Swedish layouts which have the AltGr key.
The text was updated successfully, but these errors were encountered:
I am not a native user of a keyboard layout that has
AltGr
so forgive my ignorance.AltGr
is a special key in the browser that registers two key events forCtrlLeft
andAltRight
. It is used to get to the symbols under the numbers that English users would normally useShift
for.!@#$%^&*()
This is especially painful if you want to bind
Ctrl + Alt + [0-9]
which works great work on English layouts but completely clobbers users withAltGr
.Many ways to implement in keymaster: A new mode like
key.noAltgr()
wouldn't fire events if we suspected theAltGr
key to be pushed. Could be an extra string bit to add onto the hooksctrl+alt+1-altgr
, note the-altgr
. Or could be a new option tokey.filter(e, isAltgr)
This wouldn't be bullet proof as the only way I know how to detect
AltGr
is looking at thelocation
property on theKeyboardEvent
for theCtrl
andAlt
keys; which doesn't account for someone actually pressing the left control and right alt (seems like a odd use case vs obliterating the whole userbase withAltGr
though)AltGr
fires the following events:Ctrl
:{ code: 'ControlLeft', location: 1, ... }
Alt
:{ code: 'AltRight', location: 2, ... }
As a note, we saw this mainly with AZERTY and Swedish layouts which have the
AltGr
key.The text was updated successfully, but these errors were encountered: