Changing key repeat behaviour for individual xinput devices

Ilya Anfimov ilan at tzirechnoy.com
Thu Mar 21 09:47:49 UTC 2019


On Thu, Mar 21, 2019 at 03:57:38PM +1000, Peter Hutterer wrote:
> On Mon, Mar 18, 2019 at 01:21:56PM +0300, Ilya Anfimov wrote:
> > On Fri, Mar 15, 2019 at 08:54:13AM +1000, Peter Hutterer wrote:
> > > On Wed, Mar 13, 2019 at 05:19:21PM +0100, Timo Paulssen wrote:
> > > > Hello xorgers,
> > > > 

[skipped]

> > 
> > > (setxkbmap and xkbcomp have deviceid options) but paging in *how* to disable
> > > autorepeat through an xkb map is beyond my mental capabilities right now.
> > 
> >  Well, it should be possible to enable toggle of repeat by adding
> > including AccessX(full) compat (sometimes already enabled,  often
> > enabled  AccessX(basic) ) and assigning RepeatKeys_Enable to some
> > key.
> > 
> >  But this looks ridiculous -- to press some key when a user  just
> > wants to disable repeat.
> 
> yeah, but that's what we have tools for. setxkbmap -layout looks simple, but
> what it does under the hood is a lot more involved.
 
 Well,  I  had  meant not the xkbcomp complexicity (well, in fact
for me the setxkbmap is more difficult to understand as  it  adds
some  levels  of  indirection) -- but rather the result of chang-
ing repeat via keymap with some key combination.

> 
> >  And  no, xkbcomp doesn't have direct enabling of repeat or other
> > XKBSetControl, there is no such words in xkb files. Also  libxkb-
> > file,  which  xkbcomp  uses  for changing server parameters -- it
> > have fields in it's structures for that controls --  but  it  ex-
> > plicitly skips setting XKBSetControls:
> > srvmisc.c:
> > 
> > #ifdef NOTYET
> >     if (!XkbSetControls(dpy,XkbAllControlsMask,xkb))
> >         return False;
> > #endif
> > 
> >  It  seems like would be good to add -dev option to xset and xkb-
> > set (for xset -- also for mouse controls) and rate or  maybe  all
> > XKBSetControls controls to xinput.
> 
> xset uses core protocol requests only so a -dev option wouldn't make sense
> here. xkbset could take device ids but I'm not sure it still has an upstream.

 In  fact  no, xset changes repeat rate via xkb (there is no such
a control in core), so it is (optionally, but almost universally)
compiled with xkb support.

> xinput - sure, I'll take pull requests.

 OK, will try sometime in the future.

> 
> Cheers,
>    Peter
>  


More information about the xorg mailing list