Allowing the codes from Ins and Del keys to be rebound.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4798 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
ac9973658a
commit
94b1d01bb4
|
@ -16,6 +16,8 @@
|
|||
* src/global.c (assign_keyinfo, shortcut_init): Give nicer names
|
||||
to the dedicated keys, for when they show up in the help lines.
|
||||
* src/rcfile.c (parse_binding): K-keys no longer exist.
|
||||
* src/global.c, src/rcfile.c, doc/nanorc.sample.in: Allow the
|
||||
codes from the Ins and Del keys to be rebound.
|
||||
|
||||
2014-04-16 Benno Schulenberg <bensberg@justemail.net>
|
||||
* src/winio.c (get_mouseinput): Properly find also the zeroeth
|
||||
|
|
|
@ -232,13 +232,13 @@
|
|||
|
||||
|
||||
## Key bindings
|
||||
## Please see nanorc(5) for more details on this
|
||||
## Please see nanorc(5) for more details on this.
|
||||
##
|
||||
## Here are some samples to get you going
|
||||
## Here are some samples to get you going.
|
||||
##
|
||||
# bind M-W nowrap main
|
||||
# bind M-A casesens search
|
||||
# bind ^S research main
|
||||
|
||||
## Set this if your backspace key sends delete most of the time (2.1.3+)
|
||||
# bind kdel backspace all
|
||||
## Set this if your backspace key sends Del most of the time.
|
||||
# bind Del backspace all
|
||||
|
|
|
@ -453,7 +453,7 @@ void assign_keyinfo(sc *s)
|
|||
s->seq = KEY_LEFT;
|
||||
else if (!strcasecmp(s->keystr, "Right"))
|
||||
s->seq = KEY_RIGHT;
|
||||
else if (!strcasecmp(s->keystr, "Insert"))
|
||||
else if (!strcasecmp(s->keystr, "Ins"))
|
||||
s->seq = KEY_IC;
|
||||
else if (!strcasecmp(s->keystr, "Del"))
|
||||
s->seq = KEY_DC;
|
||||
|
@ -1091,7 +1091,7 @@ void shortcut_init(void)
|
|||
#endif
|
||||
add_to_sclist(MMAIN, "^R", do_insertfile_void, 0, TRUE);
|
||||
add_to_sclist(MMAIN, "F5", do_insertfile_void, 0, TRUE);
|
||||
add_to_sclist(MMAIN, "Insert", do_insertfile_void, 0, TRUE);
|
||||
add_to_sclist(MMAIN, "Ins", do_insertfile_void, 0, TRUE);
|
||||
add_to_sclist(MMAIN|MBROWSER, "^W", do_search, 0, TRUE);
|
||||
add_to_sclist(MMAIN|MBROWSER, "F6", do_search, 0, TRUE);
|
||||
add_to_sclist(MMAIN|MBROWSER|MHELP|MWHEREISFILE|MLINTER, "^Y", do_page_up, 0, TRUE);
|
||||
|
|
|
@ -499,7 +499,11 @@ void parse_binding(char *ptr, bool dobind)
|
|||
}
|
||||
}
|
||||
|
||||
if (keycopy[0] != '^' && keycopy[0] != 'M' && keycopy[0] != 'F') {
|
||||
/* Allow the codes for Insert and Delete to be rebound, but apart
|
||||
* from those two only Control, Meta and Function sequences. */
|
||||
if (!strcasecmp(keycopy, "Ins") || !strcasecmp(keycopy, "Del"))
|
||||
keycopy[1] = tolower(keycopy[1]);
|
||||
else if (keycopy[0] != '^' && keycopy[0] != 'M' && keycopy[0] != 'F') {
|
||||
rcfile_error(N_("Key name must begin with \"^\", \"M\", or \"F\""));
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue