Skip to content

Draft: gtk: Do not match accelerators with no modifiers matching

Carlos Garnacho requested to merge carlosg/gtk:wip/match-level5 into gtk-3-24

Using the german neo2 keyboard layout, AltGr is mapped to level5 shift, and AltGr+e is mapped to Up. This ends up matching with Shift+Up keybindings just by virtue of the key event modifier and the accelerator modified both being 0 after filtering out consumed, (non)virtual modifiers, etc. Since both result in 0 it looks like a match and the accelerator is triggered.

It sounds suspiciously wrong that an accelerator with modifiers would end up matching a key event this way, so make it sure that accelerators with modifiers require at least some modifier set before matching with anything.

Closes: #6526

Merge request reports