key-binding: recognize virtual modifiers, and translate to the corresponding real modifier.

This commit is contained in:
Daniel Eklöf 2025-03-31 10:11:30 +02:00
parent 58910856c8
commit dc99cf7358
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 90 additions and 9 deletions

View file

@ -68,8 +68,9 @@
colors has not configured) is now done by linear RGB interpolation,
rather than converting to HSL and adjusting the luminance
([#2006][2006]).
* XKB: virtual modifiers are now ignored. This works around various
issues seen when running foot under mutter (GNOME) ([#2009][2009]):
* XKB: virtual modifiers in keyboard events from the compositor are
now ignored. This works around various issues seen when running foot
under mutter (GNOME) ([#2009][2009]):
- Some key combinations generating the wrong escape sequence in the
kitty keyboard protocol.
- some of foot's default shortcuts not working (mainly those using
@ -79,6 +80,10 @@
`NumLock`, `ScrollLock`, `LevelThree` or `LevelFive` modifiers,
you need to update them; i.e. remove the virtual modifier(s),
leaving only the real modifiers (`Mod1`, `Mod2` etc).**
* Virtual modifiers (e.g. `Alt` instead of `Mod1`, `Super` instead of
`Mod4` etc) in key bindings are now recognized as being virtual, and
are automatically mapped to the corresponding real modifier. This
means you can use e.g. `Alt+b` instead of `Mod1+b`.
[2006]: https://codeberg.org/dnkl/foot/issues/2006
[2009]: https://codeberg.org/dnkl/foot/issues/2009