JDK-6856394 : Support for more than three mouse buttons
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7
  • Priority: P5
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_vista
  • CPU: x86
  • Submitted: 2009-07-01
  • Updated: 2011-02-16
  • Resolved: 2009-07-02
Related Reports
Duplicate :  
Description
A DESCRIPTION OF THE REQUEST :
I would like to ask for support for more than three mouse buttons. Currently, implementing a MouseListener will only allow an application to listen for events generated by the first three buttons.

JUSTIFICATION :
- For gamers, having a mouse with more than three buttons is the norm rather than the exception. I think if you want game programmers to even begin considering creating their new game in Java, more than three mouse buttons will have to be supported.

- The limit of three buttons seems artificial, especially since getButton() returns an integer rather than an enumerated type or a class. For a programming language that does such a good job at providing a sane OO framework, this seems like odd behavior.

- Under the current scheme, Java dictates what the three buttons on a mouse are. There are several controllers out there that may be loosely defined as a mouse, yet do not have the standard three buttons.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Regardless of how many mice a button has, each should at least generate a mouseClicked, mousePressed, and mouseReleased event.
ACTUAL -
Only the first three buttons of a mouse generate mouseClicked, mousePressed, and mouseReleased events.

Comments
EVALUATION I suppose the similar RFE already exists
02-07-2009