Thread: [GD-Linux] X mouse/keyboard grabs
Brought to you by:
vexxed72
From: Timothee B. <tt...@id...> - 2003-01-19 13:49:52
|
Hey everyone I am playing with X keyboard/mouse grabs stuff for our next game. Wondering if there's a way to configure the X server (or anything else) so that even with the grabs on in the game you could do a key combo forcing mouse/keyboard release on the application? For instance during a long load, or on a gdb breakpoint etc. TTimo |
From: Thatcher U. <tu...@tu...> - 2003-01-19 15:23:02
|
On Jan 19, 2003 at 02:49 +0100, Timothee Besset wrote: > Hey everyone > > I am playing with X keyboard/mouse grabs stuff for our next game. > Wondering if there's a way to configure the X server (or anything else) so > that even with the grabs on in the game you could do a key combo forcing > mouse/keyboard release on the application? For instance during a long > load, or on a gdb breakpoint etc. I don't have an answer, but I'm curious: are you using SDL? Once I started using SDL I (gladly) forgot all the X I had learned. -- Thatcher Ulrich http://tulrich.com |
From: Timothee B. <tt...@id...> - 2003-01-19 15:30:12
|
Not using SDL. It's not an interesting option for us. TTimo On Sun, 19 Jan 2003 10:18:53 -0500 "Thatcher Ulrich" <tu...@tu...> wrote: > On Jan 19, 2003 at 02:49 +0100, Timothee Besset wrote: > > Hey everyone > > > > I am playing with X keyboard/mouse grabs stuff for our next game. > > Wondering if there's a way to configure the X server (or anything else) so > > that even with the grabs on in the game you could do a key combo forcing > > mouse/keyboard release on the application? For instance during a long > > load, or on a gdb breakpoint etc. > > I don't have an answer, but I'm curious: are you using SDL? Once I > started using SDL I (gladly) forgot all the X I had learned. > > -- > Thatcher Ulrich > http://tulrich.com > > > ------------------------------------------------------- > This SF.NET email is sponsored by: FREE SSL Guide from Thawte > are you planning your Web Server Security? Click here to get a FREE > Thawte SSL guide and find the answers to all your SSL security issues. > http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en > _______________________________________________ > Gamedevlists-linux mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-linux > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=554 > |
From: D. S. <st...@at...> - 2003-01-19 22:06:39
|
Timothee Besset wrote: > Hey everyone > > I am playing with X keyboard/mouse grabs stuff for our next game. > Wondering if there's a way to configure the X server (or anything else) so > that even with the grabs on in the game you could do a key combo forcing > mouse/keyboard release on the application? For instance during a long > load, or on a gdb breakpoint etc. You might be able to do something that fakes it. There is a rather old but fun utility program you can look at to see what I'm talking about, called x2x. It simply allows a pointer device and keyboard from a 2nd X11 machine to take control of the first machine, but not interfere with the mouse/keyboard of the first machine. It is sort of a poor man's version of Xinerama across two machines, without the copy/paste or other nice things of Xinerama. Basically, even if you can't alter the one device (and you might be able to, I don't know), perhaps you could create two virtual pointer devices, and have the hardware switch which device it talks to at the moment (this would require that mouse and keyboard device events are what are grabbed, and *not* the pointer itself...if the pointer is free to do what it likes, and the mouse/keyboard bindings are not, then tell your mouse/keyboard to attach to a different virtual device which is not limited). Only the first device would have the grab events applied to it. See: http://gatekeeper.dec.com/pub/DEC/SRC/x2x/ D. Stimits, stimits AT attbi DOT com |
From: Timothee B. <tt...@id...> - 2003-01-20 13:57:29
|
I see two things required to achieve what I want: - Even with an application grab of keyboard/mouse, I need to get a key combo through .. typically to a deamon. If the X server can't do that (which is why I was asking), I could probably get it through with sysctl at kernel level. - Once you *know* you need to release the grabs, how do you do it? Any way an X app can force a grab release on some other app? (That one might be harder to tackle) TTimo On Sun, 19 Jan 2003 15:08:11 -0700 "D. Stimits" <st...@at...> wrote: > Timothee Besset wrote: > > > Hey everyone > > > > I am playing with X keyboard/mouse grabs stuff for our next game. > > Wondering if there's a way to configure the X server (or anything else) so > > that even with the grabs on in the game you could do a key combo forcing > > mouse/keyboard release on the application? For instance during a long > > load, or on a gdb breakpoint etc. > > > You might be able to do something that fakes it. There is a rather old > but fun utility program you can look at to see what I'm talking about, > called x2x. It simply allows a pointer device and keyboard from a 2nd > X11 machine to take control of the first machine, but not interfere with > the mouse/keyboard of the first machine. It is sort of a poor man's > version of Xinerama across two machines, without the copy/paste or other > nice things of Xinerama. Basically, even if you can't alter the one > device (and you might be able to, I don't know), perhaps you could > create two virtual pointer devices, and have the hardware switch which > device it talks to at the moment (this would require that mouse and > keyboard device events are what are grabbed, and *not* the pointer > itself...if the pointer is free to do what it likes, and the > mouse/keyboard bindings are not, then tell your mouse/keyboard to attach > to a different virtual device which is not limited). Only the first > device would have the grab events applied to it. See: > http://gatekeeper.dec.com/pub/DEC/SRC/x2x/ > > D. Stimits, stimits AT attbi DOT com > > > > ------------------------------------------------------- > This SF.NET email is sponsored by: FREE SSL Guide from Thawte > are you planning your Web Server Security? Click here to get a FREE > Thawte SSL guide and find the answers to all your SSL security issues. > http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en > _______________________________________________ > Gamedevlists-linux mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-linux > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=554 > |
From: Timothee B. <tt...@id...> - 2003-01-20 21:03:38
|
Sweet! Exactly what I was looking for.. TTimo On Mon, 20 Jan 2003 18:38:04 +0100 "Marcelo E. Magallon" <mar...@bi...> wrote: > I'm sorry, sourceforge is being a bitch... > > On Mon, Jan 20, 2003 at 02:57:01PM +0100, Timothee Besset wrote: > > > - Even with an application grab of keyboard/mouse, I need to get a > > key combo through .. typically to a deamon. If the X server can't do > > that (which is why I was asking), I could probably get it through > > with sysctl at kernel level. > > Thou wish and thy gods shall grant... > > $ man XF86Config > > Option "AllowDeactivateGrabs" "boolean" > This option enables the use of the > Ctrl+Alt+Keypad-Divide key sequence to deactivate any > active keyboard and mouse grabs. Default: off. > > > - Once you *know* you need to release the grabs, how do you do it? Any way > > an X app can force a grab release on some other app? (That one might be > > harder to tackle) > > You can force an app to ungrab the pointer/keyboard by unmapping its > window. If you don't want to do that, you can just map an appropiate > window (override-something-or-another, can't remember) over the app. > > -- > Marcelo, betting this mail won't make it thru... > |