kitty kbd: switch from GTK to XKB mode for 'consumed' modifiers

This fixes an issue where some key combinations resulted in different
output (e.g. escape code vs. plain text) depending on the state of
e.g. the NumLock key. One such example is Shift+space. Another example
is Shift+BackSpace.

This patch also removes the hardcoded CapsLock filter, when
determining whether a key combo produces text or not, and instead uses
the locked modifiers as reported by XKB.
This commit is contained in:
Daniel Eklöf 2024-02-29 09:32:38 +01:00
parent d3b348a5b1
commit ec73e4d10d
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 15 additions and 14 deletions

View file

@ -91,6 +91,13 @@
* Use XRGB pixel format (instead of ARGB) when there is no
transparency.
* Prefer CSS xcursor names, and fallback to legacy X11 names.
* Kitty keyboard protocol: use the `XKB` mode when retrieving locked
modifiers, instead of the `GTK` mode. This fixes an issue where some
key combinations (e.g. Shift+space) produces different results
depending on the state of e.g. the NumLock key.
* Kitty keyboard protocol: filter out **all** locked modifiers (as
reported by XKB), rather than hardcoding it to CapsLock only, when
determining whether a key combination produces text or not.
[1526]: https://codeberg.org/dnkl/foot/issues/1526
[1528]: https://codeberg.org/dnkl/foot/issues/1528