Auto key repeat in wayland.

Scott Moreau oreaus at gmail.com
Sun Mar 17 17:51:19 PDT 2013


On Sun, Mar 17, 2013 at 5:36 PM, Yichao Yu <yyc1992 at gmail.com> wrote:
> Hi,
>
> Seems that weston uses a client side keyboard auto-repeat that is
> HARD-CODED in `window.c` and I haven't seen anywhere in wayland's
> mentioning how this should be done in wayland. There doesn't seem to
> be a place where the client can get a recommended repeat delay and
> frequency from the server either. Does it mean each program/toolkit
> will then have it's own key repeat setting or even hard coded in the
> code that cannot be change without a recompiling (and in either case
> it is not possible to set it globally anymore)???
>
> Why can't this be done in the server or shouldn't a least a
> recommended value that can also be set from client be added?
>
> Yichao Yu

Hi Yichao,

I have asked about this several months ago and the decision was made
by wayland developers that each toolkit should implement this feature
if they would like to have it. My position is that the key repeat
events should originate from compositor side. Not only would this give
this expected behavior of a consistent key repeat timing and always be
available by default, but it would let us have things such as key
repeat for key bindings in the compositor. Martin also expressed that
even the Linux kernel has key repeat functionality. Here is a quote
from Martin on IRC:

<min2_> there is a key repeat functionality in kernel btw, no need to
recreate in toytoolkit

There's no reason this should be a client-side implementation. It is
hard to get wrong in a single implementation but having a desktop with
each client supporting it differently or not at all is just
ridiculous. The sheer code and effort duplication that would be
required is entirely unacceptable. I don't think this is an option, I
think this is a requirement of any sane display server for a desktop
platform.

- Scott


More information about the wayland-devel mailing list