Well. This is first time I ever touched input. I need to explain how I can get string containing key name. I'm able to recrive InputEvent ([InputEventMouseButton:35) with var event = InputMap.get_action_list(keybind_name)[0] (keybind_name is variable. It contains name of action) but I have no damn idea how I can pull name of key from it. Any help will be appreciated

Garrom out.

I'm new to Godot so not sure if there's a function to do this but if you do this:

var list = InputMap.get_action_list("ui_accept")
for k in list:
    print(k)

You get all the keys (or other inputs) associated with that particular action so it would be easy to build a dictionary of these values with their key (or button) names... provided you can find a list of them somewhere :smile:

@picnic said: I'm new to Godot so not sure if there's a function to do this but if you do this:

var list = InputMap.get_action_list("ui_accept")
for k in list:
    print(k)

You get all the keys (or other inputs) associated with that particular action so it would be easy to build a dictionary of these values with their key (or button) names... provided you can find a list of them somewhere :smile:

Nah, every key have its name. I remember when I was working in C# I was using SharpDX DirectInput what was managed library for DirectX DirectInput I find out that every key have its name. It must have name even in GoDot, get name of key is one of basic features and I don't think GoDot can miss such basic feature.

4 years later