diff options
author | Paul LeoNerd Evans <leonerd@leonerd.org.uk> | 2011-04-01 10:48:15 +0100 |
---|---|---|
committer | Paul LeoNerd Evans <leonerd@leonerd.org.uk> | 2011-04-01 10:48:15 +0100 |
commit | a3b88040185e7bc927056475bfcc91b955d8dba5 (patch) | |
tree | eea956114cd4991585e4e06a71bba20faf199727 /termkey.c | |
parent | 59800c356b7737213d80bec5d0b3f0df4b69284c (diff) | |
download | termo-a3b88040185e7bc927056475bfcc91b955d8dba5.tar.gz termo-a3b88040185e7bc927056475bfcc91b955d8dba5.tar.xz termo-a3b88040185e7bc927056475bfcc91b955d8dba5.zip |
Ensure strpkey can parse numbered function keys
Diffstat (limited to 'termkey.c')
-rw-r--r-- | termkey.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1122,7 +1122,10 @@ TermKeyResult termkey_strpkey(TermKey *tk, const char *str, TermKeyKey *key, Ter else if((key->code.sym = termkey_keyname2sym(tk, str)) != TERMKEY_SYM_UNKNOWN) { key->type = TERMKEY_TYPE_KEYSYM; } - // TODO: Consider function keys + else if(sscanf(str, "F%d", &key->code.number) == 1) { + key->type = TERMKEY_TYPE_FUNCTION; + } + // TODO: Consider mouse events? else { return TERMKEY_RES_NONE; } |