Table of Contents

Struct Keybind

Namespace
Whim
Assembly
Whim.dll
public readonly record struct Keybind : IKeybind, IEquatable<Keybind>
Implements
Inherited Members
Extension Methods

Constructors

Keybind(KeyModifiers, VIRTUAL_KEY)

Creates a new keybind.
public Keybind(KeyModifiers modifiers, VIRTUAL_KEY key)

Parameters

modifiers KeyModifiers
The modifiers for the keybind.
key VIRTUAL_KEY
The key for the keybind.

Properties

Key

See https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes
public VIRTUAL_KEY Key { get; }

Property Value

VIRTUAL_KEY

Modifiers

Modifiers like Alt, Ctrl, and Win.
public KeyModifiers Modifiers { get; }

Property Value

KeyModifiers

Methods

FromString(string)

Tries to parse a keybind from a string.
public static IKeybind? FromString(string keybind)

Parameters

keybind string
The string to parse.

Returns

IKeybind
The parsed keybind, if successful; otherwise, null.

ToString()

Returns the fully qualified type name of this instance.
public override string ToString()

Returns

string
The fully qualified type name.

ToString(bool)

Returns a string representation of the keybind.
public string ToString(bool unifyKeyModifiers)

Parameters

unifyKeyModifiers bool
Whether to treat key modifiers like `LWin` and `RWin` as the same. See UnifyKeyModifiers.

Returns

string