Optimizing the key lookup to the X11 function key. It is still possible to

remap other keys.
This commit is contained in:
Christoph Lohmann
2012-11-15 20:19:35 +01:00
parent 927d8fb459
commit 2b6521f5d2
2 changed files with 20 additions and 0 deletions

14
st.c
View File

@ -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;