alols / xcape

Linux utility to configure modifier keys to act as other keys when pressed and released on their own.
GNU General Public License v3.0
2.1k stars 115 forks source link

no curly brace? get bracket instead (`[` when expecting `{`) #140

Closed WillForan closed 1 year ago

WillForan commented 1 year ago

bracketleft and braceleft both yield [

xcape -e 'Control_L=bracketleft;Control_R=braceleft' -t 150
# or
xcape -e 'Control_L=0x005B;Control_R=0x007B' -t 150
# for either xcape command:  '[' is sent when tapping either control 

I'm using keysymdef.h and xdotool to confirm which is which (and that they are different). But I'm out of my depth on X11 syms. Hopefully, I'm just confused.

xdotool key braceleft key bracketleft
# output: '{['
grep -P brac.*left /usr/include/X11/keysymdef.h
#define XK_bracketleft                   0x005b  /* U+005B LEFT SQUARE BRACKET */
#define XK_braceleft                     0x007b  /* U+007B LEFT CURLY BRACKET */
WillForan commented 1 year ago

The solution is described directly in the readme! Sorry for the noise

 xcape -e 'Control_R=Shift_L|bracketleft'