Click to Rate and Give Feedback
MSDN
MSDN Library
XNA Game Studio
XNA Game Studio 3.1
Keyboard Class
Keyboard Methods
GetState Method
 GetState Method (PlayerIndex)
Collapse All/Expand All Collapse All
XNA Game Studio 3.1
Keyboard.GetState Method (PlayerIndex)
Returns the current Chatpad state for the specified player.

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

C#
public static KeyboardState GetState (
         PlayerIndex playerIndex
)

Parameters

playerIndex
Player index of the Chatpad to query.

Return Value

Current Chatpad state.
Exception typeCondition
InvalidOperationExceptionAn invalid operation occurred when querying the Chatpad state.

Each player can have his or her own Chatpad, which is queried as a keyboard. To query an attached USB keyboard instead, use the GetState method that does not require a player index.

This method works on Xbox 360 platforms only. Windows does not include driver support for the ChatPad.

This method is included in the assemblies for Windows, but it is effectively a null function on that platform. Calls to Keyboard.GetState(playerIndex) from a Windows application are accepted, but will never return a ChatPad state change (key press or release).

Xbox 360, Windows XP SP2, Windows Vista, Zune
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker