diff --git a/src/global.c b/src/global.c index 88bb8dd3..ae92dcff 100644 --- a/src/global.c +++ b/src/global.c @@ -1076,6 +1076,11 @@ void shortcut_init(void) add_to_sclist(MMOST, "Bsp", KEY_BACKSPACE, 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, "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 & ~MFINDINHELP, "^G", 0, do_help_void, 0); diff --git a/src/winio.c b/src/winio.c index d81fedb8..9de1247d 100644 --- a/src/winio.c +++ b/src/winio.c @@ -709,11 +709,6 @@ int parse_kbinput(WINDOW *win) case KEY_SDC: return KEY_BACKSPACE; #endif - case DEL_CODE: - if (ISSET(REBIND_DELETE)) - return the_code_for(do_delete, KEY_DC); - else - return KEY_BACKSPACE; #ifdef KEY_SIC /* Slang doesn't support KEY_SIC. */ case KEY_SIC: return the_code_for(do_insertfile_void, KEY_IC);