diff options
author | Christoph Lohmann <20h@r-36.net> | 2012-11-15 20:19:35 +0100 |
---|---|---|
committer | Christoph Lohmann <20h@r-36.net> | 2012-11-15 20:19:35 +0100 |
commit | 2b6521f5d23da404a597d675d12d4c0cf89657de (patch) | |
tree | 44aba527c663bf8242f1b5d4ac73218e1c18810b /st.c | |
parent | 927d8fb45971ddf0eac115ad04161aba6bbd8bc7 (diff) |
Optimizing the key lookup to the X11 function key. It is still possible to
remap other keys.
Diffstat (limited to 'st.c')
-rw-r--r-- | st.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -2711,6 +2711,20 @@ char* kmap(KeySym k, uint state) { uint mask; Key *kp; + int i; + + /* Check for mapped keys out of X11 function keys. */ + for(i = 0; i < LEN(mappedkeys); i++) { + if(mappedkeys[i] == k) { + fprintf(stderr, "mapped function key.\n"); + break; + } + } + if(i == LEN(mappedkeys)) { + if((k & 0xFFFF) < 0xFF00) + return NULL; + } + fprintf(stderr, "Function key.\n"); for(kp = key; kp < key + LEN(key); kp++) { mask = kp->mask; |