enum

TermBuf::Input::Mouse::Button

Inherits Enum < Comparable < Value < Object

Which button, with the wheel counted as four of them because that is how the terminal reports it: a wheel notch is a press and there is no release to match it.

None is the button field of a report with no button held, which is what a bare motion carries and what most terminals send for a release.

Constants

Left = 0
Middle = 1
Right = 2
None = 3

No button: a motion with nothing held, and the release a terminal that does not say which button was let go sends.

WheelUp = 4
WheelDown = 5
WheelLeft = 6

Horizontal wheel, or a trackpad's sideways scroll.

WheelRight = 7

Horizontal wheel, or a trackpad's sideways scroll.

Button8 = 8
Button9 = 9
Button10 = 10
Button11 = 11

Instance methods

button10?

Returns true if this enum value equals Button10

Source
button11?

Returns true if this enum value equals Button11

Source
button8?

Returns true if this enum value equals Button8

Source
button9?

Returns true if this enum value equals Button9

Source
left?

Returns true if this enum value equals Left

Source
middle?

Returns true if this enum value equals Middle

Source
none?

Returns true if this enum value equals None

Source
right?

Returns true if this enum value equals Right

Source
wheel?

Whether this is a wheel notch rather than a button, which matters because a notch has no release and holding it means nothing.

Source
wheel_down?

Returns true if this enum value equals WheelDown

Source
wheel_left?

Returns true if this enum value equals WheelLeft

Source
wheel_right?

Returns true if this enum value equals WheelRight

Source
wheel_up?

Returns true if this enum value equals WheelUp

Source