Skip to content

keybindings: Do not interpret "locate pointer" mixed with other keys

The default "left control" keybinding for the "locate pointer" feature makes this keybinding prone to be handled as part of another keybinding. One case is ctrl+alt+up/down for workspace switching.

When the keys are pressed just right (first alt, then left ctrl, then up) the second keypress will enter through the process_locate_pointer_key() paths, but remain latent as it's not a key release yet. The third keypress would notice the mixed keypress and set locate_pointer_key_only_pressed to FALSE, but the keypress would otherwise still be considered as handled through these paths.

This, combined with the default behavior to let events go through even though the "locate pointer" action is triggered, would result in the "up" key press being forwarded through wl_keyboard, with the previous alt modifier.

To protect against this, only deem the "locate pointer" action to handle an event if the event is processed and the keybinding is the only key pressed.

Closes: #812 (closed)

Merge request reports