I have used this command to swap my Esc key with my CapsLock key:
gsettings set org.gnome.desktop.input-sources xkb-options "['caps:swapescape']"
This works syste-wide except for Steam games.
When I open a Steam game, CapsLock does not work, it does nothing. If I press Esc, I see the popup telling me the caps lock is on (or off).
Why CapsLock doesn’t act as Esc in Steam games?
Currently I have to reverse it when I play with steam as a workaround:
gsettings set org.gnome.desktop.input-sources xkb-options ""
Ever considered swapping them at a lower level (irrespective of the display server)?
There’s a great recent project at github called keyd. there’s also another one called cap2esc, but the latter is confined to the infamous swapping between cap and Esc key, whereas is the former has more generic use cases. This may not be addressing your very issue, but if you just want to “just work” , then this might come in handy.
Thanks, I set up keyd but still doesn’t work with Steam
We managed to have keyd achieve the task!
See here on how to configure it to have it work with Steam games.
@polendina thanks for the suggestion
Glad that it worked. You’re welcome!