Keyboard

class Keyboard : System.Object

Allows getting keystrokes from keyboard.

public KeyboardState GetState()

Returns the current keyboard state.

Returns:Current keyboard state.
public KeyboardState GetState(PlayerIndex playerIndex)

Returns the current keyboard state for a given player.

Parameters:
  • playerIndex (Microsoft.Xna.Framework.PlayerIndex) – Player index of the keyboard.
Returns:

Current keyboard state.

void SetActive(bool isActive)
Parameters:
  • isActive (bool) –