Class KeysExtensions
A set of extension methods for dealing with Microsoft.Xna.Framework.Input.Keys and Microsoft.Xna.Framework.Input.Keyboard
public static class KeysExtensions
- Inheritance
-
KeysExtensions
- Inherited Members
Fields
ModifierKeys
All enum values of ModifierKey
public static readonly ModifierKey[] ModifierKeys
Field Value
Methods
GetKeys(ModifierKey)
Returns all of the keys that the given modifier key represents
public static IEnumerable<Keys> GetKeys(this ModifierKey modifier)
Parameters
modifier
ModifierKeyThe modifier key
Returns
- IEnumerable<Keys>
All of the keys the modifier key represents
GetModifier(GenericInput)
Returns the modifier key that the given key represents. If there is no matching modifier key, None is returned.
public static ModifierKey GetModifier(this GenericInput input)
Parameters
input
GenericInput
Returns
- ModifierKey
The modifier key, or None
GetModifier(Keys)
Returns the modifier key that the given key represents. If there is no matching modifier key, None is returned.
public static ModifierKey GetModifier(this Keys key)
Parameters
key
KeysThe key to convert to a modifier key
Returns
- ModifierKey
The modifier key, or None
IsModifier(GenericInput)
Returns whether the given key is a modifier key or not.
public static bool IsModifier(this GenericInput input)
Parameters
input
GenericInput
Returns
- bool
If the key is a modifier key
IsModifier(Keys)
Returns whether the given key is a modifier key or not.
public static bool IsModifier(this Keys key)
Parameters
key
KeysThe key
Returns
- bool
If the key is a modifier key