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
KeyModifiersunifyKeyModifiers
bool- Whether to treat key modifiers like `LWin` and `RWin` as the same. See UnifyKeyModifiers.
Returns
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
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
UnifyModifiers(IKeybind)
Returns a new IKeybind, with the right modifiers replaced with left
modifiers.
public static IKeybind UnifyModifiers(this IKeybind keybind)
Parameters
keybind
IKeybind