aboutsummarylogtreecommitdiffstats
path: root/st.c
diff options
context:
space:
mode:
authorChristoph Lohmann2012-11-15 20:19:35 +0100
committerChristoph Lohmann2012-11-15 20:19:35 +0100
commit23fe52cc896a7325f3c013dbdb9ddd9c6dafa522 (patch)
tree5d2fcdaba834c47ddec1acc0b0eae88a7286a769 /st.c
parenta062489cb0a6d66037ec9965fa01757e664432a8 (diff)
downloadaur-23fe52cc896a7325f3c013dbdb9ddd9c6dafa522.tar.gz
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.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/st.c b/st.c
index 477a8f8beb4c..02ef411e25d4 100644
--- a/st.c
+++ b/st.c
@@ -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;