I had a similar requirement, I wanted to do some other actions when shift or ctrl is beeing pressed. The approaches above worked, but sadly I had to manually click on a widget.
What worked way better for me is setting “IsFocusable” to true. Then the key down/up events get fired once I clicked somewhere in the editor widget.
Source: UI Widget key events OnKeyDown/OnKeyUp not generated - #5 by isgoed