bindings: bind ASCII DEL during startup instead of repeatedly at runtime
parent
e2051a61e0
commit
65e4784eec
|
@ -1076,6 +1076,11 @@ void shortcut_init(void)
|
||||||
add_to_sclist(MMOST, "Bsp", KEY_BACKSPACE, do_backspace, 0);
|
add_to_sclist(MMOST, "Bsp", KEY_BACKSPACE, 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, "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 & ~MFINDINHELP, "^G", 0, do_help_void, 0);
|
add_to_sclist(MMOST & ~MFINDINHELP, "^G", 0, do_help_void, 0);
|
||||||
|
|
|
@ -709,11 +709,6 @@ int parse_kbinput(WINDOW *win)
|
||||||
case KEY_SDC:
|
case KEY_SDC:
|
||||||
return KEY_BACKSPACE;
|
return KEY_BACKSPACE;
|
||||||
#endif
|
#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. */
|
#ifdef KEY_SIC /* Slang doesn't support KEY_SIC. */
|
||||||
case KEY_SIC:
|
case KEY_SIC:
|
||||||
return the_code_for(do_insertfile_void, KEY_IC);
|
return the_code_for(do_insertfile_void, KEY_IC);
|
||||||
|
|
Loading…
Reference in New Issue