floating / frame

System-wide Web3 for macOS, Windows and Linux
https://frame.sh
GNU General Public License v3.0
1.09k stars 150 forks source link

Windows & Linux AltGr Fix #1538

Closed goosewobbler closed 1 year ago

goosewobbler commented 1 year ago

On Windows EN-US 101 key layout the right Alt key (AltGr on UK keyboards) works the same as the left Alt key. For EN-GB and all other layouts it registers as Control + Alt.

We can fix the above behaviour on non-US key layouts; when either the Alt or AltGr modifier is used:

This is also an issue on Linux, the solution there is to register the (undocumented) accelerator AltRight (instead of Control + Alt above)

The KeyboardLayoutMap can be used to determine if the EN-US layout is being used, as it is the only layout where Backslash maps to \.

https://www.w3.org/TR/uievents-code/#keyboard-101 Related Electron issue: https://github.com/electron/electron/issues/13895