bindings: allow rebinding ^Z also on a Linux console (a VT)
Achieve this by translating KEY_SUSPEND back to ^Z. (Strictly speaking, this is incorrect, as the terminfo entry might specify some other keystroke for 'kspd', but... meh.) This fixes https://savannah.gnu.org/bugs/?61573. Bug existed since before version 2.2.0, since keys became rebindable.master
parent
9ebee362a5
commit
be87f110ce
|
@ -1497,9 +1497,8 @@ void shortcut_init(void)
|
||||||
#ifdef ENABLE_SPELLER
|
#ifdef ENABLE_SPELLER
|
||||||
add_to_sclist(MMAIN, "F12", KEY_F(12), do_spell, 0);
|
add_to_sclist(MMAIN, "F12", KEY_F(12), do_spell, 0);
|
||||||
#endif
|
#endif
|
||||||
#if defined(KEY_CANCEL) && defined(KEY_SUSPEND) && defined(KEY_SIC)
|
#if defined(KEY_CANCEL) && defined(KEY_SIC)
|
||||||
add_to_sclist((MMOST & ~MMAIN) | MYESNO, "", KEY_CANCEL, do_cancel, 0);
|
add_to_sclist((MMOST & ~MMAIN) | MYESNO, "", KEY_CANCEL, do_cancel, 0);
|
||||||
add_to_sclist(MMAIN|MEXECUTE, "", KEY_SUSPEND, do_suspend, 0);
|
|
||||||
add_to_sclist(MMAIN, "", KEY_SIC, do_insertfile, 0);
|
add_to_sclist(MMAIN, "", KEY_SIC, do_insertfile, 0);
|
||||||
#endif
|
#endif
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
|
|
|
@ -1244,7 +1244,8 @@ int parse_kbinput(WINDOW *win)
|
||||||
case KEY_SCANCEL:
|
case KEY_SCANCEL:
|
||||||
return KEY_CANCEL;
|
return KEY_CANCEL;
|
||||||
case KEY_SSUSPEND:
|
case KEY_SSUSPEND:
|
||||||
return KEY_SUSPEND;
|
case KEY_SUSPEND:
|
||||||
|
return 0x1A; /* The ASCII code for Ctrl+Z. */
|
||||||
case KEY_BTAB:
|
case KEY_BTAB:
|
||||||
return SHIFT_TAB;
|
return SHIFT_TAB;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue