fakeinput: Keep modifiers when handling keysyms

The requirements for turning keysyms into keycodes are complicated.

If the keysym is "F" vs "f" we need to handle pressing and unpressing shift before delivering the keycode. However, we still need existing modifiers like control, alt, meta to work based on key combinations. This patch avoids unsetting existingly held modifiers and takes a union. It does mean that sending some keySyms with modifiers explicitly held down may not translate correctly, but it's hopefully a happy medium.

We also have to ensure when the user explicitly presses a modifier we don't unset the changes the user made.

BUG: 519690

Merge request reports

Loading