version 1.23, 2012/03/04 20:40:54 |
version 1.24, 2013/03/22 10:30:04 |
|
|
int |
int |
key_string_lookup_string(const char *string) |
key_string_lookup_string(const char *string) |
{ |
{ |
int key, modifiers; |
static const char *other = "!#()+,-.0123456789:;<=>?'\r\t"; |
u_short u; |
int key, modifiers; |
int size; |
u_short u; |
|
int size; |
|
|
/* Is this a hexadecimal value? */ |
/* Is this a hexadecimal value? */ |
if (string[0] == '0' && string[1] == 'x') { |
if (string[0] == '0' && string[1] == 'x') { |
|
|
} |
} |
|
|
/* Convert the standard control keys. */ |
/* 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) |
if (key >= 97 && key <= 122) |
key -= 96; |
key -= 96; |
else if (key >= 64 && key <= 95) |
else if (key >= 64 && key <= 95) |
|
|
{ |
{ |
static char out[24]; |
static char out[24]; |
char tmp[8]; |
char tmp[8]; |
u_int i; |
u_int i; |
|
|
*out = '\0'; |
*out = '\0'; |
|
|