All of the devices detected by the Wolfram System are listed in the output of ControllerInformation. There are several built-in devices here in addition to a Logitech Dual Action gamepad that is connected via USB:
By default, gamepads and other controllers can be used with Wolfram Language functions like Manipulate and Graphics3D. For instance, you can use a connected gamepad to adjust Manipulate controls or rotate 3D graphics with no additional configuration. For more information, see How to: Use Built-in Gamepad Support.
Devices from different manufacturers often use different names for controls. The Wolfram System attempts to standardize these names to , , , , and so on for one-dimensional analog controls, and , , and so on for buttons.
If you wrap this input with Dynamic, the output will update continuously, thus letting you view the state of each axis in real time.
If ControllerState does not immediately respond to your controller, you may need to adjust the ControllerPath option. Similar to the way the Wolfram System searches the directories in $Path when it looks for files, ControllerState searches for available controllers based on the ControllerPath setting.
The default setting for ControllerPath is to use gamepads, if any are present:
Because of this, you can omit as the first argument to ControllerState and get the same result:
If there are no gamepads connected, then ControllerState by default will fall back to other joystick devices, 3D mice, and finally other controller devices, including infrared controllers and digitizers.
Here, a preference for the sudden motion sensor that is built into some portable computers is specified in ControllerPath: