How do I listen for Input from joystick/buttons on a controller?

I bought a controller and the driver installed just fine. The device’s properties screen shows that all buttons, joysticks and thumb pad send signals when I use them.

The ship in my Unity project moves with WASD, so the left thumb pad and joystick work, too, with Input.GetAxis(“Horizontal”) and “Vertical”. I’d like to know how to watch for Input from the right joystick (and other buttons).

The purpose is to mimic the mouse, which I have read can be done with Xpadder by other means. My real goal is to learn how to listen for other input. I have already added Input keys for the keyboard 1…5 and I know that multiple Inputs can perform the same function.

Thanks in advance for your help. :slight_smile:

Very simple !

function Update ( )
   if ( Input.GetKeyDown ( KeyCode.X ) ){
      //Do blaaa........

Take a look at the complete list of KeyCodes: Unity - Scripting API: KeyCode