The InputReceiver property can be assigned to set the current IInputReceiver. The current IInputReceiver can receive keyboard input and has an ever-frame method raised for pricessing input. This property can be used to prevent multiple objects from receiving keyboard input. This is useful if multiple game objects respond to keyboard input - such as a a text box and a character in a platformer.
For a detailed discussion of using the InputReceiver property, see the IInputReceiver page.
The InputReceiver can be assigned through custom code. For example, the following might be an event executed when a button is clicked:
The InputManager is a class responsible for reading and reporting input from the keyboard, mouse, and gamepads. It is automatically initiated and updated by FlatRedBallServices so once the Initialization methods are called, the InputManager can be used.
See Keyboard
See Mouse
See TouchScreen
See Xbox360GamePad
Did this article leave any questions unanswered? Post any question in our forums for a rapid response.