tabbox: Refactor custom keypress handler
tabbox: Port key handling to KeyboardKeyEvent
Port away from the deprecated use of int
variables and operations
for shortcuts and key events, and to Qt::Keys and Qt::KeyModifiers.
This removes deprecation warnings and also enables the tabbox to use the extra information in KeyboardKeyEvent.
Note I'm not fully sure about the x11filter code, specially how to detect the state property, but it would work for the intended purpose
tabbox: Simplify custom keypress handler
Refactor the custom keypress handler on the tabbox code so it gets easier to reason about and modify.
- Early return if the tabbox has not grabbed the shortcut
- Extract the code that matches the key event against a pair of forward/backward shortcuts into its own method
- Simplify the iteration over the different tabbox modes (each with its own pair of shortcuts)
- Finally, act on the results of the previous matching