Commit 0946153b authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

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".
No related merge requests found
Showing with 1 addition and 7 deletions
+1 -7
......@@ -462,7 +462,6 @@ functionptrtype parse_browser_input(int *kbinput)
{
if (!meta_key) {
switch (*kbinput) {
case DEL_CODE:
case '-':
return do_page_up;
case ' ':
......
......@@ -1084,11 +1084,6 @@ void shortcut_init(void)
add_to_sclist(MMOST, "Sh-Del", SHIFT_DELETE, do_backspace, 0);
add_to_sclist(MMOST, "^D", 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, "Tab", TAB_CODE, do_tab, 0);
add_to_sclist((MMOST|MBROWSER) & ~MFINDINHELP, "^G", 0, do_help_void, 0);
......
......@@ -567,7 +567,6 @@ functionptrtype parse_help_input(int *kbinput)
{
if (!meta_key) {
switch (*kbinput) {
case DEL_CODE:
case '-':
return do_page_up;
case ' ':
......
......@@ -725,6 +725,7 @@ int parse_kbinput(WINDOW *win)
case KEY_C3: /* PageDown (3) on keypad with NumLock off. */
return KEY_NPAGE;
/* When requested, swap meanings of keycodes for <Bsp> and <Del>. */
case DEL_CODE:
case KEY_BACKSPACE:
return (ISSET(REBIND_DELETE) ? KEY_DC : KEY_BACKSPACE);
case KEY_DC:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment