Click or drag to resize
DigitalRuneInputManager Class
Manages user input from several devices. See IInputService.
Inheritance Hierarchy
SystemObject
  DigitalRune.Game.InputInputManager

Namespace: DigitalRune.Game.Input
Assembly: DigitalRune.Game.Input (in DigitalRune.Game.Input.dll) Version: 1.8.0.0 (1.8.0.14467)
Syntax
public class InputManager : IInputService

The InputManager type exposes the following members.

Constructors
  NameDescription
Public methodInputManager
Initializes a new instance of the InputManager class.
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetGamePadState(PlayerIndex)
Gets the gamepad state of the given game controller. (Not available in Silverlight.)
Public methodGetGamePadState(LogicalPlayerIndex)
Gets the gamepad state for the given player.
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetLogicalPlayer
Gets the game controller assigned to the specified player. (Not available in Silverlight.)
Public methodGetPreviousGamePadState(PlayerIndex)
Gets the gamepad state of the last frame of the given game controller. (Only available in XNA Windows Phone builds.)
Public methodGetPreviousGamePadState(LogicalPlayerIndex)
Gets the gamepad state of the last frame for the given player. (Not available in Silverlight.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIsDoubleClick(Keys)
Determines whether the specified key was double-clicked.
Public methodIsDoubleClick(MouseButtons)
Determines whether the specified button has been double-clicked.
Public methodIsDoubleClick(Buttons, LogicalPlayerIndex)
Determines whether the specified button has been double-clicked by the given player. (Not available in Silverlight.)
Public methodIsDoubleClick(Buttons, PlayerIndex)
Determines whether the specified button has been double-clicked on the given game controller. (Not available in Silverlight.)
Public methodIsDown(Keys)
Determines whether the specified key is down.
Public methodIsDown(MouseButtons)
Determines whether the specified button is down.
Public methodIsDown(Buttons, LogicalPlayerIndex)
Determines whether the specified button is down for the given player. (Not available in Silverlight.)
Public methodIsDown(Buttons, PlayerIndex)
Determines whether the specified button is down on the given game controller. (Not available in Silverlight.)
Public methodIsGamePadHandled(PlayerIndex)
Gets a value indicating whether the input of a given game controller has already been handled. (Not available in Silverlight.)
Public methodIsGamePadHandled(LogicalPlayerIndex)
Gets a value indicating whether gamepad input of a given player has already been handled.
Public methodIsPressed(Keys, Boolean)
Determines whether the specified key was previously up and has been pressed.
Public methodIsPressed(MouseButtons, Boolean)
Determines whether the specified button was previously up and has been pressed.
Public methodIsPressed(Buttons, Boolean, LogicalPlayerIndex)
Determines whether the specified button has been pressed by the given player. (Not available in Silverlight.)
Public methodIsPressed(Buttons, Boolean, PlayerIndex)
Determines whether the specified button has been pressed on the given game controller. (Not available in Silverlight.)
Public methodIsReleased(Keys)
Determines whether the specified key was previously down and has been released.
Public methodIsReleased(MouseButtons)
Determines whether the specified button was previously down and has been released.
Public methodIsReleased(Buttons, LogicalPlayerIndex)
Determines whether the specified button has been released by the given player. (Not available in Silverlight.)
Public methodIsReleased(Buttons, PlayerIndex)
Determines whether the specified button has been released on the given game controller. (Not available in Silverlight.)
Public methodIsUp(Keys)
Determines whether the specified key is up.
Public methodIsUp(MouseButtons)
Determines whether the specified button is up.
Public methodIsUp(Buttons, LogicalPlayerIndex)
Determines whether the specified button is up for the given player. (Not available in Silverlight.)
Public methodIsUp(Buttons, PlayerIndex)
Determines whether the specified button is up on the given game controller. (Not available in Silverlight.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodSetAllHandled
Sets all "IsHandled" flags to the given value.
Public methodSetGamePadHandled(PlayerIndex, Boolean)
Sets the IsGamePadHandled flags of a given game controller. (Not available in Silverlight.)
Public methodSetGamePadHandled(LogicalPlayerIndex, Boolean)
Sets the IsGamePadHandled flags for the given player. (Not available in Silverlight.)
Public methodSetLogicalPlayer
Assigns a game controller to a player. (Not available in Silverlight.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodUpdate
Updates the input states. This method must be called once per frame.
Top
Properties
  NameDescription
Public propertyAccelerometerValue
Gets the accelerometer value. (Only available in XNA Windows Phone builds.)
Public propertyCommands
Gets the input commands.
Public propertyEnableMouseCentering
Gets or sets a value indicating whether the mouse position is reset in each frame.
Public propertyGestures
Gets the detected touch gestures. (Not available in Silverlight.)
Public propertyIsAccelerometerActive
Gets a value indicating whether an accelerometer is connected and can be used. (Only available in XNA Windows Phone builds.)
Public propertyIsAccelerometerHandled
Gets or sets a value indicating whether accelerometer input has already been handled.
Public propertyIsKeyboardHandled
Gets or sets a value indicating whether keyboard input has already been handled.
Public propertyIsMouseOrTouchHandled
Gets or sets a value indicating whether mouse or touch input has already been handled.
Public propertyKeyboardState
Gets the state of the current keyboard state.
Public propertyMaxNumberOfPlayers
Gets the max number of players (= max number of game controllers that can be connected).
Public propertyModifierKeys
Gets the pressed modifier keys.
Public propertyMousePosition
Gets or sets the mouse position.
Public propertyMousePositionDelta
Gets or sets the mouse position change since the last frame.
Public propertyMousePositionDeltaRaw
Gets the raw mouse position change since the last frame.
Public propertyMousePositionRaw
Gets the raw mouse position.
Public propertyMouseState
Gets the state of the current mouse state.
Public propertyMouseWheelDelta
Gets a value representing the rotation change of the mouse wheel.
Public propertyPressedKeys
Gets the pressed keys.
Public propertyPreviousKeyboardState
Gets the keyboard state of the last frame.
Public propertyPreviousMouseState
Gets the mouse state of the last frame.
Public propertySettings
Gets or sets the settings that define input handling, timing, etc.
Public propertyTouchCollection
Gets the touch collection. (Not available in Silverlight.)
Top
Remarks

Update(TimeSpan) must be called once per frame. The method must be called on the main game thread that is allowed to query the input devices (other threads are not allowed to query input devices).

See IInputService for additional information.

See Also