GameMaker Studio 2 has a number of dedicated actions that can be used to detect both analogue and digital controls from multiple connected game pads. These actions require you to specify a gamepad index value, which is a number (counting from 0) that represents the gamepad being selected. Note that when a gamepad is plugged in to your device (or it is removed) then an asynchronous System Event is triggered (however to deal with this you may need to use code).
游戏手柄 “插槽” 从 0 开始索引，插槽 0 - 3 包含 仅用于 Xinput 游戏手柄，即：Xbox360 控制器和兼容机。However you can also check slots 4 - ii inclusive for DirectInput gamepads, which means you can detect many other models of controller when connected through these slots.
The available gamepad actions are all listed below:
|Gamepad Get Axis|
|Gamepad Get Trigger|
|Gamepad Get Count|
|Gamepad Get Connected|
|Gamepad Set Axis Deadzone|
sudo apt-get install jstest-gtk
sudo apt-get install joystick.
This will install GUI support for the joystick as well as the