diff --git a/kitty/terminfo.py b/kitty/terminfo.py index 56aa9cd4b..2fcefcca3 100644 --- a/kitty/terminfo.py +++ b/kitty/terminfo.py @@ -58,6 +58,8 @@ def encode_keystring(keybytes: bytes) -> str: # described at: # https://github.com/kovidgoyal/kitty/blob/master/protocol-extensions.asciidoc 'fullkbd', + # Terminal supports focus events: https://lists.gnu.org/archive/html/bug-ncurses/2023-10/msg00117.html + 'XF', # The following are entries that we don't use # # background color erase @@ -302,6 +304,10 @@ def encode_keystring(keybytes: bytes) -> str: # Focus In and Out events 'kxIN': r'\E[I', 'kxOUT': r'\E[O', + # Enable/disable focus reporting + # Add to ncurses in: https://lists.gnu.org/archive/html/bug-ncurses/2023-10/msg00117.html + 'fe': r'\E[?1004h', + 'fd': r'\E[?1004l', # The following are entries that we don't use # # turn on blank mode, (characters invisible) @@ -475,7 +481,7 @@ def encode_keystring(keybytes: bytes) -> str: 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 kxIN kxOUT 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 fe fd XF'.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 b3beda3eb..317451ec7 100644 --- a/terminfo/kitty.terminfo +++ b/terminfo/kitty.terminfo @@ -1,6 +1,7 @@ xterm-kitty|KovIdTTY, Su, Tc, + XF, am, ccc, fullkbd, @@ -59,6 +60,8 @@ xterm-kitty|KovIdTTY, ed=\E[J, el=\E[K, el1=\E[1K, + fd=\E[?1004l, + fe=\E[?1004h, flash=\E[?5h$<100/>\E[?5l, fsl=^G, home=\E[H, diff --git a/terminfo/x/xterm-kitty b/terminfo/x/xterm-kitty index c7e386b8e..d8eaab6e9 100644 Binary files a/terminfo/x/xterm-kitty and b/terminfo/x/xterm-kitty differ