We have some global keyboard shortcuts in our application,
(done by adding a listener like so: nativeApplication.addEventListener(KeyboardEvent.KEY_UP, handleKeyboardShortcuts); )
The issue we have is that when a text input has focus, the input will first take the shortcut and enter it in as text. For example, if we have a shortcut Ctrl+s to open up a search screen, the inputbox will add an 's' to the selection before our handler is called.
I first tried to resolve this by adding a keydown listener that temporarily switches away focus from the input, but that opens a can of worms when trying shortcuts that *should* apply to the text input, (llke Ctrl+a to select all).
Is there anyway to prevent the text input from processing particular keyboard events?