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 | Making all function keys accessible. (diff) | |
| download | st-2b6521f5d23da404a597d675d12d4c0cf89657de.tar.gz st-2b6521f5d23da404a597d675d12d4c0cf89657de.zip | |
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* | |||
| 2711 | kmap(KeySym k, uint state) { | 2711 | kmap(KeySym k, uint state) { |
| 2712 | uint mask; | 2712 | uint mask; |
| 2713 | Key *kp; | 2713 | Key *kp; |
| 2714 | int i; | ||
| 2715 | |||
| 2716 | /* Check for mapped keys out of X11 function keys. */ | ||
| 2717 | for(i = 0; i < LEN(mappedkeys); i++) { | ||
| 2718 | if(mappedkeys[i] == k) { | ||
| 2719 | fprintf(stderr, "mapped function key.\n"); | ||
| 2720 | break; | ||
| 2721 | } | ||
| 2722 | } | ||
| 2723 | if(i == LEN(mappedkeys)) { | ||
| 2724 | if((k & 0xFFFF) < 0xFF00) | ||
| 2725 | return NULL; | ||
| 2726 | } | ||
| 2727 | fprintf(stderr, "Function key.\n"); | ||
| 2714 | 2728 | ||
| 2715 | for(kp = key; kp < key + LEN(key); kp++) { | 2729 | for(kp = key; kp < key + LEN(key); kp++) { |
| 2716 | mask = kp->mask; | 2730 | mask = kp->mask; |
