public class MouseButton
extends org.freedesktop.bindings.Constant
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.
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 . |
public static final MouseButton BACK
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, etcpublic static final MouseButton FORWARD
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, etcpublic static final MouseButton LEFT
1
.public static final MouseButton MIDDLE
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).public static final MouseButton RIGHT
3
.