LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: NateS on December 06, 2009, 04:07:36

Title: LWJGL just for mouse capture?
Post by: NateS on December 06, 2009, 04:07:36
I have an app that doesn't use OpenGL:
http://code.google.com/p/pg3b/
I have the need to make the mouse disappear and to disable keyboard input until a hot key is pressed. I can probably handle the keyboard in Swing, as long as my app has focus. Would I be able to capture the mouse with LWJGL so that it can't be seen and the user can't click to focus another window?
Title: Re: LWJGL just for mouse capture?
Post by: kappa on December 06, 2009, 14:54:00
your unlikely to be able to use mouse capture without the lwjgl's Display window, since its mouse and keyboard classes are pretty much tied to that.

a rather long shot you could try is a 1*1 pixel lwjgl window using lwjgl's setParent to embed it into swing and then catch the mouse, it might work.