Some way to get the name of gamepad buttons? (like OS.get_scancode_string() does for keys)

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By rgrams
:warning: Old Version Published before Godot 3 was released.

All in the title. I’m wondering if there is a way to get a user-readable name of a gamepad button from its button_index.

I don’t think it’s possible yet, but Hinsbart is looking into it. Could you open an issue on GitHub?

Akien | 2016-09-13 12:45

:bust_in_silhouette: Reply From: rgrams

Update: It’s not merged yet, but there is a pull request pending to add these functions. Thanks to Hinsbart! Add functions to get readable names for joystick events by 27thLiz · Pull Request #6568 · godotengine/godot · GitHub

Update, the PR is merged. Use Input.get_joy_button_string(int button_index) in GDScript to get the name of the gamepad buttons.

Mathias Langlet | 2019-01-13 17:54