Get Input Key assigned to Mapping

Hello! I am trying to add some input prompts in my game and I was wondering, how would I get the input key assigned to a certain mapping? Also, as a bonus question: is there anyway to determine what is being used for input (Keyboard/Mouse, Controller, etc). Thanks! :slight_smile:

Go to Edit > Project Settings > Input. You add new stuff under ‘Action Mappings’, and change movement controls under ‘Axis Mappings’. Then you have to write the Blueprint code, There’s a series on you tube for building a 3rd Person game that goes through the entire process step by step.

I think you’re putting the cart before the horse here a little bit.

Presently in UE4, input keys are more or less hard-coded to InputActions, since the only way to change them is to edit the project settings in the UE4 editor (rather than in an options menu in game) or to manually change a config .ini file.

So from that, you would already know what inputs were assigned.

Now, if you were to support user remappable keys, you’d need something like 's key rebinding system to make that happen… And 's system, in addition to including nodes for remapping, also includes nodes for getting the key assigned to the InputAction at runtime, in which case you’d use that.

Thanks RythmScript, I was wondering this as well but was told that there is no way to tell.

Sorry, I must have not been specific enough. I intend to display control images on-screen. I just need to know what key is assigned to what (for remappable keys) so I can display the correct key in a tutorial for example. Thanks for the reply though! I really appreciate it! :slight_smile:

@RhythmScript Thanks, that is exactly what I was looking for! :smiley:

Hi. I couldn’t find out how to do that for a long time either. Here’s a screen of how I get it now - hope it helps anyone stumbling across this question