aboutsummaryrefslogtreecommitdiff
path: root/st.c
diff options
context:
space:
mode:
Diffstat (limited to 'st.c')
-rw-r--r--st.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/st.c b/st.c
index dbbc1f6..ca4248a 100644
--- a/st.c
+++ b/st.c
@@ -2699,18 +2699,22 @@ kmap(KeySym k, uint state) {
2699 2699
2700 if(kp->k != k) 2700 if(kp->k != k)
2701 continue; 2701 continue;
2702 if((state & mask) != mask && 2702
2703 if((state & mask) != mask ||
2703 (mask == XK_NO_MOD && state)) { 2704 (mask == XK_NO_MOD && state)) {
2704 continue; 2705 continue;
2705 } 2706 }
2707
2706 if((kp->appkey < 0 && IS_SET(MODE_APPKEYPAD)) || 2708 if((kp->appkey < 0 && IS_SET(MODE_APPKEYPAD)) ||
2707 (kp->appkey > 0 && !IS_SET(MODE_APPKEYPAD))) { 2709 (kp->appkey > 0 && !IS_SET(MODE_APPKEYPAD))) {
2708 continue; 2710 continue;
2709 } 2711 }
2712
2710 if((kp->appcursor < 0 && IS_SET(MODE_APPCURSOR)) || 2713 if((kp->appcursor < 0 && IS_SET(MODE_APPCURSOR)) ||
2711 (kp->appcursor > 0 && !IS_SET(MODE_APPCURSOR))) { 2714 (kp->appcursor > 0 && !IS_SET(MODE_APPCURSOR))) {
2712 continue; 2715 continue;
2713 } 2716 }
2717
2714 if((kp->crlf < 0 && IS_SET(MODE_CRLF)) || 2718 if((kp->crlf < 0 && IS_SET(MODE_CRLF)) ||
2715 (kp->crlf > 0 && !IS_SET(MODE_CRLF))) { 2719 (kp->crlf > 0 && !IS_SET(MODE_CRLF))) {
2716 continue; 2720 continue;
@@ -2718,6 +2722,7 @@ kmap(KeySym k, uint state) {
2718 2722
2719 return kp->s; 2723 return kp->s;
2720 } 2724 }
2725
2721 return NULL; 2726 return NULL;
2722} 2727}
2723 2728