Table of Contents

Enum MouseFlags

Namespace
Terminal.Gui.Input
Assembly
Terminal.Gui.dll

Mouse flags reported in Mouse.

[Flags]
public enum MouseFlags

Fields

AllEvents = 134217727

Mask that captures all the events.

Alt = 67108864

Flag: the alt key was pressed when the mouse button took place.

Button4Clicked = 1048576

The fourth mouse button was clicked.

Button4DoubleClicked = 2097152

The fourth mouse button was double-clicked.

Button4Pressed = 524288

The fourth mouse button was pressed.

Button4Released = 262144

The fourth mouse button was released.

Button4TripleClicked = 4194304

The fourth mouse button was triple-clicked.

Ctrl = 16777216

Flag: the ctrl key was pressed when the mouse button took place.

LeftButtonClicked = 4

The first mouse button was clicked (press+release).

LeftButtonDoubleClicked = 8

The first mouse button was double-clicked.

LeftButtonPressed = 2

The first mouse button was pressed.

LeftButtonReleased = 1

The first mouse button was released.

LeftButtonTripleClicked = 16

The first mouse button was triple-clicked.

MiddleButtonClicked = 256

The second mouse button was clicked (press+release).

MiddleButtonDoubleClicked = 512

The second mouse button was double-clicked.

MiddleButtonPressed = 128

The second mouse button was pressed.

MiddleButtonReleased = 64

The second mouse button was released.

MiddleButtonTripleClicked = 1024

The second mouse button was triple-clicked.

None = 0

No mouse event. This is the default value for Flags when no mouse event is being reported.

PositionReport = 134217728

The mouse position is being reported in this event.

RightButtonClicked = 16384

The third mouse button was clicked (press+release).

RightButtonDoubleClicked = 32768

The third mouse button was double-clicked.

RightButtonPressed = 8192

The third mouse button was pressed.

RightButtonReleased = 4096

The third mouse button was released.

RightButtonTripleClicked = 65536

The third mouse button was triple-clicked.

Shift = 33554432

Flag: the shift key was pressed when the mouse button took place.

WheeledDown = 536870912

Vertical button wheeled down.

WheeledLeft = Ctrl | WheeledUp

Vertical button wheeled up while pressing Ctrl.

WheeledRight = Ctrl | WheeledDown

Vertical button wheeled down while pressing Ctrl.

WheeledUp = 268435456

Vertical button wheeled up.

Remarks

This enum provides both numbered button flags (LeftButton, MiddleButton, RightButton, Button4) and semantic aliases (LeftButton, MiddleButton, RightButton) for improved code readability. The numbered flags follow the ncurses convention, while the semantic aliases map to the standard mouse button layout: LeftButton = Left, MiddleButton = Middle, RightButton = Right, Button4 = Extra/XLeftButton.

Each button supports multiple event types: Pressed, Released, Clicked, DoubleClicked, and TripleClicked. Additionally, modifier flags (ButtonShift, ButtonCtrl, ButtonAlt) can be combined with button events using bitwise OR operations.