@@ -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:
448462queryable_capabilities .update (string_capabilities )
449463extra = (bool_capabilities | numeric_capabilities .keys () | string_capabilities .keys ()) - set (termcap_aliases .values ())
450464no_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 )])
0 commit comments