mirror of
https://github.com/tmate-io/tmate-ssh-server.git
synced 2020-11-18 19:53:51 -08:00
Fix binding of C-Space/C-@, from Micah Cowan.
This commit is contained in:
parent
cc724f327a
commit
b88ec14f0e
15
key-string.c
15
key-string.c
@ -149,9 +149,15 @@ 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 {
|
||||||
|
/* Otherwise look the key up in the table. */
|
||||||
|
key = key_string_search_table(string);
|
||||||
|
if (key == KEYC_NONE)
|
||||||
|
return (KEYC_NONE);
|
||||||
|
}
|
||||||
|
|
||||||
/* Convert the standard control keys. */
|
/* Convert the standard control keys. */
|
||||||
if (modifiers & KEYC_CTRL) {
|
if (key < KEYC_BASE && (modifiers & KEYC_CTRL)) {
|
||||||
if (key >= 97 && key <= 122)
|
if (key >= 97 && key <= 122)
|
||||||
key -= 96;
|
key -= 96;
|
||||||
else if (key >= 64 && key <= 95)
|
else if (key >= 64 && key <= 95)
|
||||||
@ -166,13 +172,6 @@ key_string_lookup_string(const char *string)
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (key | modifiers);
|
return (key | modifiers);
|
||||||
}
|
|
||||||
|
|
||||||
/* Otherwise look the key up in the table. */
|
|
||||||
key = key_string_search_table(string);
|
|
||||||
if (key == KEYC_NONE)
|
|
||||||
return (KEYC_NONE);
|
|
||||||
return (key | modifiers);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Convert a key code into string format, with prefix if necessary. */
|
/* Convert a key code into string format, with prefix if necessary. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user