Table of Contents

Class KeyModifiersExtensions

Namespace
Whim
Assembly
Whim.dll
Extension methods for KeyModifiers.
public static class KeyModifiersExtensions
Inheritance
KeyModifiersExtensions
Inherited Members

Methods

GetParts(KeyModifiers, bool)

Get an IEnumerable<T> of KeyModifiers names, ordered by how keybindings are normally shown.
public static IEnumerable<string> GetParts(this KeyModifiers modifiers, bool unifyKeyModifiers)

Parameters

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

Returns

IEnumerable<string>

TryParseKeyModifier(string, out KeyModifiers)

Tries to parse a key modifier from a string.
public static bool TryParseKeyModifier(this string modifier, out KeyModifiers keyModifier)

Parameters

modifier string
The string to parse. This is case-insensitive.
keyModifier KeyModifiers
The parsed key modifier, if successful.

Returns

bool
true if the parse was successful; otherwise, false.

Unify(KeyModifiers)

Returns a new KeyModifiers, with the right modifiers replaced with left modifiers.
public static KeyModifiers Unify(this KeyModifiers modifiers)

Parameters

modifiers KeyModifiers

Returns

KeyModifiers

UnifyModifiers(IKeybind)

Returns a new IKeybind, with the right modifiers replaced with left modifiers.
public static IKeybind UnifyModifiers(this IKeybind keybind)

Parameters

keybind IKeybind

Returns

IKeybind