diff options
author | Thomas Adam <thomas.adam@smoothwall.net> | 2013-03-25 14:59:29 +0000 |
---|---|---|
committer | Thomas Adam <thomas.adam@smoothwall.net> | 2013-03-25 14:59:29 +0000 |
commit | f90eb43fcb12720711ea01b110c5b474111e6600 (patch) | |
tree | 43b2e85bcf1626e3810ade10578ac18399931772 /key-string.c | |
parent | 418ba99078a2712ece398e17a5a9bc1f6600126b (diff) | |
parent | 58bb6f8c5650d496fb3b872766c0278aa024631d (diff) | |
download | rtmux-f90eb43fcb12720711ea01b110c5b474111e6600.tar.gz rtmux-f90eb43fcb12720711ea01b110c5b474111e6600.tar.bz2 rtmux-f90eb43fcb12720711ea01b110c5b474111e6600.zip |
Merge branch 'obsd-master'
Diffstat (limited to 'key-string.c')
-rw-r--r-- | key-string.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/key-string.c b/key-string.c index df177399..797eedd5 100644 --- a/key-string.c +++ b/key-string.c @@ -136,9 +136,10 @@ key_string_get_modifiers(const char **string) int key_string_lookup_string(const char *string) { - int key, modifiers; - u_short u; - int size; + static const char *other = "!#()+,-.0123456789:;<=>?'\r\t"; + int key, modifiers; + u_short u; + int size; /* Is this a hexadecimal value? */ if (string[0] == '0' && string[1] == 'x') { @@ -170,7 +171,7 @@ key_string_lookup_string(const char *string) } /* Convert the standard control keys. */ - if (key < KEYC_BASE && (modifiers & KEYC_CTRL)) { + if (key < KEYC_BASE && (modifiers & KEYC_CTRL) && !strchr(other, key)) { if (key >= 97 && key <= 122) key -= 96; else if (key >= 64 && key <= 95) @@ -193,7 +194,7 @@ key_string_lookup_key(int key) { static char out[24]; char tmp[8]; - u_int i; + u_int i; *out = '\0'; |