Add the BEGIN key to terminfo

Fixes #4101
This commit is contained in:
Kovid Goyal 2021-10-07 13:15:06 +05:30
parent fbf47f75d5
commit 5841776c65
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
3 changed files with 12 additions and 5 deletions

View File

@ -297,9 +297,9 @@ string_capabilities.update({
name.format(unmod=unmod, key=key):
encode_keystring(modify_key_bytes(b'\033' + value, mod))
for unmod, key, value in zip(
'cuu1 cud1 cuf1 cub1 end home ich1 dch1 pp np'.split(),
'UP DN RIT LFT END HOM IC DC PRV NXT'.split(),
b'OA OB OC OD OF OH [2~ [3~ [5~ [6~'.split())
'cuu1 cud1 cuf1 cub1 beg end home ich1 dch1 pp np'.split(),
'UP DN RIT LFT BEG END HOM IC DC PRV NXT'.split(),
b'OA OB OC OD OE OF OH [2~ [3~ [5~ [6~'.split())
for name, mod in {
'k{unmod}': 0, 'k{key}': 2, 'k{key}3': 3, 'k{key}4': 4,
'k{key}5': 5, 'k{key}6': 6, 'k{key}7': 7}.items()
@ -438,9 +438,9 @@ 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(
'Su Smulx Sync Tc setrgbf setrgbb fullkbd kUP kDN'.split() + [
'Su Smulx Sync Tc setrgbf setrgbb fullkbd kUP kDN kbeg kBEG'.split() + [
'k{}{}'.format(key, mod)
for key in 'UP DN RIT LFT END HOM IC DC PRV NXT'.split()
for key in 'UP DN RIT LFT BEG END HOM IC DC PRV NXT'.split()
for mod in range(3, 8)])
if extra - no_termcap_for:
raise Exception('Termcap aliases not complete, missing: {}'.format(extra - no_termcap_for))

View File

@ -59,6 +59,12 @@ xterm-kitty|KovIdTTY,
ind=^J,
indn=\E[%p1%dS,
initc=\E]4;%p1%d;rgb\:%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%*%{1000}%/%2.2X/%p4%{255}%*%{1000}%/%2.2X\E\\,
kBEG=\E[1;2E,
kBEG3=\E[1;3E,
kBEG4=\E[1;4E,
kBEG5=\E[1;5E,
kBEG6=\E[1;6E,
kBEG7=\E[1;7E,
kDC=\E[3;2~,
kDC3=\E[3;3~,
kDC4=\E[3;4~,
@ -121,6 +127,7 @@ xterm-kitty|KovIdTTY,
kUP7=\E[1;7A,
ka1=,
ka3=,
kbeg=\EOE,
kbs=\177,
kc1=,
kc3=,

Binary file not shown.