Chapter 15. XNA input handling
This chapter covers
The XNA Framework provides for a number of input devices across all of its target platforms. Game players on an Xbox use the controller with its variety of buttons, triggers, and thumbsticks, as well as a directional pad. Players of Windows-based games can use the controller as well as the keyboard and mouse. Zune devices provide a more limited set of buttons, directional pad, and thumbstick, whereas the Zune HD provides a touch screen and accelerometer.
Applications and games running on the Windows Phone receive all of their player input via the touch screen or sensors. Though the phone has a number of hardware buttons, applications and games can’t use any of them for game play. The only exception is the Back button, which games can use to navigate between screens and to exit the application. Some phones have physical keyboards that can be used by application code, but applications and games must also work on phones that don’t have physical keyboards. The software keyboard can’t be used by the XNA Framework, but can be exposed by Silverlight text input controls even in shared graphics mode.