1

I have a script to:

  1. Set the keyboard layout to include accents

  2. Set capslock as mod when held

  3. Set capslock as escape when pressed

It looks like this:

setxkbmap -rules evdev -model evdev -layout us -variant altgr-intl &
sleep 1
xmodmap ~/.Xmodmap &
sleep 1
killall -q xcape &
xcape -e "Hyper_L=Escape" &

Those sleep are there because otherwise it doesn't work well. I don't understand why and I'd love to. In addition to that, sometimes the escape part of it just stops working, and I have to relaunch the script. I'm not exactly sure what triggers this but it is annoying.

1 Answer 1

0

It seams you get a race collision if you put every command in the background (& at the end of line). Delete these & and the commands will be executed one after the other.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .