X-Git-Url: https://git.xinqibao.xyz/st.git/blobdiff_plain/90e1427632d6c5852d10c8d2bafa787012903eb9..0df350cd0b64f83fbc2324bb2a1bc04b51e657e0:/st.c diff --git a/st.c b/st.c index 477a8f8..db21901 100644 --- a/st.c +++ b/st.c @@ -89,10 +89,6 @@ enum glyph_attribute { }; enum cursor_movement { - CURSOR_UP, - CURSOR_DOWN, - CURSOR_LEFT, - CURSOR_RIGHT, CURSOR_SAVE, CURSOR_LOAD }; @@ -2711,6 +2707,17 @@ 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) + break; + } + if(i == LEN(mappedkeys)) { + if((k & 0xFFFF) < 0xFF00) + return NULL; + } for(kp = key; kp < key + LEN(key); kp++) { mask = kp->mask;