It's ok that Enter and F3 share a number

Enter has u has trailer, F3 has either ~ or 1R
This commit is contained in:
Kovid Goyal 2021-01-13 22:07:02 +05:30
parent 8f5d42fa11
commit 11de87d9d9
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 14 additions and 15 deletions

View File

@ -327,16 +327,16 @@ mode* (the ``smkx/rmkx`` terminfo capabilities). This form is used only in
"DELETE", "kdch1", "CSI 3 ~"
"PAGE_UP", "kpp", "CSI 5 ~"
"PAGE_DOWN", "knp", "CSI 6 ~"
"UP", "cuu1,kcuu1", "CSI A, ESC O A"
"DOWN", "cud1,kcud1", "CSI B, ESC O B"
"RIGHT", "cuf1,kcuf1", "CSI C, ESC O C"
"LEFT", "cub1,kcub1", "CSI D, ESC O D"
"HOME", "home,khome", "CSI H, ESC O H"
"END", "-,kend", "CSI F, ESC O F"
"F1", "kf1", "ESC O P"
"F2", "kf2", "ESC O Q"
"F3", "kf3", "ESC O R"
"F4", "kf4", "ESC O S"
"UP", "cuu1,kcuu1", "CSI A, SS3 A"
"DOWN", "cud1,kcud1", "CSI B, SS3 B"
"RIGHT", "cuf1,kcuf1", "CSI C, SS3 C"
"LEFT", "cub1,kcub1", "CSI D, SS3 D"
"HOME", "home,khome", "CSI H, SS3 H"
"END", "-,kend", "CSI F, SS3 F"
"F1", "kf1", "SS3 P"
"F2", "kf2", "SS3 Q"
"F3", "kf3", "SS3 R"
"F4", "kf4", "SS3 S"
"F5", "kf5", "CSI 15 ~"
"F6", "kf6", "CSI 17 ~"
"F7", "kf7", "CSI 18 ~"
@ -355,8 +355,8 @@ encodings:
"Enter", "Plain - 0xd, alt+Enter - 0x1b 0x1d"
"Escape", "Plain - 0x1b, alt+Esc - 0x1b 0x1b"
"Backspace", "Plain - 0x7f, alt+Backspace - 0x1b 0x7f, ctrl+Backspace - 0x08"
"Space", "Plain - 0x20, ctrl+space - 0x0, alt+space - 0x1b 0x20"
"Tab", "Plain - 0x09, shift+tab - CSI Z"
"Space", "Plain - 0x20, ctrl+Space - 0x0, alt+space - 0x1b 0x20"
"Tab", "Plain - 0x09, shift+Tab - CSI Z"
Note that :kbd:`Backspace` and :kbd:`ctrl+backspace` are swapped in some
terminals.
@ -438,7 +438,7 @@ compatibility reasons.
"MENU", "CSI 57363 u"
"F1", "CSI 1 P or CSI 11 ~"
"F2", "CSI 1 Q or CSI 12 ~"
"F3", "CSI 1 R or CSI 57366 ~"
"F3", "CSI 1 R or CSI 13 ~"
"F4", "CSI 1 S or CSI 14 ~"
"F5", "CSI 15 ~"
"F6", "CSI 17 ~"
@ -536,7 +536,6 @@ Bugs in fixterms
which are undesirable for other reasons
* Incorrectly claims special keys are sometimes encoded using ``CSI letter`` encodings when it
is actually ``SS3 letter``.
* ``Enter`` and ``F3`` are both assigned the number 13.
* :kbd:`ctrl+shift+tab`` should be ``CSI 9 ; 6 u`` not ``CSI 1 ; 5 Z``
(shift+tab is not a separate key from tab)
* No support for the :kbd:`super` modifier.

View File

@ -117,7 +117,7 @@ shift_map = {x[0]: x[1] for x in '`~ 1! 2@ 3# 4$ 5% 6^ 7& 8* 9( 0) -_ =+ [{ ]} \
shift_map.update({x: x.upper() for x in string.ascii_lowercase})
functional_encoding_overrides = {
'insert': 2, 'delete': 3, 'page_up': 5, 'page_down': 6,
'home': 7, 'end': 8, 'tab': 9, 'f1': 11, 'f2': 12, 'enter': 13, 'f4': 14,
'home': 7, 'end': 8, 'tab': 9, 'f1': 11, 'f2': 12, 'f3': 13, 'enter': 13, 'f4': 14,
'f5': 15, 'f6': 17, 'f7': 18, 'f8': 19, 'f9': 20, 'f10': 21,
'f11': 23, 'f12': 24, 'escape': 27, 'backspace': 127
}