input: correct the escape sequence for PageUp/PageDown on Eterm/Urxvt

There is not a single terminal in the terminfo database that has an
"Esc [ n ^" sequence for any keystroke (where n is a digit).
master
Benno Schulenberg 2019-12-26 12:18:03 +01:00
parent dda1b167c9
commit 72645b160d
1 changed files with 4 additions and 6 deletions

View File

@ -1140,9 +1140,8 @@ int convert_sequence(const int *seq, size_t length, int *consumed)
return KEY_END;
break;
case '5': /* Esc [ 5 ~ == PageUp on VT220/VT320/
* Linux console/xterm/Terminal;
* Esc [ 5 ^ == PageUp on Eterm. */
if (length > 2 && (seq[2] == '~' || seq[2] == '^'))
* Linux console/xterm/Eterm/urxvt/Terminal */
if (length > 2 && seq[2] == '~')
return KEY_PPAGE;
else if (length > 4 && seq[2] == ';' && seq[4] == '~') {
*consumed = 5;
@ -1153,9 +1152,8 @@ int convert_sequence(const int *seq, size_t length, int *consumed)
}
break;
case '6': /* Esc [ 6 ~ == PageDown on VT220/VT320/
* Linux console/xterm/Terminal;
* Esc [ 6 ^ == PageDown on Eterm. */
if (length > 2 && (seq[2] == '~' || seq[2] == '^'))
* Linux console/xterm/Eterm/urxvt/Terminal */
if (length > 2 && seq[2] == '~')
return KEY_NPAGE;
else if (length > 4 && seq[2] == ';' && seq[4] == '~') {
*consumed = 5;