From 801970aa332da5786f91d2f9410d4ed9f440c6ec Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Tue, 26 Jul 2022 18:44:29 +0200 Subject: input: kitty: always treat composed characters as ‘printable’ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Certain dead key combinations results different escape sequences in foot, compared to kitty, when the kitty keyboard protocol is used. if (composed && is_text) key = utf32; else { key = xkb_keysym_to_utf32(sym_to_use); if (key == 0) return false; /* The *shifted* key. May be the same as the unshifted * key - if so, this is filtered out below, when * emitting the CSI */ alternate = xkb_keysym_to_utf32(sym); } If is_text=false, we’ll fall through to the non-composed logic. is_text is set to true if the character is printable *and* there aren’t any non-consumed modifiers enabled. shift+space is one example where shift is *not* consumed (typically - may be layouts where it is). As a result, pressing ", followed by shift+space with the international english keyboard layout (where " is a dead key) results in different sequences in foot and kitty. This patch fixes this by always treating composed characters as printable. Closes #1120 --- input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'input.c') diff --git a/input.c b/input.c index d4598cf6..e0f21c6e 100644 --- a/input.c +++ b/input.c @@ -1239,7 +1239,7 @@ emit_escapes: ? ctx->level0_syms.syms[0] : sym; - if (composed && is_text) + if (composed) key = utf32; else { key = xkb_keysym_to_utf32(sym_to_use); -- cgit v1.3