How can I change focus when a game locks it?
Solution 1:
I had similar experience with Unreal Tournament 2004. Eventually I have found that pressing Esc (thus switching to game menu) released keyboard grab and I could alt-tab.
Unfortunately, lot of games seem to not behave in a desktop-friendly fashion, exclusively grabbing keyboard and mouse during the action. This effectively disables any interaction of the user with the desktop: he can't use his window manager (alt-tab is the most common example), he can't use his desktop-wide keyboard shortcuts (e.g. control music player), he can't answer IM, etc.
It looks like there is no clean solution to this issue, except that redesigning affected games themselves. (Though some hacks with forbidding keyboard grabs using LD_PRELOAD
may be relevant).