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
parent
9b2c2697cb
commit
0946153b47
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue