Changing key repeat behaviour for individual xinput devices
ilan at tzirechnoy.com
Mon Mar 18 10:21:56 UTC 2019
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,
> > I recently got a small bluetooth keyboard. I'd like to try to use it as
> > a secondary keyboard for things like shortcuts, but my first experiment
> > was to turn it into a midi keyboard with a combination of PortMIDI and
> > xinput float + xinput test. Unfortunately, it has a pretty aggressive
> > key repetition rate set up.
> > The right way to fix this would normally be xset, but IIUC that'd change
> > the behavior of all connected keyboards. xinput has a flag
> > --get-feedbacks that gets me an XkbdFeedbackClass with
> > "global_auto_repeat" and percent/pitch/duration properties. I'd assume
> > that's the right thing to change, but it looks like the only classes
> > xinput's commandline utility lets me change are ptr-feedback and
> > integer-feedback, which seems to be about acceleration and scaling or
> > something like that?
> > Will I have to write a little snippet of C to change these particular
> there is/was an "xkbset" utility, not sure if that supports per-device flags
> though. there's also the option of setting a custom keymap for that device
I had checked xset, xkbset, xinput, xkbcomp -- all of them either
don't have global rate controls or are using core device.
> (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
But this looks ridiculous -- to press some key when a user just
wants to disable repeat.
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:
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.
More information about the xorg