---
name: "SDL_GamepadBinding"
section: "3type"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_GamepadBinding"
---

# SDL\_GamepadBinding(3type)

A mapping between one joystick input to a gamepad control.

## NAME

SDL\_GamepadBinding - A mapping between one joystick input to a gamepad control.

## HEADER FILE

Defined in SDL3/SDL\_gamepad.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**typedef struct SDL\_GamepadBinding** **{**     **SDL\_GamepadBindingType input\_type;**     **union**     **{**         **int button;**         **struct**         **{**             **int axis;**             **int axis\_min;**             **int axis\_max;**         **} axis;**         **struct**         **{**             **int hat;**             **int hat\_mask;**         **} hat;**     **} input;**     **SDL\_GamepadBindingType output\_type;**     **union**     **{**         **SDL\_GamepadButton button;**         **struct**         **{**             **SDL\_GamepadAxis axis;**             **int axis\_min;**             **int axis\_max;**         **} axis;**     **} output;** **} SDL\_GamepadBinding;**

## DESCRIPTION

A gamepad has a collection of several bindings, to say, for example, when joystick button number 5 is pressed, that should be treated like the gamepad's "start" button.

SDL has these bindings built-in for many popular controllers, and can add more with a simple text string. Those strings are parsed into a collection of these structs to make it easier to operate on the data.

## AVAILABILITY

This struct is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_GetGamepadBindings**(3)](/SDL_GetGamepadBindings/3.md)
