[PATCH 1/4] Port Wayland clients to new xkbcommon API
daniel at fooishbar.org
Tue May 8 09:27:20 PDT 2012
On 8 May 2012 00:30, Bill Spitzak <spitzak at gmail.com> 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.
More information about the wayland-devel