Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Returns the current keyboard state.
Namespace: Microsoft.Xna.Framework.Input
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)
Syntax
public static KeyboardState GetState ()
Return Value
The current keyboard state.
Exceptions
Exception type | Condition |
---|---|
InvalidOperationException | An invalid operation occurred when querying the keyboard state. |
See Also
Tasks
How to: Detect Whether a Key Is Pressed
Concepts
Reference
Keyboard Class
Keyboard Members
Microsoft.Xna.Framework.Input Namespace
Platforms
Xbox 360, Windows XP SP2, Windows Vista