tweaks: don't bother asking ncurses for keycodes for shifted Left/Right
These modified keys have codes by default: KEY_SLEFT and KEY_SRIGHT. It's just the shifted Up/Down keys that don't have default codes.master
parent
362965b9a3
commit
7dad21f4f4
|
@ -2579,8 +2579,6 @@ int main(int argc, char **argv)
|
|||
controldelete = get_keycode("kDC5", CONTROL_DELETE);
|
||||
controlshiftdelete = get_keycode("kDC6", CONTROL_SHIFT_DELETE);
|
||||
|
||||
shiftleft = get_keycode("kLFT", SHIFT_LEFT);
|
||||
shiftright = get_keycode("kRIT", SHIFT_RIGHT);
|
||||
shiftup = get_keycode("kUP", SHIFT_UP);
|
||||
shiftdown = get_keycode("kDN", SHIFT_DOWN);
|
||||
|
||||
|
|
|
@ -599,8 +599,8 @@ enum
|
|||
#define SHIFT_ALT_RIGHT 0x432
|
||||
#define SHIFT_ALT_UP 0x433
|
||||
#define SHIFT_ALT_DOWN 0x434
|
||||
#define SHIFT_LEFT 0x451
|
||||
#define SHIFT_RIGHT 0x452
|
||||
//#define SHIFT_LEFT 0x451
|
||||
//#define SHIFT_RIGHT 0x452
|
||||
#define SHIFT_UP 0x453
|
||||
#define SHIFT_DOWN 0x454
|
||||
#define SHIFT_HOME 0x455
|
||||
|
|
|
@ -538,13 +538,7 @@ int parse_kbinput(WINDOW *win)
|
|||
return CONTROL_DELETE;
|
||||
else if (retval == controlshiftdelete)
|
||||
return CONTROL_SHIFT_DELETE;
|
||||
else if (retval == shiftleft) {
|
||||
shift_held = TRUE;
|
||||
return KEY_LEFT;
|
||||
} else if (retval == shiftright) {
|
||||
shift_held = TRUE;
|
||||
return KEY_RIGHT;
|
||||
} else if (retval == shiftup) {
|
||||
else if (retval == shiftup) {
|
||||
shift_held = TRUE;
|
||||
return KEY_UP;
|
||||
} else if (retval == shiftdown) {
|
||||
|
|
Loading…
Reference in New Issue