Table of Contents

Enum MouseFlags

Namespace
SharpConsoleUI.Drivers
Assembly
SharpConsoleUI.dll

Specifies flags that describe mouse button states and events.

[Flags]
public enum MouseFlags

Fields

AllEvents = -1

Mask that captures all the events.

Button1Clicked = 4

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

Button1DoubleClicked = 8

The first mouse button was double-clicked.

Button1Pressed = 2

The first mouse button was pressed.

Button1Released = 1

The first mouse button was released.

Button1TripleClicked = 16

The first mouse button was triple-clicked.

Button2Clicked = 256

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

Button2DoubleClicked = 512

The second mouse button was double-clicked.

Button2Pressed = 128

The second mouse button was pressed.

Button2Released = 64

The second mouse button was released.

Button2TripleClicked = 1024

The second mouse button was triple-clicked.

Button3Clicked = 16384

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

Button3DoubleClicked = 32768

The third mouse button was double-clicked.

Button3Pressed = 8192

The third mouse button was pressed.

Button3Released = 4096

The third mouse button was released.

Button3TripleClicked = 65536

The third mouse button was triple-clicked.

Button4Clicked = 1048576

The fourth button was clicked (press+release).

Button4DoubleClicked = 2097152

The fourth button was double-clicked.

Button4Pressed = 524288

The fourth mouse button was pressed.

Button4Released = 262144

The fourth mouse button was released.

Button4TripleClicked = 4194304

The fourth button was triple-clicked.

ButtonAlt = 67108864

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

ButtonCtrl = 16777216

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

ButtonShift = 33554432

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

MouseEnter = 1073741824

The mouse entered the control area.

MouseLeave = -2147483648

The mouse left the control area.

None = 0

No mouse event

ReportMousePosition = 134217728

The mouse position is being reported in this event.

WheeledDown = 536870912

Vertical button wheeled down.

WheeledLeft = ButtonCtrl | WheeledUp

Vertical button wheeled up while pressing ButtonCtrl.

WheeledRight = ButtonCtrl | WheeledDown

Vertical button wheeled down while pressing ButtonCtrl.

WheeledUp = 268435456

Vertical button wheeled up.

Remarks

This enumeration supports a bitwise combination of its member values, allowing multiple mouse states to be represented simultaneously.

Button numbers correspond to: Button1 (left), Button2 (middle), Button3 (right), Button4 (extended).

Code adapted from Terminal.Gui - https://github.com/gui-cs/Terminal.Gui