Juke of York Jan 5 @ 6:49am
Xmodmap to swap Esc/Caps not working when in Dota 2
I have my Escape and Caps Lock keys swapped, because I use Escape like 100 times more often than Caps Lock, and Escape is in a very inconvenient place.
It works fine usually, but not in Dota 2.

Here is my .Xmodmap file:
remove Lock = Caps_Lock
keysym Escape = Caps_Lock
keysym Caps_Lock = Escape
add Lock = Caps_Lock

I've also tried this:
keycode 66 = Caps_Lock
keycode 9 = Escape
remove Lock = Caps_Lock
add Lock = Escape
keycode 9 = Caps_Lock
keycode 66 = Escape

Both of these work perfectly out of Dota 2.
But when I am in Dota 2 and I hit Caps Lock (which is bound to escape, so it should register an Escape) it thinks I am still pressing Caps Lock!
Strangely, the Caps Lock light is still toggled by my Escape key, in and out of Dota 2.


Tips, suggestions and workarounds welcome
Thanks!