examples of using xinput?
peter.hutterer at who-t.net
Sun Sep 20 02:32:08 PDT 2009
Excerpts from Tom Horsley's message of Sun Sep 20 09:52:17 +1000 2009:
> OK, I've been trying to understand the "official" new way to configure
> my trackball for draglock and to shuffle buttons around to my liking,
> and while I can tell from web searches that the "xinput" tool may indeed
> be the way to do this, I am left completely bumfuzzled by how the heck
> I am supposed to use it. The man page is utterly cryptic and many hours of
> web searches have turned up zero examples that might give me a hint.
> Or if the xinput tool isn't really what I want, what is the tool I want?
xinput may be used to configure devices at runtime, yes. It's like a swiss
army knife though and while quite universally applicable for this not the
best user interface. Ideally, the desktop environments will configure this
stuff soon but until then:
xinput --set-int-prop "device name" "property name" <format> <value> <value>
you can get the deivce name through xinput --list --short, the property name
through xinput --list-props "device name". For example the following command
turns draglock on the trackstick thingy on for button 4:
xinput --set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Drag Lock Buttons" 8 4
the format is 8-bit (as described in the man page).
if you have xinput from git, it'll guess type and format automatically when
you run with --set-prop.
Button mapping is currently not handled by a property so it's still
xinput --set-button-map "device name" 1 2 3 4 5...
More information about the xorg