You are not logged in.

#1 2019-07-15 15:05:36

sairuiu
Member
Registered: 2019-05-18
Posts: 27

[SOLVED] Strange localectl/xcape interaction

I want to bind my caps lock key to super, and also use xcape to make super behave like escape when pressed. I used the following to set my keyboard configuration:

# localectl set-x11-keymap jp "" "" caps:super
$ localectl
   System Locale: LANG=C
       VC Keymap: jp106
      X11 Layout: jp
     X11 Options: caps:super

And my .xinitrc contains:

xcape -e "Super_L=Escape"

On login, caps lock behaves as a super key but does not work as escape. However, the actual super key does have the xcape functionality. After pressing the actual super key once, the caps lock key will obey the xcape functionality. Is there any way to enable this behaviour from the beginning?

I've tried adding an additional xcape command to make caps lock an xcape escape key as well. This works on the first press, but then reverts to being only a super key until the actual left super key is pressed (as above).

Last edited by sairuiu (2022-04-15 05:06:13)

Offline

#2 2022-04-10 07:45:56

sairuiu
Member
Registered: 2019-05-18
Posts: 27

Re: [SOLVED] Strange localectl/xcape interaction

The fix was to run setxkbmap once prior to running xcape in .xinitrc.

$ cat ~/.xinitrc
# ...
setxkbmap -option caps:super
xcape -e "Super_L=Escape"
# ...

Offline

Board footer

Powered by FluxBB