Hi, On 8 May 2012 00:30, Bill Spitzak <[email protected]> wrote: > Kristian Høgsberg wrote: >> The original code tests that shift and control are >> pressed, but it really should test modifers == SHIFT | CONTROL, that >> is, that those and *only* those modifiers are down. > > Watch out that this is only testing what the user thinks of as modifiers. I > did this and was burned by programs that failed if capslock, numlock, or > scrolllock was down. > > Though of course Wayland (and maybe XKB) can avoid this by making sure > things that are not what the user considers transient modifiers are just > not there, so zero means what you expect.
There's no such thing as a 'transient modifier' per se; in this case, the clue is in the names. For shortcut processing, you want to ignore locked modifiers and only test against physically depressed (and probably latched) modifiers, which the xkbcommon API fully allows for. Cheers, Daniel _______________________________________________ wayland-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/wayland-devel
