KeyboardState.GetPressedKeys Method

Gets an array of values that correspond to the keyboard keys that are currently being pressed.

Namespace: Microsoft.Xna.Framework.Input
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)

Syntax

public Keys[] GetPressedKeys ()

Return Value

The keys that are currently pressed.

See Also

Tasks

Detecting a Key Press (Windows, Windows Phone, Xbox 360)

Concepts

Overview of User Input and Input Devices

Reference

KeyboardState Structure
KeyboardState Members
Microsoft.Xna.Framework.Input Namespace

Platforms

Xbox 360, Windows 7, Windows Vista, Windows XP, Windows Phone