Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6856394

Support for more than three mouse buttons

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P5 P5
    • None
    • 7
    • client-libs
    • x86
    • windows_vista

      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.

            Unassigned Unassigned
            ndcosta Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: