I'm a vim/nvim user, and xcape has become for me a key feature in the last years.
I use it in combination with gnome-tweaks (new package name, on previous version was gnome-tweak-tool) in order to:
- use
CapsLockas aCtrlin combination with another key - use
CapsLockas anEscwhen i use it alone.
The xcape command that I use is:
xcape -e 'Caps_Lock=Escape'
after I moved from Ubuntu 20.04 to Ubuntu 22.04 this command is not working anymore as expected.
When I run xcape -d I noticed that:
- Ubuntu 20.04 every key event is intercepted no matter in which windows i am.
- Ubuntu 22.04 key event from terminal/Text editor/Files is not intercepted, but when I'm on Chrome they are.
Does anyone knows the reason of this behavior? It is very annoying!
Thank you in advance for the help!
Edit:
The answer of @vanadium helped me to get xcape -d to work again.
Unfortunately the autostart service that I used is not working anymore:
[Desktop Entry]
Type=Application
Exec=xcape -e 'Caps_Lock=Escape'
Name=Keyboard Setup
Comment=Custom keyboard setup
After some researches and tries I finally got it to work just updating the entry in this way:
[Desktop Entry]
Type=Application
Exec=xcape -d
Terminal=false
Name=Keyboard Setup
Comment=Custom keyboard setup
X-GNOME-Autostart-enabled=true
In the beginning I tried to fork the process with nohup xcape -d & and create a system service with not much success.
