UMG keyboard UI shortcut keys
Every user interface needs shortcut keys associated with it. To program these into your UMG interface, you can simply wire-up certain key combinations to an Action mapping. When the Action triggers, just invoke the same Blueprints function that the UI button itself triggers.
Getting ready
You should have a UMG interface created already, as shown in the previous recipe.
How to do it...
- In Settings | Project Settings | Input, define a new Action mapping for your hot key event, for example,
HotKey_UIButton_Spell
. - Wire up the event to your UI's function call either in Blueprints or in C++ code.
How it works…
Wiring up an Action Mapping with a short circuit to the function called by the UI will allow you to implement hot keys ...
Get Unreal Engine 4 Scripting with C++ Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.