Table of Contents

Class Keyboard

Namespace
Microsoft.Xna.Framework.Input
Assembly
MonoGame.Framework.dll

Allows getting keystrokes from keyboard.

public static class Keyboard
Inheritance
Keyboard
Inherited Members

Methods

GetState()

Returns the current keyboard state.

public static KeyboardState GetState()

Returns

KeyboardState

Current keyboard state.

GetState(PlayerIndex)

Returns the current keyboard state for a given player.

[Obsolete("Use GetState() instead. In future versions this method can be removed.")]
public static KeyboardState GetState(PlayerIndex playerIndex)

Parameters

playerIndex PlayerIndex

Player index of the keyboard.

Returns

KeyboardState

Current keyboard state.