Skip to content

Commit 77fe101

Browse files
committed
Merge branch 'terminfo' of https://github.com/mrak/kitty
2 parents 63a921f + c344206 commit 77fe101

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

kitty/terminfo.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,20 @@ def encode_keystring(keybytes: bytes) -> str:
266266
'setrgbf': r'\E[38:2:%p1%d:%p2%d:%p3%dm',
267267
# Set RGB background color (non-standard used by neovim)
268268
'setrgbb': r'\E[48:2:%p1%d:%p2%d:%p3%dm',
269+
# DECSCUSR Set cursor style
270+
'Ss': r'\E[%p1%d\sq',
271+
# DECSCUSR Reset cursor style to power-on default
272+
'Se': r'\E[2\sq',
273+
# Set cursor color
274+
'Cs': r'\E]12;%p1%s\007',
275+
# Reset cursor color
276+
'Cr': r'\E]112\007',
277+
# Indicates support for styled and colored underlines (non-standard) as
278+
# described at:
279+
# https://github.com/kovidgoyal/kitty/blob/master/protocol-extensions.asciidoc
280+
# 'Setulc' is quivalent to the 'Su' boolean capability. Until
281+
# standardized, specify both for application compatibility.
282+
'Setulc': r'\E[58:2:%p1%{65536}%/%d:%p1%{256}%/%{255}%&%d:%p1%{255}%&%d%;m',
269283

270284
# The following entries are for compatibility with xterm,
271285
# and shell scripts using e.g. `tput u7` to emit a CPR escape
@@ -448,7 +462,7 @@ def encode_keystring(keybytes: bytes) -> str:
448462
queryable_capabilities.update(string_capabilities)
449463
extra = (bool_capabilities | numeric_capabilities.keys() | string_capabilities.keys()) - set(termcap_aliases.values())
450464
no_termcap_for = frozenset(
451-
'Su Smulx Sync Tc setrgbf setrgbb fullkbd kUP kDN kbeg kBEG'.split() + [
465+
'Cr Cs Se Ss Setulc Su Smulx Sync Tc setrgbf setrgbb fullkbd kUP kDN kbeg kBEG'.split() + [
452466
f'k{key}{mod}'
453467
for key in 'UP DN RIT LFT BEG END HOM IC DC PRV NXT'.split()
454468
for mod in range(3, 8)])

terminfo/kitty.terminfo

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@ xterm-kitty|KovIdTTY,
1616
it#8,
1717
lines#24,
1818
pairs#32767,
19+
Cr=\E]112\007,
20+
Cs=\E]12;%p1%s\007,
21+
Se=\E[2\sq,
22+
Setulc=\E[58:2:%p1%{65536}%/%d:%p1%{256}%/%{255}%&%d:%p1%{255}%&%d%;m,
1923
Smulx=\E[4:%p1%dm,
24+
Ss=\E[%p1%d\sq,
2025
Sync=\EP=%p1%ds\E\\,
2126
acsc=++\,\,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
2227
bel=^G,

terminfo/x/xterm-kitty

136 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)