The primary and most important button on the controller. This button is used for actions like:
- Jumping in a platformer
- Pressing "OK" in menus
- Serving as a "click" button to confirm actions
This module represents buttons on a game controller.
Most buttons are a simple press/don't press switch. This value lets you know whether the button is being pressed.
Some buttons notice if they're being touched by the user, often through the use of a touchscreen. Effectively, some buttons let you see whether the user touches the button without pressing it.
Keep in mind that most controllers also set this value to true when the button is being pressed.
Some buttons notice how firmly they're being pressed.
If the button supports this, this value shows how firmly, on a scale from 0 to 1. If the button doesn't support this, the value will always be 0 (when not pressed) or 1 (when pressed).
This library looks at what your controller looks like, and indexes each button for you. This way, you can simply check if any button is being pressed.
Different controllers use different letters (A, B, X, Y or X, O, square and triangle) in different configurations
The primary and most important button on the controller. This button is used for actions like:
The secondary button is the secondary button that is second-most important. For some controllers, it can be used as an complementing button to the primary button. This button is used for actions like:
The tertiary button is the button that is used rather infrequently, but is still placed near the player's finger because the action is still used quite frequently. This button is used for actions like:
The fourth button is the least accessible button and should effectively be used the least. This button is used for actions like:
Most controllers have a bunch of directional buttons that can be used for a directional menu. Usually, these are used for things like quick slots from a player's inventory.
The up arrow button.
The left arrow button.
The right arrow button.
The down arrow button.
Whether you call it the top or the front of the controllers, there's always a few buttons up there.
The small button on the left front of the game controller.
The small button on the right front of the game controller.
The large button on the left front of the game controller.
The large button on the right front of the game controller.
Some joystick buttons allow you to press on them. As a result, you will hear a soft clicking noise. These buttons are usually used for actions that should be executed very rarely, like switching camera perspective, as not all controllers have these buttons.
Button by pressing down the left joystick.
Button by pressing down the right joystick.
The menu buttons are usually used to pause games, open in-game (or out-of-game) menus, and change settings.
The start button usually serves as a pause button to interrupt a game and open a menu. Here, players can alter settings, change the window, or leave a game.
The select button usually serves as an in-game button to interrupt a game and open an in-game menu. For example, users might open their inventory this way, or look at a map of their surroundings.
The home button is an unpredictable one, for some programs might interpret the button beyond your control. The button usually serves as a method of turning a controller on/off, or changing the state of the game.
The touchpad button is a button that doesn't exist on most controllers. It is often used for controlling the mouse, but it can also be used as a simple button.
In some rare cases, you do not care about the actual buttons and you just want them in their directions.
In that case, you can access the right button by their orientation.
Note that these buttons will likely overlap with the primary, secondary, tertiary and quaternary buttons.
Button in the north position.
Button in the east position.
Button in the south position.
Button in the west position.
The most common type on any controller. Most buttons can only be pressed and released, but some are a little bit more advanced.