Basically there is a array that acts as a check list. It checks off
keys that belong to the ungrab sequence as they are detected. Once a
non-ungrab key is detected, the check list is cleared. If all the
ungrab keys are detected the ungrab code is executed. This only
happens on keyup events. That way if Control-ALT were the ungrab keys,
sending Control-ALT-Delete to the guest is still possible because
these are the keys detected on the keyup event. The Delete key would
have cleared the check list. Daniel Berrange is the one I can thank
for this idea. He might be able to explain it better than me.
Hmm, ok.
Doing the same for gtk would basically imply to not use any toolkit
support for hotkeys ...
It'll also become more difficuilt if we use that for multiple hotkeys.
But possibly we can share the code across all UIs, now that keycodemapdb
is used by qemu. So first translate the keycode from the UI toolkit to
a QKeyCode, then feed that into shared hotkey detection code.