Export (0) Print
Expand All

Input

The XNA Framework Microsoft.Xna.Framework.Input namespace provides classes and methods for retrieving user input for keyboard, mouse, and Xbox 360 controller devices.

In This Section

Input Overview
This article is an introduction to handling user input in XNA Game Studio.
Button Mapping Between Different Controllers and the Xbox 360 Gamepad
Discusses the various controller subtypes and the various mappings for each controller to the standard Xbox 360 gamepad.
How To: Detect Whether a Controller Button Is Pressed
Demonstrates how to detect whether a user has pressed a digital button on a connected Xbox 360 Controller.
How To: Detect Whether a Controller Button Has Been Pressed This Frame
Demonstrates how to detect whether a user has just pressed a digital button on a connected Xbox 360 Controller.
How To: Detect Whether a Controller Is Disconnected
Demonstrates how to detect whether an Xbox 360 Controller connected to the system at game start has become disconnected.
How To: Get the Current Mouse Position (Windows)
Demonstrates how to get the current horizontal and vertical position of the mouse cursor relative to the upper-left corner a game window.
How To: Detect Whether a Key Is Pressed
Demonstrates how to detect whether a user has pressed or released a key on the keyboard.

Community Additions

ADD
Show:
© 2014 Microsoft