tweaks: put the case labels (the keycodes) in a more sensible order

master
Benno Schulenberg 2016-07-10 20:49:52 +02:00
parent 4fcc760158
commit 0c319f8b4b
1 changed files with 40 additions and 39 deletions

View File

@ -499,24 +499,6 @@ int parse_kbinput(WINDOW *win)
if (retval != ERR) {
switch (retval) {
case NANO_CONTROL_8:
retval = ISSET(REBIND_DELETE) ? sc_seq_or(do_delete, 0) :
sc_seq_or(do_backspace, 0);
break;
#ifdef KEY_SDOWN
/* ncurses and Slang don't support KEY_SDOWN. */
case KEY_SDOWN:
#endif
case KEY_DOWN:
retval = sc_seq_or(do_down_void, *kbinput);
break;
#ifdef KEY_SUP
/* ncurses and Slang don't support KEY_SUP. */
case KEY_SUP:
#endif
case KEY_UP:
retval = sc_seq_or(do_up_void, *kbinput);
break;
#ifdef KEY_SLEFT
/* Slang doesn't support KEY_SLEFT. */
case KEY_SLEFT:
@ -531,6 +513,20 @@ int parse_kbinput(WINDOW *win)
case KEY_RIGHT:
retval = sc_seq_or(do_right, *kbinput);
break;
#ifdef KEY_SUP
/* ncurses and Slang don't support KEY_SUP. */
case KEY_SUP:
#endif
case KEY_UP:
retval = sc_seq_or(do_up_void, *kbinput);
break;
#ifdef KEY_SDOWN
/* ncurses and Slang don't support KEY_SDOWN. */
case KEY_SDOWN:
#endif
case KEY_DOWN:
retval = sc_seq_or(do_down_void, *kbinput);
break;
#ifdef KEY_SHOME
/* HP-UX 10-11 and Slang don't support KEY_SHOME. */
case KEY_SHOME:
@ -541,9 +537,35 @@ int parse_kbinput(WINDOW *win)
case KEY_A1: /* Home (7) on keypad with NumLock off. */
retval = sc_seq_or(do_home, *kbinput);
break;
#ifdef KEY_SEND
/* HP-UX 10-11 and Slang don't support KEY_SEND. */
case KEY_SEND:
#endif
#ifdef KEY_END
case KEY_END:
#endif
case KEY_C1: /* End (1) on keypad with NumLock off. */
retval = sc_seq_or(do_end, *kbinput);
break;
case KEY_PPAGE:
case KEY_A3: /* PageUp (9) on keypad with NumLock off. */
retval = sc_seq_or(do_page_up, *kbinput);
break;
case KEY_NPAGE:
case KEY_C3: /* PageDown (4) on keypad with NumLock off. */
retval = sc_seq_or(do_page_down, *kbinput);
break;
case KEY_ENTER:
retval = sc_seq_or(do_enter, *kbinput);
break;
case KEY_BACKSPACE:
retval = sc_seq_or(do_backspace, *kbinput);
break;
case NANO_CONTROL_8:
retval = ISSET(REBIND_DELETE) ? sc_seq_or(do_delete, 0) :
sc_seq_or(do_backspace, 0);
break;
#ifdef KEY_SDC
/* Slang doesn't support KEY_SDC. */
case KEY_SDC:
@ -559,27 +581,6 @@ int parse_kbinput(WINDOW *win)
retval = sc_seq_or(do_insertfile_void, *kbinput);
break;
#endif
case KEY_NPAGE:
case KEY_C3: /* PageDown (4) on keypad with NumLock off. */
retval = sc_seq_or(do_page_down, *kbinput);
break;
case KEY_PPAGE:
case KEY_A3: /* PageUp (9) on keypad with NumLock off. */
retval = sc_seq_or(do_page_up, *kbinput);
break;
case KEY_ENTER:
retval = sc_seq_or(do_enter, *kbinput);
break;
#ifdef KEY_SEND
/* HP-UX 10-11 and Slang don't support KEY_SEND. */
case KEY_SEND:
#endif
#ifdef KEY_END
case KEY_END:
#endif
case KEY_C1: /* End (1) on keypad with NumLock off. */
retval = sc_seq_or(do_end, *kbinput);
break;
#ifdef KEY_SBEG
/* Slang doesn't support KEY_SBEG. */
case KEY_SBEG: