godotengine / godotengine/godot-docs

Getting enum key that in globalscope with value

Open
#3,896 1 comment 0 reactions 0 assignees View on GitHub
area:class reference enhancement
Dominant language
reStructuredText
Stars
5.7k
Forks
3.8k
Avg merge
1d 20h
Merged PRs (30d)
25

Description

Godot 3.2

how can i get a key name of buttonlist enum by using value? For joypad it is Input.get_joy_button_string(button_index) and for keyboard it is OS.get_scancode_string(button_value) but for mouse keys ?

This enum is in globalscope and I think we can only reach to enums' keys not enum itself so I can't do ButtonList.keys(button_index) https://docs.godotengine.org/en/stable/classes/class_@globalscope.html

![unknown](https://user-images.githubusercontent.com/57962685/90151049-fd1f4180-dd8e-11ea-89b7-f62b3d596870.png)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.