Char / FString to FKey


the player can assign different keys for dynamic actions and therefore I designed a UI where all possible bindings are displayed. In a textbox he should be able to Select / type a key. Now I need to convert the String from the Text-Field to a FKey. How do I do that? :slight_smile:

Thanks :slight_smile:

In Blueprint? You’ll have to create a switch on string that performs different functions based on what the string is. Sorry, but that’s all you got without C++ :slight_smile:

It is possible to override OnKeyDown in UMG and get the key that was pressed with GetKey, though I think it won’t work if the text box has focus

I just solved by saving the keys as a string in the objects, and when a key is pressed I redirect the key to the specific object and get the “Get Display Name” and perform a String-Comparsion. Work’s so I am happy with it. :slight_smile: Thanks for your answer anyways :slight_smile:

But no, hasn’t to be in blueprints. I only do certain stuff in BP, most things in C++. If you have a cleaner solution let me know about it :slight_smile: