You are not logged in.
I've been gaming a lot of native linux games (especially the Humble Bundle ones), and a great deal of them tend to grab the all the keyboard and mouse keys/buttons.
This means that NO keys work; for example, I've a mouse with lots of buttons, and some of these control my volume (via xbindkeys). Some media keys on my keyboard do this as well, and control vlc play/stop (also via xbindkeys), and some other switch desktop, minimize, etc (via compiz keybinds).
Is there a way to keep these games for grabbing these keys/mouse-buttons? I kind of lose control of my desktop while they're running. I belive they grab the mouse entirely somehow, though I must admit, I'm not an expert on this area.
Offline
I've made two AUR packages for this:
https://aur.archlinux.org/packages.php? … _Search=Go
I'm just using libx11-nokeyboardgrab now, so I let the sdl one go unmaintained.
libx11-nokeyboardgrab is incompatible with dmenu (edit: and password screensavers), but works with everything (also dialog pop-ups).
sdl-nokeyboardgrab doesn't grab non-sdl programs (Virtualbox, maybe Wine, I haven't tested it).
It doesn't prevent mouse grab, because that's necessary for FPS games and Virtualbox mouse mode.
I have thought of adding in a mechanism where the mouse is only grabbed on some condition. Like the existence of a "/tmp/grabmouse" file. But I've been fine without it.
One problem that occurs even with mouse grab enabled is that when the game loses focus, it loses the mouse grab too. When you switch back to the game, you need to do something to make it re-grab the mouse.
For instance in Urban Terror (FPS), when you switch back to the game, the mouse behaves erratic until you press ~ for Console (which normally ungrabs the mouse) and then press it again.
Last edited by Procyon (2012-01-23 20:14:08)
Offline
Some of this info is already available in the wiki https://wiki.archlinux.org/index.php/Ga … d_Grabbing .
Procyon, if you think that something important is missing, could you please add it to the article? That section could use some expansion or tips.
Thanks :-)
Offline