LWJGL Forum

Programming => LWJGL Documentation => Topic started by: Pathogen on November 13, 2009, 04:22:37

Title: Mouse not detected properly
Post by: Pathogen on November 13, 2009, 04:22:37
Hello,

I've run into a problem with mouse detection, where the three button 'mouse' on my laptop (thinkpad r51) is identified as having only two buttons. It might be a hardware specific bug, external USB mice are identified properly when I plug those in.

Specifically I'm using a package called xith3d that includes lwjgl, the dev there traced the bug to the lwjgl. You can read the thread over there. (http://xith.org/forum/index.php/topic,1531.0.html) Sorry I don't have more for you to go on for this one. Thanks for any help.
Title: Re: Mouse not detected properly
Post by: Matzon on November 13, 2009, 08:44:15
we are using http://msdn.microsoft.com/en-us/library/ms724385%28VS.85%29.aspx and SM_CMOUSEBUTTONS to get the number of buttons - at least on windows:

http://java-game-lib.svn.sourceforge.net/viewvc/java-game-lib/trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsMouse.java?revision=3116&view=markup&pathrev=3241

not sure what we can do about that ...

and just to be certain - the exception in the thread you linked to is not in LWJGL.
Title: Re: Mouse not detected properly
Post by: Pathogen on November 15, 2009, 03:08:42
Yep, the exception isn't in lwjgl, but the reason for it is the misreported number of mouse buttons.

I've just checked the output of windows' GetSystemMetrics function for myself, and it does indeed report only 2 mouse buttons on my 3 button thinkpad =/. Not sure what I'm going to do about that!
Title: Re: Mouse not detected properly
Post by: Evil-Devil on December 09, 2009, 16:30:26
Maybe a driver issue. Have you installed proper device drivers for the mouse?  I remember MS IPoint were you could set your mouse to any other...like treating a 5 button mouse as a 2 button mouse x_X