input: Don't insert filtered keys in pressedKeys
-
If a key press is grabbed by an input filter and then the focus changes we should not consider that key as pressed. We wouldn't forward the key, therefore we shouldn't consider it held if the focus changes.
-
If a key release is grabbed by an input filter, we should consider the key released if the focus changes as it's not being pressed anymore.
The updating of the pressed keys is done in KeyboardInputRedirection::update as that covers both the final ForwardInputFilter, but also other cases where focus is updated mid-filtering and focus passed to a surface.
This fixes the issue of releasing a global shortcut where the press of that global shortcut caused a focus change.
Edited by David Edmundson