org.gnome.gdk

## Class MouseButton

- Object
- - org.freedesktop.bindings.Constant
  - - org.gnome.gdk.MouseButton

-     public class MouseButton
      extends org.freedesktop.bindings.Constant

  Constants representing which mouse button was pressed.

  Note that mouse buttons 4 to 7 have not a corresponding constant. These buttons refer to mouse wheel actions, directions up, down, left and right, respectively. GDK will present such events as a `Widget.ScrollEvent`, so if you are interested on them you will need to `connect()` to such event.

  Since:
    4.0.6
  Author:
    Andrew Cowie, Vreixo Formoso

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static MouseButton` | `BACK` Mouse button `8`.
    `static MouseButton` | `FORWARD` Mouse button `9`.
    `static MouseButton` | `LEFT` A "left click", mouse button `1`.
    `static MouseButton` | `MIDDLE` A "centre click", mouse button `2`.
    `static MouseButton` | `RIGHT` A "right click", mouse button `3`.

  - ### Method Summary

    - ### Methods inherited from class org.freedesktop.bindings.Constant

      `toString`

    - ### Methods inherited from class Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### BACK

          public static final MouseButton BACK

      Mouse button `8`. It corresponds to the button typically mapped to the "back" action, for example on web browsers. Note that many mice do not have a BACK button, so if you plan to add an application action to this button, do not forget to ensure it can be also executed by other means, such a key press, ToolButton, etc
      Since:
        4.0.12

    - #### FORWARD

          public static final MouseButton FORWARD

      Mouse button `9`. It corresponds to the button typically mapped to the "forward" action, for example on web browsers. Note that many mice do not have a FORWARD button, so if you plan to add an application action to this button, do not forget to ensure it can be also executed by other means, such a key press, ToolButton, etc
      Since:
        4.0.12

    - #### LEFT

          public static final MouseButton LEFT

      A "left click", mouse button `1`.
      Since:
        4.0.6

    - #### MIDDLE

          public static final MouseButton MIDDLE

      A "centre click", mouse button `2`. Some mice don't have a middle button; in such cases your X server may be configured to generate the middle button press if you press both right and left simultaneously. Mice with scroll wheels will often generated this button if the wheel is clicked (not scrolled, but pressed).
      Since:
        4.0.6

    - #### RIGHT

          public static final MouseButton RIGHT

      A "right click", mouse button `3`.
      Since:
        4.0.6