Get Input Binding

Godot Version

4.2

Question

I am making a game where if you hover the mouse over a certain area of the screen a prompt appears with the letter binding of the interact button. I am wondering how to dynamically get the input binding of an action through gdscript.

Take a look at InputMap. Is that what you are looking for?

Well I’m trying to get a binding from the inputmap
a pseudo-code is example is something like: text=Input.GetBinding(“PrimaryInteract”)
and it would return “E”

Check out the link I posted. Use the global InputMap to get the events for an action and display the InputEvent as text. Try it out. Your pseudo code is actually like 80% there.