So I have recreated a TRIBES style voice macro menu. It works by taking in series of keystrokes while the widget is drawn, every entry is assigned a letter, eg. VGS = Shazbot, VGCG = Good Game
The functionality of the widget is not the problem I am having, the widget works as intended, the problem is how I am getting the keystrokes in. I created an Input action which contains every letter needed to send to the widget, in order for this InputAction to not override other Input Action functions I had to disable “Consume Input”. When the widget is drawn it will send the keystrokes to the widget, but it will also send the keystrokes for movement or whatever else is bound to those when you do a key series. (This is the problem, in the video you can see when I hit VGS or VGW my character moves). Enabling “Consume Input” prevents all other actions bound to these keys to occur, so the InputAction obviously then is the wrong solution.
Now, in UMG there is an overridable function called OnKeyDown, this function only fires when the widget has focus. When using this function instead of the above InputAction, due to the nature of the widget being on screen while the user is moving around it immediately loses focus and no longer sends keystrokes.
I need to find a way to override all InputActions bound to the letters of the alphabet but only while the widget is drawn to prevent movement, grenade tosses, etc. from also being fired. The key lies with widget focus and the OnKeyDown function I know it does but I’ve tried a few ways without success so I’m reaching out to see if anyone might have come across a similar issue and found a solution.
- I have tried using the VGSdrawn bool to disable InputActions like MoveForward and MoveRight but they still fire after the last key is pressed (if it ended in W A S or D).
- In order to not have “Tab” give focus to the widget I turned off “Is Focusable”, this disables the ability for OnKeyDown to ever fire.
- “Set Input Mode Game & UI” disables mouse look and all other actions