Commit 838b175d authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

input: recognize escape sequences for <Shift+PageUp> and <Shift+PageDown>

This fixes the first part of https://savannah.gnu.org/bugs/?52960.
No related merge requests found
Showing with 14 additions and 0 deletions
+14 -0
......@@ -1090,12 +1090,26 @@ int convert_sequence(const int *seq, size_t length, int *consumed)
* Esc [ 5 ^ == PageUp on Eterm. */
if (length > 2 && (seq[2] == '~' || seq[2] == '^'))
return KEY_PPAGE;
#ifndef NANO_TINY
else if (length > 4 && seq[2] == ';' &&
seq[3] == '2' && seq[4] == '~') {
*consumed = 5;
return shiftaltup;
}
#endif
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] == '^'))
return KEY_NPAGE;
#ifndef NANO_TINY
else if (length > 4 && seq[2] == ';' &&
seq[3] == '2' && seq[4] == '~') {
*consumed = 5;
return shiftaltdown;
}
#endif
break;
case '7': /* Esc [ 7 ~ == Home on Eterm/rxvt;
* Esc [ 7 $ == Shift-Home on Eterm/rxvt;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment