'How can I get an Action Key without an InputAction?

I would like to create the text "Press {InteractKey} to {Interact}."

How can I get the key that is bound to my Interact action binding ("F") without using an InputAction? I want to get the key without having to trigger an event.

So in the end my text would say something like "Press F to do the thing."

enter image description here



Solution 1:[1]

I was able to get the action key by getting input settings, then getting the action mapping my name, I can then break the InputActionKeyMapping and get the key from that.

enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 bwoogie