Skip to content

KeyBinding

Namespace: Hex1b

Assembly: Hex1b.dll

A key binding: a key combined with optional modifier keys.

csharp
public readonly record struct KeyBinding : IEquatable<KeyBinding>

Implements

Constructors

KeyBinding(Hex1bKey, Hex1bModifiers)

A key binding: a key combined with optional modifier keys.

Parameters:

csharp
public KeyBinding(Hex1bKey Key, Hex1bModifiers Modifiers = Hex1bModifiers.None)

Properties

Key

The key.

Returns: Hex1bKey

csharp
public Hex1bKey Key { get; init; }

Modifiers

Required modifier keys. Defaults to .

Returns: Hex1bModifiers

csharp
public Hex1bModifiers Modifiers { get; init; }

Methods

Matches(Hex1bKeyEvent)

Checks if this binding matches the given key event.

Parameters:

Returns: Boolean

csharp
public bool Matches(Hex1bKeyEvent keyEvent)

Members

implicit operator KeyBinding(Hex1bKey)

Creates a key binding with no modifiers.

Parameters:

Returns: KeyBinding

csharp
public static implicit operator KeyBinding(Hex1bKey key)

Released under the MIT License.