This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch tymux-10-quiet-head
in repository terminology.
View the commit online.
commit 5aeef667dfcb0327a1924123932af0a4e2402000
Author: Boris Faure <[email protected]>
AuthorDate: Sat Nov 14 22:58:09 2026 +0000
keyin: report all keys as kitty escape codes
Implement the report-all-keys flag (8) of the kitty keyboard protocol:
every press, repeat and release is sent as an escape code, modifier
keys included:
https://sw.kovidgoyal.net/kitty/keyboard-protocol/#report-all-keys
The spec sets a modifier key's own bit in its mods field, so presses
now get it too, not only releases.
A lock key's release sends the lock bit its press sent. The event only
carries the lock state from before the key, and platforms apply a lock
change on press or on release: toggling on both would report Caps Lock
off on the release of the press that turned it on. The bits sent are
stored in the pressed-key table, which is emptied only once the release
is encoded.
A key with plain text but no code to report it by still sends its
text, rather than nothing.
The kitty-kbd-unsupported.sh checksum changes: the query now answers
15 (1|2|4|8).
---
src/bin/keyin.c | 91 +++++++++++---------------------------
src/bin/keyin.h | 14 ++++--
src/bin/keyin_encode.c | 74 +++++++++++++++++++++++++++++--
src/bin/termpty.c | 12 ++---
src/bin/termptyops.h | 2 +-
src/bin/tytest.c | 1 +
src/bin/tytest_keyin.c | 116 +++++++++++++++++++++++++++++++++++++++++++++++--
src/bin/unit_tests.h | 1 +
src/bin/win.c | 40 +++++++++--------
tests/tests.results | 2 +-
10 files changed, 252 insertions(+), 101 deletions(-)
diff --git a/src/bin/keyin.c b/src/bin/keyin.c
index e4047151..c8320cc4 100644
--- a/src/bin/keyin.c
+++ b/src/bin/keyin.c
@@ -63,85 +63,44 @@ _keyin_mods_get(const Evas_Modifier *modifiers, const Evas_Lock *locks)
return mods;
}
-/* The event's own modifier key, as the spec defines the mods field of a
- * modifier key event: set on press, cleared on release unless the other
- * side of the keyboard is still held. For the lock keys the new state
- * can only be read from the next event, so the bit is toggled. */
+/* Returns the mods sent */
static unsigned int
-_keyin_mods_with_modifier_key(unsigned int mods, const Keys_Handler *khdl,
- const char *key, Keyin_Action action)
-{
- static const struct {
- const char *left, *right;
- unsigned int mod;
- } modifiers[] = {
- { "Shift_L", "Shift_R", KEYIN_MOD_SHIFT },
- { "Control_L", "Control_R", KEYIN_MOD_CTRL },
- { "Alt_L", "Alt_R", KEYIN_MOD_ALT },
- { "Super_L", "Super_R", KEYIN_MOD_SUPER },
- { "Meta_L", "Meta_R", KEYIN_MOD_META },
- };
- unsigned int i, j;
-
- for (i = 0; i < sizeof(modifiers) / sizeof(modifiers[0]); i++)
- {
- const char *other_side = NULL;
-
- if (!strcmp(key, modifiers[i].left))
- other_side = modifiers[i].right;
- else if (!strcmp(key, modifiers[i].right))
- other_side = modifiers[i].left;
- if (!other_side)
- continue;
- if (action != KEYIN_ACTION_RELEASE)
- return mods | modifiers[i].mod;
- /* the released key is already out of the pressed table, so a hit
- * is the other side */
- for (j = 0; j < khdl->pressed_count; j++)
- if (khdl->pressed[j].key &&
- !strcmp(khdl->pressed[j].key, other_side))
- return mods;
- return mods & ~modifiers[i].mod;
- }
-
- if (!strcmp(key, "Caps_Lock"))
- return mods ^ KEYIN_MOD_CAPS_LOCK;
- if (!strcmp(key, "Num_Lock"))
- return mods ^ KEYIN_MOD_NUM_LOCK;
- return mods;
-}
-
-void
-keyin_handle_key_to_pty(Termpty *ty, const Evas_Event_Key_Down *ev,
- Keyin_Action action)
+_keyin_event_to_pty(Termpty *ty, const Keys_Handler *khdl,
+ const char *key, const char *keyname, const char *string,
+ const Evas_Modifier *modifiers, const Evas_Lock *locks,
+ Keyin_Action action)
{
Keyin_Event kev = {
- .key = ev->key,
- .keyname = ev->keyname,
- .string = ev->string,
- .mods = _keyin_mods_get(ev->modifiers, ev->locks),
+ .key = key,
+ .keyname = keyname,
+ .string = string,
+ .mods = _keyin_mods_get(modifiers, locks),
.action = ""
};
+ if (key_is_modifier(key))
+ kev.mods = keyin_mods_with_modifier_key(kev.mods, khdl, key, action);
keyin_encode_event(ty, &kev);
+ return kev.mods;
+}
+
+void
+keyin_handle_key_to_pty(Termpty *ty, Keys_Handler *khdl,
+ const Evas_Event_Key_Down *ev, Keyin_Action action)
+{
+ unsigned int mods;
+
+ mods = _keyin_event_to_pty(ty, khdl, ev->key, ev->keyname, ev->string,
+ ev->modifiers, ev->locks, action);
+ keyin_key_reported_set(khdl, ev->keycode, mods);
}
void
keyin_handle_key_up_to_pty(Termpty *ty, const Keys_Handler *khdl,
const Evas_Event_Key_Up *ev)
{
- Keyin_Event kev = {
- .key = ev->key,
- .keyname = ev->keyname,
- .string = ev->string,
- .mods = _keyin_mods_get(ev->modifiers, ev->locks),
- .action = ""
- };
-
- if (key_is_modifier(ev->key))
- kev.mods = _keyin_mods_with_modifier_key(kev.mods, khdl, ev->key,
- kev.action);
- keyin_encode_event(ty, &kev);
+ _keyin_event_to_pty(ty, khdl, ev->key, ev->keyname, ev->string,
+ ev->modifiers, ev->locks, KEYIN_ACTION_RELEASE);
}
static Key_Binding *
diff --git a/src/bin/keyin.h b/src/bin/keyin.h
index 96dec6b4..7b75ee7a 100644
--- a/src/bin/keyin.h
+++ b/src/bin/keyin.h
@@ -12,6 +12,7 @@ typedef struct tag_Keyin_Pressed_Key
{
unsigned int keycode;
const char *key; /* stringshare, for the modifier side check */
+ unsigned int locks; /* KEYIN_MOD_LOCKS bits sent with the press */
unsigned char reported : 1; /* the press reached keyin_encode_event() */
} Keyin_Pressed_Key;
@@ -26,14 +27,21 @@ struct tag_Keys_Handler
};
void
-keyin_handle_key_to_pty(Termpty *ty, const Evas_Event_Key_Down *ev,
- Keyin_Action action);
+keyin_handle_key_to_pty(Termpty *ty, Keys_Handler *khdl,
+ const Evas_Event_Key_Down *ev, Keyin_Action action);
void
keyin_handle_key_up_to_pty(Termpty *ty, const Keys_Handler *khdl,
const Evas_Event_Key_Up *ev);
+unsigned int
+keyin_mods_with_modifier_key(unsigned int mods, const Keys_Handler *khdl,
+ const char *key, Keyin_Action action);
Keyin_Action
keyin_key_down_track(Keys_Handler *khdl, const Evas_Event_Key_Down *ev);
-void keyin_key_reported_set(Keys_Handler *khdl, unsigned int keycode);
+void
+keyin_key_reported_set(Keys_Handler *khdl, unsigned int keycode,
+ unsigned int mods);
+Eina_Bool
+keyin_key_reported_get(const Keys_Handler *khdl, unsigned int keycode);
Eina_Bool
keyin_key_up_track(Keys_Handler *khdl, const Evas_Event_Key_Up *ev);
void keyin_pressed_reset(Keys_Handler *khdl);
diff --git a/src/bin/keyin_encode.c b/src/bin/keyin_encode.c
index 84410abe..5cef73a1 100644
--- a/src/bin/keyin_encode.c
+++ b/src/bin/keyin_encode.c
@@ -362,6 +362,59 @@ keyin_encode_event(Termpty *ty, const Keyin_Event *kev)
/* the spec reports a release only for a key whose press was reported */
+/* mods with the spec's bit for a modifier key's own press or release */
+unsigned int
+keyin_mods_with_modifier_key(unsigned int mods, const Keys_Handler *khdl,
+ const char *key, Keyin_Action action)
+{
+ static const struct {
+ const char *left, *right;
+ unsigned int mod;
+ } modifiers[] = {
+ { "Shift_L", "Shift_R", KEYIN_MOD_SHIFT },
+ { "Control_L", "Control_R", KEYIN_MOD_CTRL },
+ { "Alt_L", "Alt_R", KEYIN_MOD_ALT },
+ { "Super_L", "Super_R", KEYIN_MOD_SUPER },
+ { "Meta_L", "Meta_R", KEYIN_MOD_META },
+ };
+ unsigned int i, j, lock;
+
+ for (i = 0; i < sizeof(modifiers) / sizeof(modifiers[0]); i++)
+ {
+ const char *other_side = NULL;
+
+ if (!strcmp(key, modifiers[i].left))
+ other_side = modifiers[i].right;
+ else if (!strcmp(key, modifiers[i].right))
+ other_side = modifiers[i].left;
+ if (!other_side)
+ continue;
+ if (action != KEYIN_ACTION_RELEASE)
+ return mods | modifiers[i].mod;
+ for (j = 0; j < khdl->pressed_count; j++)
+ if (khdl->pressed[j].key &&
+ !strcmp(khdl->pressed[j].key, other_side))
+ return mods;
+ return mods & ~modifiers[i].mod;
+ }
+
+ if (!strcmp(key, "Caps_Lock"))
+ lock = KEYIN_MOD_CAPS_LOCK;
+ else if (!strcmp(key, "Num_Lock"))
+ lock = KEYIN_MOD_NUM_LOCK;
+ else
+ return mods;
+ /* a lock key's new state shows in the next event only: toggle it on
+ * press, and keep on release what the press sent, whenever the
+ * platform applies the change */
+ if (action != KEYIN_ACTION_RELEASE)
+ return mods ^ lock;
+ for (j = 0; j < khdl->pressed_count; j++)
+ if (khdl->pressed[j].key && !strcmp(khdl->pressed[j].key, key))
+ return (mods & ~lock) | (khdl->pressed[j].locks & lock);
+ return mods;
+}
+
static Keyin_Pressed_Key *
_pressed_key_get(Keys_Handler *khdl, unsigned int keycode)
{
@@ -387,17 +440,32 @@ keyin_key_down_track(Keys_Handler *khdl, const Evas_Event_Key_Down *ev)
pk = &khdl->pressed[khdl->pressed_count++];
pk->keycode = ev->keycode;
pk->key = eina_stringshare_add(ev->key);
+ pk->locks = 0;
pk->reported = 0;
return KEYIN_ACTION_PRESS;
}
void
-keyin_key_reported_set(Keys_Handler *khdl, unsigned int keycode)
+keyin_key_reported_set(Keys_Handler *khdl, unsigned int keycode,
+ unsigned int mods)
{
Keyin_Pressed_Key *pk = _pressed_key_get(khdl, keycode);
- if (pk)
- pk->reported = 1;
+ if (!pk)
+ return;
+ pk->reported = 1;
+ pk->locks = mods & KEYIN_MOD_LOCKS;
+}
+
+Eina_Bool
+keyin_key_reported_get(const Keys_Handler *khdl, unsigned int keycode)
+{
+ unsigned int i;
+
+ for (i = 0; i < khdl->pressed_count; i++)
+ if (khdl->pressed[i].keycode == keycode)
+ return khdl->pressed[i].reported;
+ return EINA_FALSE;
}
Eina_Bool
diff --git a/src/bin/termpty.c b/src/bin/termpty.c
index 815c083a..870aad52 100644
--- a/src/bin/termpty.c
+++ b/src/bin/termpty.c
@@ -3433,15 +3433,15 @@ tytest_kitty_kbd_query(void)
_ty_feed(&ty, "\x1b[?0u");
_ty_reply_is(&ty, "\x1b[?0u");
- /* only implemented flags are stored and answered: 15 is 1|2|4|8, the
- * report-all flag 8 is not implemented yet */
- _ty_feed(&ty, "\x1b[>15u"); /* push */
+ /* only implemented flags are stored and answered: 31 is 1|2|4|8|16,
+ * the report-text flag 16 is not implemented yet */
+ _ty_feed(&ty, "\x1b[>31u"); /* push */
_ty_feed(&ty, "\x1b[?u");
- _ty_reply_is(&ty, "\x1b[?7u");
+ _ty_reply_is(&ty, "\x1b[?15u");
_ty_feed(&ty, "\x1b[<u"); /* pop */
- _ty_feed(&ty, "\x1b[=15;1u"); /* set */
+ _ty_feed(&ty, "\x1b[=31;1u"); /* set */
_ty_feed(&ty, "\x1b[?u");
- _ty_reply_is(&ty, "\x1b[?7u");
+ _ty_reply_is(&ty, "\x1b[?15u");
_ty_feed(&ty, "\x1b[=0;1u"); /* set */
assert(ty.write_buffer.len == 0);
diff --git a/src/bin/termptyops.h b/src/bin/termptyops.h
index 79a34631..2381e290 100644
--- a/src/bin/termptyops.h
+++ b/src/bin/termptyops.h
@@ -39,7 +39,7 @@ void termpty_soft_reset_state(Termpty *ty);
/* kitty keyboard protocol: the flags implemented so far */
#define TERMPTY_KITTY_KBD_SUPPORTED \
(TERMPTY_KITTY_KBD_DISAMBIGUATE | TERMPTY_KITTY_KBD_REPORT_EVENTS | \
- TERMPTY_KITTY_KBD_REPORT_ALTERNATES)
+ TERMPTY_KITTY_KBD_REPORT_ALTERNATES | TERMPTY_KITTY_KBD_REPORT_ALL)
unsigned int termpty_kitty_kbd_flags_get(const Termpty *ty);
void termpty_kitty_kbd_set(Termpty *ty, unsigned int flags, int mode);
diff --git a/src/bin/tytest.c b/src/bin/tytest.c
index 6d48296b..e264fc92 100644
--- a/src/bin/tytest.c
+++ b/src/bin/tytest.c
@@ -110,6 +110,7 @@ static struct {
{ "keyin_kitty_disambiguate", tytest_keyin_kitty_disambiguate},
{ "keyin_kitty_alternates", tytest_keyin_kitty_alternates},
{ "keyin_kitty_events", tytest_keyin_kitty_events},
+ { "keyin_kitty_all_keys", tytest_keyin_kitty_all_keys},
{ "keyin_pressed", tytest_keyin_pressed},
{ "config_erase_is_del_upgrade", tytest_config_erase_is_del_upgrade},
{ "config_selection_read_upgrade", tytest_config_selection_read_upgrade},
diff --git a/src/bin/tytest_keyin.c b/src/bin/tytest_keyin.c
index 9d5bf8a3..dd02546f 100644
--- a/src/bin/tytest_keyin.c
+++ b/src/bin/tytest_keyin.c
@@ -420,15 +420,18 @@ typedef struct tag_Kitty_Case
#define R KEYIN_ACTION_REPEAT
#define U KEYIN_ACTION_RELEASE
+/* The handlers adjust the mods of a modifier key event through
+ * keyin_mods_with_modifier_key() before encoding; 'khdl' is the pressed
+ * table it reads, empty when there is none to drive. */
static int
-_kitty_case_is(const Kitty_Case *c)
+_kitty_case_adjusted_is(const Kitty_Case *c, const Keys_Handler *khdl)
{
struct ty_sb *sb = &_ty->write_buffer;
Keyin_Event kev = {
.key = c->key,
.keyname = c->keyname,
.string = c->string,
- .mods = c->mods,
+ .mods = keyin_mods_with_modifier_key(c->mods, khdl, c->key, c->action),
.action = ""
};
size_t expected_len = strlen(c->expected);
@@ -455,6 +458,14 @@ _kitty_case_is(const Kitty_Case *c)
return bad;
}
+static int
+_kitty_case_is(const Kitty_Case *c)
+{
+ static Keys_Handler no_pressed; /* zeroed: no keys held */
+
+ return _kitty_case_adjusted_is(c, &no_pressed);
+}
+
int
tytest_keyin_kitty_disambiguate(void)
{
@@ -659,6 +670,105 @@ tytest_keyin_kitty_events(void)
return bad;
}
+int
+tytest_keyin_kitty_all_keys(void)
+{
+ static const Kitty_Case cases[] = {
+ /* flags key keyname string mods action expected */
+ { 8, "a", "a", "a", 0, P, "\033[97u" },
+ { 8, "A", "a", "A", S, P, "\033[97;2u" },
+ { 8, "A", "a", "A", CL, P, "\033[97;65u" },
+ { 8, "Return", "Return", "\r", 0, P, "\033[13u" },
+ { 8, "Tab", "Tab", "\t", 0, P, "\033[9u" },
+ { 8, "BackSpace", "BackSpace", "\b", 0, P, "\033[127u" },
+ { 8, "Escape", "Escape", NULL, 0, P, "\033[27u" },
+ { 8, "KP_1", "KP_End", "1", NL, P, "\033[57400;129u" },
+ /* modifier keys are reported too, their own bit set on press */
+ { 8, "Shift_L", "Shift_L", NULL, 0, P, "\033[57441;2u" },
+ { 8, "Control_L", "Control_L", NULL, 0, P, "\033[57442;5u" },
+ /* without flag 2 a release is not reported */
+ { 8, "Shift_L", "Shift_L", NULL, S, U, "" },
+ { 10, "Shift_L", "Shift_L", NULL, S, U, "\033[57441;1:3u" },
+ { 10, "Return", "Return", NULL, 0, U, "\033[13;1:3u" },
+ /* a key with no code and text passes the text through */
+ { 8, "Keycode-200", "Keycode-200", "\303\273", 0, P, "\303\273" },
+ };
+ const Kitty_Case shift_r = { 10, "Shift_R", "Shift_R", NULL, S, U,
+ "\033[57447;2:3u" };
+ /* the event carries the lock state from before the key: Caps Lock is
+ * still shown on when the release that turns it off comes */
+ const Kitty_Case caps[] = {
+ { 10, "Caps_Lock", "Caps_Lock", NULL, 0, P, "\033[57358;65u" },
+ { 10, "Caps_Lock", "Caps_Lock", NULL, CL, U, "\033[57358;65:3u" },
+ { 10, "Caps_Lock", "Caps_Lock", NULL, CL, P, "\033[57358u" },
+ { 10, "Caps_Lock", "Caps_Lock", NULL, CL, U, "\033[57358;1:3u" },
+ };
+ Keys_Handler khdl;
+ Evas_Event_Key_Down down;
+ Evas_Event_Key_Up up;
+ char *saved_locale;
+ size_t i;
+ int bad = 0;
+
+ /* towlower() needs a UTF-8 locale; the real terminal gets one from
+ * elm_init(), the harness does not */
+ saved_locale = strdup(setlocale(LC_CTYPE, NULL));
+ assert(saved_locale);
+ if (!setlocale(LC_CTYPE, "C.UTF-8"))
+ {
+ fprintf(stderr, "\n no C.UTF-8 locale, skipping");
+ free(saved_locale);
+ return 0;
+ }
+
+ _init();
+ for (i = 0; i < sizeof(cases) / sizeof(cases[0]); i++)
+ bad += _kitty_case_is(&cases[i]);
+
+ /* Shift_R released while Shift_L is still held: the Shift bit survives
+ * through the pressed table */
+ memset(&khdl, 0, sizeof(khdl));
+ memset(&down, 0, sizeof(down));
+ down.key = "Shift_L";
+ down.keyname = "Shift_L";
+ down.keycode = 50;
+ assert(keyin_key_down_track(&khdl, &down) == KEYIN_ACTION_PRESS);
+ down.key = "Shift_R";
+ down.keyname = "Shift_R";
+ down.keycode = 62;
+ assert(keyin_key_down_track(&khdl, &down) == KEYIN_ACTION_PRESS);
+ memset(&up, 0, sizeof(up));
+ up.keycode = 62;
+ /* the presses were not reported, so the release is not either */
+ assert(keyin_key_up_track(&khdl, &up) == EINA_FALSE);
+ bad += _kitty_case_adjusted_is(&shift_r, &khdl);
+ keyin_pressed_reset(&khdl);
+
+ /* a lock key's release sends the lock bit its press sent */
+ down.key = "Caps_Lock";
+ down.keyname = "Caps_Lock";
+ down.keycode = 66;
+ up.keycode = 66;
+ for (i = 0; i < sizeof(caps) / sizeof(caps[0]); i += 2)
+ {
+ assert(keyin_key_down_track(&khdl, &down) == KEYIN_ACTION_PRESS);
+ bad += _kitty_case_adjusted_is(&caps[i], &khdl);
+ keyin_key_reported_set(&khdl, 66,
+ keyin_mods_with_modifier_key(caps[i].mods, &khdl,
+ "Caps_Lock", P));
+ bad += _kitty_case_adjusted_is(&caps[i + 1], &khdl);
+ assert(keyin_key_up_track(&khdl, &up) == EINA_TRUE);
+ }
+
+ _shutdown();
+ setlocale(LC_CTYPE, saved_locale);
+ free(saved_locale);
+
+ if (bad)
+ fprintf(stderr, "\n %d wrong encoding%s", bad, bad == 1 ? "" : "s");
+ return bad;
+}
+
#undef S
#undef A
#undef C
@@ -729,7 +839,7 @@ tytest_keyin_pressed(void)
/* the press was not reported, so no release */
assert(keyin_key_up_track(&khdl, &up) == EINA_FALSE);
assert(keyin_key_down_track(&khdl, &down) == KEYIN_ACTION_PRESS);
- keyin_key_reported_set(&khdl, 24);
+ keyin_key_reported_set(&khdl, 24, 0);
assert(keyin_key_up_track(&khdl, &up) == EINA_TRUE);
assert(keyin_key_up_track(&khdl, &up) == EINA_FALSE);
diff --git a/src/bin/unit_tests.h b/src/bin/unit_tests.h
index 2793b62f..38f2db60 100644
--- a/src/bin/unit_tests.h
+++ b/src/bin/unit_tests.h
@@ -111,6 +111,7 @@ int tytest_keyin_kitty_disambiguate(void);
int tytest_keyin_kitty_alternates(void);
int tytest_keyin_pressed(void);
int tytest_keyin_kitty_events(void);
+int tytest_keyin_kitty_all_keys(void);
int tytest_config_erase_is_del_upgrade(void);
int tytest_config_selection_read_upgrade(void);
int tytest_config_cursor_blink_timeout_upgrade(void);
diff --git a/src/bin/win.c b/src/bin/win.c
index 1e86d5ec..07e83ac9 100644
--- a/src/bin/win.c
+++ b/src/bin/win.c
@@ -1819,21 +1819,8 @@ _win_key_up_to_term(Term *term, Keys_Handler *khdl,
}
static void
-_cb_win_key_up(void *data,
- Evas *_e EINA_UNUSED,
- Evas_Object *_obj EINA_UNUSED,
- void *event)
+_win_key_up_to_terms(Win *wn, const Evas_Event_Key_Up *ev)
{
- Win *wn = data;
- Evas_Event_Key_Up *ev = event;
- Eina_Bool reported;
-
- DBG("GROUP key up (%p) (ctrl:%d)",
- wn, evas_key_modifier_is_set(ev->modifiers, "Control"));
- keyin_handle_up(&wn->khdl, ev);
- reported = keyin_key_up_track(&wn->khdl, ev);
- if (!reported || wn->on_popover || wn->cmdbox_up)
- return;
if (wn->group_input)
{
Eina_List *l;
@@ -1852,6 +1839,25 @@ _cb_win_key_up(void *data,
}
}
+static void
+_cb_win_key_up(void *data,
+ Evas *_e EINA_UNUSED,
+ Evas_Object *_obj EINA_UNUSED,
+ void *event)
+{
+ Win *wn = data;
+ Evas_Event_Key_Up *ev = event;
+
+ DBG("GROUP key up (%p) (ctrl:%d)",
+ wn, evas_key_modifier_is_set(ev->modifiers, "Control"));
+ keyin_handle_up(&wn->khdl, ev);
+ if (keyin_key_reported_get(&wn->khdl, ev->keycode) &&
+ !wn->on_popover && !wn->cmdbox_up)
+ _win_key_up_to_terms(wn, ev);
+ /* only now: the encoder reads the lock bits stored with the press */
+ keyin_key_up_track(&wn->khdl, ev);
+}
+
const char *
term_preedit_str_get(Term *term)
{
@@ -2193,8 +2199,7 @@ _cb_win_key_down(void *data,
if (ty && termpty_can_handle_key(ty, &wn->khdl, ev))
{
termpty_program_status_drop_unseen(ty);
- keyin_handle_key_to_pty(ty, ev, action);
- keyin_key_reported_set(&wn->khdl, ev->keycode);
+ keyin_handle_key_to_pty(ty, &wn->khdl, ev, action);
}
}
}
@@ -2205,8 +2210,7 @@ _cb_win_key_down(void *data,
if (ty && termpty_can_handle_key(ty, &wn->khdl, ev))
{
termpty_program_status_drop_unseen(ty);
- keyin_handle_key_to_pty(ty, ev, action);
- keyin_key_reported_set(&wn->khdl, ev->keycode);
+ keyin_handle_key_to_pty(ty, &wn->khdl, ev, action);
}
}
diff --git a/tests/tests.results b/tests/tests.results
index dd731c7d..52bda03b 100644
--- a/tests/tests.results
+++ b/tests/tests.results
@@ -246,5 +246,5 @@ kitty-kbd-query.sh 2aeecb0992989a62a9b4cf5ce687852f
kitty-kbd-stack.sh 1940619ffdbe765b2495edbce9cf22cc
kitty-kbd-altscreen.sh df9913f9d85f856c75dd525a806da4f6
kitty-kbd-reset.sh bd10ee95b6b71d150fbe1a11c7b6ac94
-kitty-kbd-unsupported.sh 37ed332e16676c21a2ccfe719760dfca
+kitty-kbd-unsupported.sh 3cf7cfe08b0d5fee7c38d0dc570f7c53
kitty-kbd-malformed.sh bd10ee95b6b71d150fbe1a11c7b6ac94
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.