On Thu, 13 Dec 2012, Roberto E. Vargas Caballero wrote:
Looking in the repository I can see that the commit 16ccf (Fix tab
key) inserted this code, and I have tested that is such commit it was
working, so we have a regression. I am going try now a bisection and
try locate which commit broken this key.
The bisect indicates that the commit whichs performs the regression is
2b652 (Optimizing the key lookup to the X11 function key), Which does
that if the event is smaller than 0xFF00, then the lookup is not
performed, but how we can see in keysymdef.h:
#define XK_ISO_Left_Tab 0xfe20
So the solution is modify the line 2731 of st.c (if((k & 0xFFFF) < 0xFF00)).
I will send a patch soon for this issue.
This can be fixed by changing in config.{,def.}h:
-static KeySym mappedkeys[] = { -1 };
+static KeySym mappedkeys[] = { XK_ISO_Left_Tab };
But, it's error-prone to have two places to keep track of what keys get
mapped. So, I fixed this for myself a while ago by removing mappedkeys
entirely. Patch attached.
--
Best,
Ben
From ba24e4423d423a16fe9f0344d2ce5e91100095ac Mon Sep 17 00:00:00 2001
From: "Benjamin R. Haskell" <[email protected]>
Date: Thu, 13 Dec 2012 07:25:47 -0500
Subject: [PATCH] Removes mappedkeys
---
config.def.h | 6 ------
st.c | 10 ----------
2 files changed, 0 insertions(+), 16 deletions(-)
diff --git a/config.def.h b/config.def.h
index 684adf7..a4a3bd0 100644
--- a/config.def.h
+++ b/config.def.h
@@ -94,12 +94,6 @@ static Shortcut shortcuts[] = {
* position for a key.
*/
-/*
- * If you want something else but the function keys of X11 (0xFF00 - 0xFFFF)
- * mapped below, add them to this array.
- */
-static KeySym mappedkeys[] = { -1 };
-
/* key, mask, output, keypad, cursor, crlf */
static Key key[] = {
/* keysym mask string keypad cursor crlf */
diff --git a/st.c b/st.c
index da5f78d..a6e4126 100644
--- a/st.c
+++ b/st.c
@@ -2722,16 +2722,6 @@ kmap(KeySym k, uint state) {
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;
--
1.7.8.4