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

Support mice that have more than 3 buttons and more than 1 wheel

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Unresolved
    • P4
    • tbd
    • fx2.0
    • javafx
    • Windows 7 64, Java 7 EA b144, Java FX b30

    Description

      Note: I've seen that mousewheel events are currently missing from 2.0 but are part of a planned additionnal event for nodes.

      Reminder: the method java.awt.MouseInfo.getNumberOfButtons() returns the number of buttons of the main mouse.

      Unlike AWT/Swing, you have the opportunity to rethink mouse and mousewheel event from scratch and add support for mice with more than 3 buttons. Its quite common nowadays to find mice, especially on gamers' PC, with 4~8 buttons. Some of them (ie: some Microsoft or Logithech mice) may even have more than 1 wheel or 1 wheel with 2 axis (instead of just 1).
      It's even possible than there may be several mice on some system (ie: a laptop with a touchpad and a USB mouse attached to it).

      Suggestion:

      - expand the javafx.scene.input.MouseButton enum to define more buttons. Keep MIDDLE, NONE, PRIMARY and SECONDARY and add BUTTON_1 to BUTTON_10 (or more if you think this is needed). An additionnal method needs to be added to the enum to match PRIMARY to BUTTON_1, MIDDLE to BUTTON_2 and SECONDARY to BUTTON (on a 3-buttons mouse; would that be different on a 2-buttons mouse?).

      - allow future mouse wheel support to recognize more than 1 wheel (2 wheels for a single wheel with 2 axis?).

      Attachments

        Activity

          People

            Unassigned Unassigned
            fbouyajfx Fabrice Bouyé (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Imported: