aboutsummaryrefslogtreecommitdiff
path: root/st.c
diff options
context:
space:
mode:
authorChristoph Lohmann <20h@r-36.net>2012-11-14 06:37:24 +0100
committerChristoph Lohmann <20h@r-36.net>2012-11-14 06:37:24 +0100
commit461aac159cf3dbb8514e645df6387e03e7c26084 (patch)
tree29c87a558f3fd2e3789f0e01aa9c984e11c7fb08 /st.c
parent7474a2fc3785eb1aad00f8cf2b50711bbe1fff0b (diff)
downloadst-461aac159cf3dbb8514e645df6387e03e7c26084.tar.gz
st-461aac159cf3dbb8514e645df6387e03e7c26084.tar.bz2
st-461aac159cf3dbb8514e645df6387e03e7c26084.zip
Fixing the tab key, when no mask is wanted.
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) {
if(kp->k != k)
continue;
- if((state & mask) != mask &&
+
+ if((state & mask) != mask ||
(mask == XK_NO_MOD && state)) {
continue;
}
+
if((kp->appkey < 0 && IS_SET(MODE_APPKEYPAD)) ||
(kp->appkey > 0 && !IS_SET(MODE_APPKEYPAD))) {
continue;
}
+
if((kp->appcursor < 0 && IS_SET(MODE_APPCURSOR)) ||
(kp->appcursor > 0 && !IS_SET(MODE_APPCURSOR))) {
continue;
}
+
if((kp->crlf < 0 && IS_SET(MODE_CRLF)) ||
(kp->crlf > 0 && !IS_SET(MODE_CRLF))) {
continue;
@@ -2718,6 +2722,7 @@ kmap(KeySym k, uint state) {
return kp->s;
}
+
return NULL;
}