Auto key repeat in wayland.

Yichao Yu yyc1992 at gmail.com
Mon Mar 18 17:41:53 PDT 2013


On Mon, Mar 18, 2013 at 4:59 PM, Bill Spitzak <spitzak at gmail.com> wrote:
> For text, I would expect the input method is going to do the key-repeat. I

Not really, there may not be an input method, in which case the client
will get key events directly from the compositor, so the auto
repeating shouldn't depending on input method. Even if there is an
input method, since the input method will get key events from the
compositor from the same interface (wl_keyboard), the input method can
also get the auto repeat for free if the compositor does the repeating
for it (and this is actually why I come up with this problem).

> can't see any way around that. So for the most common use of key repeat it
> is going to be handled outside the client, and users will see a held-down
> letter repeatedly insert at the same rate in all clients (or at least all
> clients that also correctly work with input methods).
>
> If the user holds down a function key, imho it would be nice if the

By function key you mean direct key event from compositor
(wl_keyboard) instead of the input method interface (text_model)?...

> compositor did the repeat. The repeat events just have to be clearly
> identified so if a client really wants to do it's own rate, all it has to do

Well, I don't think a client should ever does it's own repeat rate,
although ignoring repeat is still useful in some cases. If only
keypress's are sent for auto-repeat, the client should be able to
distinguish that (if it want to).

> is ignore the repeat events. This does avoid annoying problems where clients
> on the same display disagree, and it
>
> For the same reasons, I also feel that holding the mouse button down should
> "repeat", and holding the mouse still should produce "hover events" (for
> highlight and popping up tooltips), mouse clicks should be marked with
> whether the compositor thinks they are "double", and dragging the mouse
> should produce a "this is a real drag" event when the compositor thinks it
> moves far enough that the user really is trying to move something. All these
> would get rid of the incredibly annoying mismatch between clients that
> current X and Windows programs have. Again the events just have to be
> clearly marked so it is easy for a client to ignore them and do it's own
> processing in cases it wants to be different.

Not completely agree with mouse button auto repeat (it sounds
weird..... :P ), but others may be useful if done correctly. Although
that should probably be a different story. No new protocol needs to be
added for keyboard repeat but what you have just proposed here
probably need some modification to the protocol..

Yichao Yu


More information about the wayland-devel mailing list