Table of Contents

Class KeysExtensions

Namespace
MLEM.Input
Assembly
MLEM.dll

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

ModifierKey[]

Methods

GetKeys(ModifierKey)

Returns all of the keys that the given modifier key represents

public static IEnumerable<Keys> GetKeys(this ModifierKey modifier)

Parameters

modifier ModifierKey

The 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 Keys

The 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 Keys

The key

Returns

bool

If the key is a modifier key