nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 0d5f918453cad006968c83a72929c3ad7c63e199
parent 9c7940b599f5eb58149821d112874917080ef783
Author: Benno Schulenberg <bensberg@justemail.net>
Date:   Sun, 10 Jul 2016 13:27:27 +0200

input: add some missing keycodes to the parsing routine

Add them so that <Esc> followed by <Home> will simply do "Home" instead of
reporting an unbound key.  The same for <End>, <PageUp> and <PageDown>.

This restores the behavior from before nano-2.3.5.

Diffstat:
Msrc/winio.c | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/winio.c b/src/winio.c @@ -535,6 +535,7 @@ int parse_kbinput(WINDOW *win) /* HP-UX 10-11 and Slang don't support KEY_SHOME. */ case KEY_SHOME: #endif + case KEY_HOME: case KEY_A1: /* Home (7) on numeric keypad with * NumLock off. */ retval = sc_seq_or(do_home, *kbinput); @@ -557,10 +558,12 @@ int parse_kbinput(WINDOW *win) retval = sc_seq_or(do_insertfile_void, *kbinput); break; #endif + case KEY_NPAGE: case KEY_C3: /* PageDown (4) on numeric keypad with * NumLock off. */ retval = sc_seq_or(do_page_down, *kbinput); break; + case KEY_PPAGE: case KEY_A3: /* PageUp (9) on numeric keypad with * NumLock off. */ retval = sc_seq_or(do_page_up, *kbinput); @@ -578,6 +581,7 @@ int parse_kbinput(WINDOW *win) /* HP-UX 10-11 and Slang don't support KEY_SEND. */ case KEY_SEND: #endif + case KEY_END: retval = sc_seq_or(do_end, *kbinput); break; #ifdef KEY_BEG