InputClick

Description

struct Tinman.Engine.Application.InputClick

Wraps an input click (mouse or keyboard) with optional modifiers.

The ToString method returns a human-readable shortcut title (using ApplicationUtil.NameOf1). If IsNone returns true, the shortcut title will be the empty string.

Public / Constants

None


public static readonly attribute None → (InputClick)

Invalid input click (will never be triggered).

Public / Constructors

InputClick

2 overloads


public constructor InputClick1 → (2)

button in : MouseButton

The mouse button.

modifier opt : InputModifiers = InputModifiers.None

The input modifiers.

Creates a new instance of InputClick.


public constructor InputClick2 → (2)

key in : KeyboardKey

The keyboard key.

modifier opt : InputModifiers = InputModifiers.None

The input modifiers.

Creates a new instance of InputClick.

Public / Methods

Clicked


public method Clicked → (1)

inputEvent in : InputEvent

The input event.

returns → bool

true if this input click is triggered, false if not.

Is this input click triggered by the given input event?

ToString


public override method ToString → ()

returns → string

The string representation.

Returns the string representation of this value.

The string representation has the following form:

(CTRL '+')? (SHIFT '+')? (ALT '+')? KEY? BUTTON?

where the placeholders have the following meaning:

Public / Attributes

Button


public readonly attribute Button → (MouseButton)

The mouse button or MouseButton.None if this is a keyboard click.

IsNone


public attribute IsNone → (get)

value : bool

true if this is an invalid input click, false if it is valid.

Is this an invalid input click (see None)?

Key


public readonly attribute Key → (KeyboardKey)

The keyboard key or KeyboardKey.None if this is a mouse click.

Modifier


public readonly attribute Modifier → (InputModifiers)

The click modifiers.