mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-25 22:29:42 +03:00
input: properly recognize Alt+Delete when using -K/--rebindkeypad
This works for xterm, rxvt, Eterm, Konsole, and xfce4-terminal, which generate "Esc [ 3 ; 3 ~", but not for urxvt, which generates one of its double-escape sequences, "Esc Esc [ 3 ~".
This commit is contained in:
parent
252f14796e
commit
f02e2d3b6e
@ -1112,6 +1112,9 @@ int convert_sequence(const int *seq, size_t length, int *consumed)
|
||||
#ifndef NANO_TINY
|
||||
if (length > 4 && seq[2] == ';' && seq[4] == '~') {
|
||||
*consumed = 5;
|
||||
if (seq[3] == '3')
|
||||
/* Esc [ 3 ; 3 ~ == Alt-Delete on xterm/rxvt/Eterm/Terminal. */
|
||||
return ALT_DELETE;
|
||||
if (seq[3] == '5')
|
||||
/* Esc [ 3 ; 5 ~ == Ctrl-Delete on xterm. */
|
||||
return CONTROL_DELETE;
|
||||
|
Loading…
Reference in New Issue
Block a user