aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md4
-rw-r--r--input.c17
2 files changed, 18 insertions, 3 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index bbe24067..1eb95c14 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -79,8 +79,12 @@
support ([#1865][1865]).
* Run-time changes to the window title, and the app ID now require the
new value to consist of printable characters only.
+* Kitty keyboard protocol: Enter, Tab and Backspace no longer report
+ _release_ events unless _"Report all keys as escape codes"_ is
+ enabled ([#1892][1892]).
[1865]: https://codeberg.org/dnkl/foot/issues/1865
+[1892]: https://codeberg.org/dnkl/foot/issues/1892
### Deprecated
diff --git a/input.c b/input.c
index 201f5c69..51425a36 100644
--- a/input.c
+++ b/input.c
@@ -1236,9 +1236,20 @@ kitty_kbd_protocol(struct seat *seat, struct terminal *term,
if ((mods & ~locked & ~consumed) == 0) {
switch (sym) {
- case XKB_KEY_Return: term_to_slave(term, "\r", 1); return true;
- case XKB_KEY_BackSpace: term_to_slave(term, "\x7f", 1); return true;
- case XKB_KEY_Tab: term_to_slave(term, "\t", 1); return true;
+ case XKB_KEY_Return:
+ if (!released)
+ term_to_slave(term, "\r", 1);
+ return true;
+
+ case XKB_KEY_BackSpace:
+ if (!released)
+ term_to_slave(term, "\x7f", 1);
+ return true;
+
+ case XKB_KEY_Tab:
+ if (!released)
+ term_to_slave(term, "\t", 1);
+ return true;
}
}