[PATCH weston] input: don't send to clients key events eaten by bindings

Giulio Camuffo giuliocamuffo at gmail.com
Fri Oct 10 13:24:58 PDT 2014


2014-10-10 23:11 GMT+03:00 Bill Spitzak <spitzak at gmail.com>:
> On 10/10/2014 11:41 AM, Giulio Camuffo wrote:
>
>> Ok, so let's change the example. Space doesn't switch the active
>> window, but toggles the speaker mute. So hitting space will not send a
>> key event to the client, which will not know space is pressed, so your
>> nice space+x shortcut won't work.
>
>
> Yes this is what I am trying to fix. These is a much better example because
> it does not confuse things with focus changes, and also makes it more
> obvious where the error is.
>
> The desired result is that the user presses space and the speaker turns off.
> If they continue to hold down space and type 'x' then the client should act
> exactly like it is supposed to for the space+x shortcut. If it acts like 'x'
> without the space this is a serious failure to deliver expected results for
> the user.

This is just broken. Assuming this worked, the user would toggle the
speaker mute every time he tries to run that client shortcut.

>
> The client will do some kind of check to see if the space key is down. This
> should resemble as much as possible a round trip to actually see if the key
> is pressed on the hardware. I figured this involved peeking into the xkb
> structure to see what keys are held down.

"some kind of check". Making a roundtrip is not acceptable.

>
> But with the current design of the xkb interface this is going to return
> false, as changing the key-down map apparently is tied directly to key
> press/release events and to the focus changing events. There is no way to
> send changes to the key map without also sending one of these events. This
> needs to be fixed.
>
> I now think what happened is that somebody realized that a focus-change
> would fix this bug (since it sends the updated key pressed map to the client
> as a side-effect). However the patch is exactly backwards, it is trying to
> break it in the one case where it works correctly!

So, you after all have no objection to this patch, but to the general
way key bindings are implemented in Weston.
Please, find a way to make them work and send a patch.


More information about the wayland-devel mailing list