mirror of
git://git.sv.gnu.org/nano.git
synced 2025-03-15 05:52:59 +03:00
tweaks: stop setting and requiring the Meta flag for special keycodes
Set the Meta flag only for the regular Meta keystrokes: "M-" plus a printable ASCII character. The special keycodes are unique and do not need any extra flags to differentiate them.
This commit is contained in:
parent
89760cd6ec
commit
77826c2b06
@ -462,7 +462,7 @@ functionptrtype func_from_key(int *kbinput)
|
||||
void assign_keyinfo(sc *s, const char *keystring, const int keycode)
|
||||
{
|
||||
s->keystr = keystring;
|
||||
s->meta = (keystring[0] == 'M' && keystring[2] != '\xE2');
|
||||
s->meta = (keystring[0] == 'M' && keycode == 0);
|
||||
|
||||
assert(strlen(keystring) > 1 && (!s->meta || strlen(keystring) > 2));
|
||||
|
||||
|
@ -576,10 +576,9 @@ int parse_kbinput(WINDOW *win)
|
||||
return ALT_UP;
|
||||
else if (retval == altdown)
|
||||
return ALT_DOWN;
|
||||
else if (retval == altdelete) {
|
||||
meta_key = TRUE;
|
||||
else if (retval == altdelete)
|
||||
return ALT_DELETE;
|
||||
} else if (retval == shiftaltleft) {
|
||||
else if (retval == shiftaltleft) {
|
||||
shift_held = TRUE;
|
||||
return KEY_HOME;
|
||||
} else if (retval == shiftaltright) {
|
||||
@ -613,10 +612,8 @@ int parse_kbinput(WINDOW *win)
|
||||
if (retval == KEY_DC) {
|
||||
if ((modifiers & 0x05) == 0x05)
|
||||
return CONTROL_SHIFT_DELETE;
|
||||
if (modifiers == 0x08) {
|
||||
meta_key = TRUE;
|
||||
if (modifiers == 0x08)
|
||||
return ALT_DELETE;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
/* Is Ctrl being held? */
|
||||
|
Loading…
x
Reference in New Issue
Block a user