Re: [dev] [st] Shift Tab does not work
Greetings.
On Thu, 13 Dec 2012 20:46:11 +0100 "Benjamin R. Haskell" <suckless_AT_benizi.com> wrote:
> 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.
As said by Roberto, your patch will let st traverse the whole key array
on each keypress. That’s why the simple check was applied and if you re‐
ally want to map some other key – which is stated in the comment above
that one –, use this array. This is purely an optimisation to save CPU
cycles.
I’ve changed the check for the special keys so XK_ISO_Left_Tab is now
checked in the array. Thanks for the bug report.
Sincerely,
Christoph Lohmann
Received on Thu Dec 13 2012 - 20:46:11 CET
This archive was generated by hypermail 2.3.0
: Thu Dec 13 2012 - 21:12:05 CET