LWJGL Forum

Archive => Resolved Bugs/RFE => Topic started by: avm1979 on September 19, 2011, 16:37:05

Title: [FIXED] Mouse buttons beyond the first 3 don't work
Post by: avm1979 on September 19, 2011, 16:37:05
I'm getting multiple reports from players that mouse buttons beyond the first 3 (left, right, scrollwheel click) don't work - apparently, just not getting any events for those clicks with a org.lwjgl.input.Mouse.poll(). Using LWJGL 2.7.1, btw.

Couldn't verify this myself (only have a 3-button mouse atm), but searching around the forum I found these couple (http://lwjgl.org/forum/index.php/topic,3568.0.html) of threads (http://lwjgl.org/forum/index.php/topic,2496.0.html), but they were rather old so I thought I'd post a new one here.

Is this a known problem? Is there a chance of the extra mouse buttons getting recognized in a future release?

Any info would be greatly appreciated!
Title: Re: [BUG/RFE] Mouse buttons beyond the first 3 don't work
Post by: kappa on September 28, 2011, 22:06:52
just curious, which OS are you testing on? would allow narrowing down the issue a little more. A quick look at the windows implementation doesn't show any limit but the OS X implementation looks like it might be hardcoded for 3 buttons (left, right and middle).
Title: Re: [BUG/RFE] Mouse buttons beyond the first 3 don't work
Post by: avm1979 on October 04, 2011, 16:44:17
Hmm, it seems like they're actually running into it on Windows, but I'm not 100% sure.

I'll see if I can wrangle a mouse with some extra buttons to reproduce the issue.
Title: Re: [BUG/RFE] Mouse buttons beyond the first 3 don't work
Post by: avm1979 on October 05, 2011, 20:42:00
Ok, tested with this mouse (http://www.logitech.com/mice-pointers/mice/devices/5845) on Windows XP.

It's got a couple of extra buttons - back, forward, and zoom. The back and forward work (in the browser), but none of them seem to generate mouse events in LWJGL.
Title: Re: [BUG/RFE] Mouse buttons beyond the first 3 don't work
Post by: Bitza on December 17, 2011, 17:44:43
I'm having the same issue.

I've tried running the same code on both Linux and Windows using the same mouse, but only 3 buttons ever register (0, 1, and 2; that is left-click, right-click and middle-click) while my mouse has 8 available (a back and forward button that works with browsers and non-lwjgl games, as well as 3 bonus buttons near the mouse wheel). Here is my mouse: Link to mouse on newegg (http://www.newegg.com/Product/Product.aspx?Item=N82E16826104577).

When I call Mouse.getButtonCount() I get 8 on Windows, but only 3 on Linux.

Hopefully this information can help narrow the problem down some.
Title: Re: [BUG/RFE] Mouse buttons beyond the first 3 don't work
Post by: Matzon on January 29, 2012, 20:30:32
I comitted a change (r3734), please check on windows now. Should cover button 4 and 5. Not sure how to read 5+ buttons ...
Title: Re: [BUG/RFE] Mouse buttons beyond the first 3 don't work
Post by: kappa on February 01, 2012, 09:52:32
committed a change to fix the 3 mouse button limit on Linux too, which should now support mice with up to 256 buttons.

marking RFE as fixed.

(http://www.theinquirer.net/IMG/358/90358/warmouse-540x334.jpg?1260890223)