I have seen a similar thread here in the forum, but my issue is not like that. Actually, overriden function OnKeyDown is getting called for all keys, except for keys such as Space bar, Enter Key, Arrow keys, etc
I can confirm that at default settings the above will intercept all keys, including arrow keys, spacebar and even Esc correctly. If you are experiencing different behaviour, look into the focusability of the widget and its input priority. Perhaps something else is handling (and consuming) the input of the keys that do not register for you.
Not sure if I understand what you’re trying to achieve. You want to type and simultaneously have the same key input fire an additional event?
If that’s the case, you could override the (editable) text box’ *OnTextChanged * event, it returns the text that has been typed, convert to string, fetch the last char and from here you can do whatever you want with it. This should work for most keys including ctrl, shift, spacebar. You could intercept Enter from OnTextCommited when switching on commit method.
This will not work for the arrow keys as they move the caret.
Perhaps there’s a completely different method to achieve what you need. Not enough info to go on.
I am trying to implement keyboard navigation. I want to change focus to another widget when the user press up arrow key. To do that I need to get the key press event in my parent C++ class associated with the Widget Blueprint.
How to get the character equivalent of EKeys::Space or EKeys::LeftCtrl, etc?
You could create a Map with string *Keys *and eKey *values *(if that sounds confusing, have a look here: TMap | Unreal Engine Documentation).
You’d want to pair the string spat out by the textbox with the eKey equivalent.
Alternatively, you could use Select node and feed it an enumerator.
That’s not the problem. The editable box needs the focus, when you type it consumes the input and Key events are not produced anymore, that’s fine, too. OP wants to propagate the input while typing - that’s also fairly easy, as described above.
The only issue I see are the arrow keys, these are used to move the caret of the editable box. Not sure how to work around that.
But I am having another problem. When I tried to use multicast delegate, it is showing compilation error…! Why is that? Is there any constrain like, delegates are not allowed to be used in classes that inherits from an interface?