aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.def.h6
-rw-r--r--st.c14
2 files changed, 20 insertions, 0 deletions
diff --git a/config.def.h b/config.def.h
index 7a7262c..c0519a8 100644
--- a/config.def.h
+++ b/config.def.h
@@ -88,6 +88,12 @@ static Shortcut shortcuts[] = {
88 * position for a key. 88 * position for a key.
89 */ 89 */
90 90
91/*
92 * If you want something else but the function keys of X11 (0xFF00 - 0xFFFF)
93 * mapped below, add them to this array.
94 */
95static KeySym mappedkeys[] = { -1 };
96
91/* key, mask, output, keypad, cursor, crlf */ 97/* key, mask, output, keypad, cursor, crlf */
92static Key key[] = { 98static Key key[] = {
93 /* keysym mask string keypad cursor crlf */ 99 /* keysym mask string keypad cursor crlf */
diff --git a/st.c b/st.c
index 477a8f8..02ef411 100644
--- a/st.c
+++ b/st.c
@@ -2711,6 +2711,20 @@ char*
2711kmap(KeySym k, uint state) { 2711kmap(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;