KeyboardState Constructor

KeyboardState Constructor

Initializes a new instance of the KeyboardState class.

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

public KeyboardState (
         params Keys[] keys
)

Parameters

keys
Type: Keys
Array or parameter list of Keys to initialize as pressed.

Games normally use GetState to get the true keyboard state. This constructor is used instead to simulate keyboard input for passing within the game's own input subsystem.

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

Community Additions

ADD
Show:
© 2016 Microsoft