Export (0) Print
Expand All

Keyboard.GetState Method ()

Returns the current keyboard state.

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

public static KeyboardState GetState ()

Return Value

Current keyboard state.

Exception typeCondition
InvalidOperationExceptionAn invalid operation occurred when querying the keyboard state.

This method queries an attached USB keyboard. To query a Chatpad instead, use Keyboard.GetState (PlayerIndex).

Xbox 360, Windows XP SP2, Windows Vista

Community Additions

ADD
Show:
© 2014 Microsoft