I'm on a 20.04 Ubuntu machine.
I've been trying to use a combination of setxkmap and xcape to map AltGr and escape onto my caps-lock key, where a quick key press acts as escape and a longer key press acts as AltGr.
I believed the desired behavior could be achieved by executing the following:
$ setxkbmap -option lv3:caps_switch
$ xcape -e 'Caps_Lock=Escape' -t 300
Once the setxkbmap command is executed however, the xcape process/daemon no longer makes caps-lock act as escape when tapped. I'm not entirely sure why since the xcape process is still running, so I might just simply be oblivious to how setxkbmap works (I tried executing the commands in a different order, with the same result).
How would I go about achieving the desired behavior?
Why does setxkbmap 'silence' the xcape daemon regardless of whether I execute xcape before/after executing the setxkbmap command?