I'm working on making a menu for rebinding keys etc. I need to get the current bind and convert it to human readable (so not a keycode). What I thought I could do was:

OS.get_keycode_string(ProjectSettings.get_setting("input/Left")["events"][0].keycode)

and this would just give 'A' or whatever it's bound too during _ready. If I run

print(ProjectSettings.get_setting("input/Left")["events"][0])

it prints a normal looking InputEventKey, but when I access it manually with .keycode, it always says 0. Why is this happening?

TH3-S4LM0N What gets printed if you do: print(ProjectSettings.get_setting("input/Left"))?

    xyz Thank you for noting this, I've been stuck here all day. Are there any differences between how I should use physical keys vs normal keycode/label or do they functionally work the same?

    • xyz replied to this.

      TH3-S4LM0N The difference is described in the docs

      You can set if key is physical or not in when binding inputs in project settings. If you don't set it as physical your above code will print the keycode.