mirror of
https://github.com/tmux/tmux.git
synced 2025-01-14 20:58:53 +00:00
Fix binding of C-Space/C-@, from Micah Cowan.
This commit is contained in:
parent
cc724f327a
commit
b88ec14f0e
41
key-string.c
41
key-string.c
@ -149,29 +149,28 @@ key_string_lookup_string(const char *string)
|
|||||||
key = (u_char) string[0];
|
key = (u_char) string[0];
|
||||||
if (key < 32 || key > 126)
|
if (key < 32 || key > 126)
|
||||||
return (KEYC_NONE);
|
return (KEYC_NONE);
|
||||||
|
} else {
|
||||||
/* Convert the standard control keys. */
|
/* Otherwise look the key up in the table. */
|
||||||
if (modifiers & KEYC_CTRL) {
|
key = key_string_search_table(string);
|
||||||
if (key >= 97 && key <= 122)
|
if (key == KEYC_NONE)
|
||||||
key -= 96;
|
return (KEYC_NONE);
|
||||||
else if (key >= 64 && key <= 95)
|
}
|
||||||
key -= 64;
|
|
||||||
else if (key == 32)
|
/* Convert the standard control keys. */
|
||||||
key = 0;
|
if (key < KEYC_BASE && (modifiers & KEYC_CTRL)) {
|
||||||
else if (key == 63)
|
if (key >= 97 && key <= 122)
|
||||||
key = KEYC_BSPACE;
|
key -= 96;
|
||||||
else
|
else if (key >= 64 && key <= 95)
|
||||||
return (KEYC_NONE);
|
key -= 64;
|
||||||
modifiers &= ~KEYC_CTRL;
|
else if (key == 32)
|
||||||
}
|
key = 0;
|
||||||
|
else if (key == 63)
|
||||||
return (key | modifiers);
|
key = KEYC_BSPACE;
|
||||||
|
else
|
||||||
|
return (KEYC_NONE);
|
||||||
|
modifiers &= ~KEYC_CTRL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Otherwise look the key up in the table. */
|
|
||||||
key = key_string_search_table(string);
|
|
||||||
if (key == KEYC_NONE)
|
|
||||||
return (KEYC_NONE);
|
|
||||||
return (key | modifiers);
|
return (key | modifiers);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user