Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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 Express. - How to: Detect Whether a Controller Button Has Been Pressed This Frame
This example demonstrates how to detect whether a user has just pressed a digital button on a connected Xbox 360 Controller. This example ignores held buttons, only activating when a button has been pressed in the current frame. - How to: Detect Whether a Controller Is Disconnected
This example 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)
This example 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
This example demonstrates how to detect whether a user has pressed or released a key on the keyboard.