tweaks: hard-bind ASCII DEL in a slightly more economical way

And in the bargain get rid of a duplicate help-text entry for
either "Del" or "Bsp".
master
Benno Schulenberg 2018-12-23 19:17:14 +01:00
parent 9b2c2697cb
commit 0946153b47
4 changed files with 1 additions and 7 deletions

View File

@ -462,7 +462,6 @@ functionptrtype parse_browser_input(int *kbinput)
{ {
if (!meta_key) { if (!meta_key) {
switch (*kbinput) { switch (*kbinput) {
case DEL_CODE:
case '-': case '-':
return do_page_up; return do_page_up;
case ' ': case ' ':

View File

@ -1084,11 +1084,6 @@ void shortcut_init(void)
add_to_sclist(MMOST, "Sh-Del", SHIFT_DELETE, do_backspace, 0); add_to_sclist(MMOST, "Sh-Del", SHIFT_DELETE, do_backspace, 0);
add_to_sclist(MMOST, "^D", 0, do_delete, 0); add_to_sclist(MMOST, "^D", 0, do_delete, 0);
add_to_sclist(MMOST, "Del", 0, do_delete, 0); add_to_sclist(MMOST, "Del", 0, do_delete, 0);
/* Make ASCII DEL do a delete when requested, otherwise a backspace. */
if (ISSET(REBIND_DELETE))
add_to_sclist(MMOST, "Del", DEL_CODE, do_delete, 0);
else
add_to_sclist(MMOST & ~MBROWSER, "Bsp", DEL_CODE, do_backspace, 0);
add_to_sclist(MMOST, "^I", 0, do_tab, 0); add_to_sclist(MMOST, "^I", 0, do_tab, 0);
add_to_sclist(MMOST, "Tab", TAB_CODE, do_tab, 0); add_to_sclist(MMOST, "Tab", TAB_CODE, do_tab, 0);
add_to_sclist((MMOST|MBROWSER) & ~MFINDINHELP, "^G", 0, do_help_void, 0); add_to_sclist((MMOST|MBROWSER) & ~MFINDINHELP, "^G", 0, do_help_void, 0);

View File

@ -567,7 +567,6 @@ functionptrtype parse_help_input(int *kbinput)
{ {
if (!meta_key) { if (!meta_key) {
switch (*kbinput) { switch (*kbinput) {
case DEL_CODE:
case '-': case '-':
return do_page_up; return do_page_up;
case ' ': case ' ':

View File

@ -725,6 +725,7 @@ int parse_kbinput(WINDOW *win)
case KEY_C3: /* PageDown (3) on keypad with NumLock off. */ case KEY_C3: /* PageDown (3) on keypad with NumLock off. */
return KEY_NPAGE; return KEY_NPAGE;
/* When requested, swap meanings of keycodes for <Bsp> and <Del>. */ /* When requested, swap meanings of keycodes for <Bsp> and <Del>. */
case DEL_CODE:
case KEY_BACKSPACE: case KEY_BACKSPACE:
return (ISSET(REBIND_DELETE) ? KEY_DC : KEY_BACKSPACE); return (ISSET(REBIND_DELETE) ? KEY_DC : KEY_BACKSPACE);
case KEY_DC: case KEY_DC: