Skip to content

Commit

Permalink
Add xterm terminfo entries for focus in/out events
Browse files Browse the repository at this point in the history
Again not in man terminfo.
  • Loading branch information
kovidgoyal committed Jul 4, 2023
1 parent ce65f11 commit 2fec9b3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion kitty/terminfo.py
Expand Up @@ -300,6 +300,9 @@ def encode_keystring(keybytes: bytes) -> str:
'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)
Expand Down Expand Up @@ -473,7 +476,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 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)])
Expand Down
2 changes: 2 additions & 0 deletions terminfo/kitty.terminfo

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified terminfo/x/xterm-kitty
Binary file not shown.

0 comments on commit 2fec9b3

Please sign in to comment.