From 0946153b47ea421f58a944f19b245a0770c5a7a8 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sun, 23 Dec 2018 19:17:14 +0100 Subject: [PATCH] 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". --- src/browser.c | 1 - src/global.c | 5 ----- src/help.c | 1 - src/winio.c | 1 + 4 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/browser.c b/src/browser.c index 242207af..6faca707 100644 --- a/src/browser.c +++ b/src/browser.c @@ -462,7 +462,6 @@ functionptrtype parse_browser_input(int *kbinput) { if (!meta_key) { switch (*kbinput) { - case DEL_CODE: case '-': return do_page_up; case ' ': diff --git a/src/global.c b/src/global.c index a4956390..a11ccdba 100644 --- a/src/global.c +++ b/src/global.c @@ -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); diff --git a/src/help.c b/src/help.c index a9f0f254..1eefabc5 100644 --- a/src/help.c +++ b/src/help.c @@ -567,7 +567,6 @@ functionptrtype parse_help_input(int *kbinput) { if (!meta_key) { switch (*kbinput) { - case DEL_CODE: case '-': return do_page_up; case ' ': diff --git a/src/winio.c b/src/winio.c index 02506113..63e8a2ec 100644 --- a/src/winio.c +++ b/src/winio.c @@ -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 and . */ + case DEL_CODE: case KEY_BACKSPACE: return (ISSET(REBIND_DELETE) ? KEY_DC : KEY_BACKSPACE); case KEY_DC: