From 2fec9b372bfcbbf457221514bde5ff4264201305 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 4 Jul 2023 20:48:12 +0530 Subject: [PATCH] Add xterm terminfo entries for focus in/out events Again not in man terminfo. --- kitty/terminfo.py | 5 ++++- terminfo/kitty.terminfo | 2 ++ terminfo/x/xterm-kitty | Bin 3647 -> 3674 bytes 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/kitty/terminfo.py b/kitty/terminfo.py index 9b5064917..d9523b7bf 100644 --- a/kitty/terminfo.py +++ b/kitty/terminfo.py @@ -300,6 +300,9 @@ string_capabilities = { 'Ms': r'\E]52;%p1%s;%p2%s\E\\', # Send device attributes (report version) 'RV': r'\E[>c', + # Focus In and Out events + 'kxIN': r'\E[I', + 'kxOUT': r'\E[O', # The following are entries that we don't use # # turn on blank mode, (characters invisible) @@ -473,7 +476,7 @@ queryable_capabilities = cast(Dict[str, str], numeric_capabilities.copy()) queryable_capabilities.update(string_capabilities) extra = (bool_capabilities | numeric_capabilities.keys() | string_capabilities.keys()) - set(termcap_aliases.values()) no_termcap_for = frozenset( - 'XR Ms RV Cr Cs Se Ss Setulc Su Smulx Sync Tc PS PE BE BD setrgbf setrgbb fullkbd kUP kDN kbeg kBEG'.split() + [ + 'XR Ms RV kxIN kxOUT Cr Cs Se Ss Setulc Su Smulx Sync Tc PS PE BE BD setrgbf setrgbb fullkbd kUP kDN kbeg kBEG'.split() + [ f'k{key}{mod}' for key in 'UP DN RIT LFT BEG END HOM IC DC PRV NXT'.split() for mod in range(3, 8)]) diff --git a/terminfo/kitty.terminfo b/terminfo/kitty.terminfo index 4f7b5ef92..b3beda3eb 100644 --- a/terminfo/kitty.terminfo +++ b/terminfo/kitty.terminfo @@ -222,6 +222,8 @@ xterm-kitty|KovIdTTY, kpp=\E[5~, kri=\E[1;2A, kund=, + kxIN=\E[I, + kxOUT=\E[O, oc=\E]104\007, op=\E[39;49m, rc=\E8, diff --git a/terminfo/x/xterm-kitty b/terminfo/x/xterm-kitty index 0ad6180865552ee729a021bbbbcfa1531c213ce6..c7e386b8e8ced3e885eaf15a4d2b3cb56bdd27f2 100644 GIT binary patch delta 93 zcmdllb4zB!GY(c?hPey|lV5X8<@99oWeR4>Won