xinput(1)

๐Ÿ“ฆ
version 1.6.4 ยท 2 versions
, in alpine 3.24, arch rolling, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

๐Ÿ’– NAME ๐Ÿ’–

xinput โ€” the utility that configures and tests X input devices ๐Ÿ’… (it's xinput(1), straight outta the General Commands Manual, and honestly it's a whole icon)


โœจ SYNOPSIS โœจ

xinput [COMMAND] [OPTIONS] [DEVICE]

๐ŸŽ€ DESCRIPTION ๐ŸŽ€

xinput is a utility to list available input devices, query information about a device and change input device settings.

that's the entire job description bestie โ€” list, look, tweak ๐Ÿซถ


๐ŸŒธ COMMANDS ๐ŸŒธ

  • --version โ€” tests whether the X Input extension is even available, and returns the version number of the program and the version supported by the server. no device name needed for this one, she's independent ๐Ÿ’โ€โ™€๏ธ
  • list [--short || --long || --name-only || --id-only] [device] โ€” give it no argument and it lists all the input devices. give it an argument and it shows you all the features of that device. if --long is provided, the output includes detailed information about the capabilities of each device; otherwise, or if --short is provided, only device names and some minimal information get listed. if --name-only is provided, the output is limited to the device names, one device name per line. if --id-only is provided, the output is limited to the device IDs, one device ID per line. and heads up, for both of those: the order the devices are listed in is undefined. don't you dare hardcode it ๐Ÿ˜ญ
  • get-feedbacks device โ€” displays the feedbacks of device.
  • set-pointer device โ€” switches device into the core pointer. lowkey does nothing on X servers 1.5 and later, so on anything modern it's giving vintage ๐Ÿ’€
  • set-mode device ABSOLUTE|RELATIVE โ€” changes the mode of device.
  • set-ptr-feedback device threshold num denom โ€” changes the pointer acceleration (or feedback) parameters of device. the xset(1) man page has more details on this. for X.Org Server 1.7 and above there are additional device properties pertaining to pointer acceleration โ€” these do not replace, but complement the pointer feedback setting. both. not either. โœจ
  • set-integer-feedback device index value โ€” changes the value of an integer feedback of device.
  • set-button-map device map_button_1 [map_button_2 [...]] โ€” changes the button mapping of device. the buttons are specified in physical order (starting with button 1) and are mapped to the logical button you provide. 0 disables a button. the default button mapping for a device is 1 2 3 4 5 6 etc. ๐Ÿ’…
  • query-state device โ€” queries the device state. short, sweet, to the point, she ate.
  • list-props device [device [...]] โ€” lists the properties that can be set for the given device(s). yes, plural devices. plural slay. ๐Ÿ‘‘
  • set-int-prop device property format value โ€” sets an integer property for the device. appropriate values for format are 8, 16, or 32, depending on the property. Deprecated โ€” use set-prop instead ๐Ÿ™ˆ
  • set-float-prop device property value โ€” sets a float property for the device. Deprecated โ€” use set-prop instead ๐Ÿ™ˆ
  • set-prop [--type=atom|float|int] [--format=8|16|32] device property value [...] โ€” sets the property to the given value(s). if not specified, the format and type of the property are left as-is. the arguments are interpreted according to the property type. go read the CHANGING PROPERTIES section for the deets ๐Ÿงš
  • watch-props device โ€” prints to standard out when property changes occur. it just. watches. ๐Ÿ‘€
  • delete-prop device property โ€” deletes the property from the device. bye bestie ๐Ÿ’…
  • test [-proximity] device โ€” registers all extended events from device and enters an endless loop displaying the events received. if -proximity is given, ProximityIn and ProximityOut are registered. endless loop fr fr โ€” ctrl-c is your ride or die here.
  • test-xi2 [--root] [device] โ€” registers for a number of XI2 events and displays them. if a device is given, only events on this device are displayed. if --root is given, events are selected on the root window only. otherwise, a new client window is created (similar to xev).
  • create-master prefix [sendCore] [enable] โ€” creates a new pair of master devices on an XI2-enabled server with the given prefix. the server will create one master pointer named "prefix pointer" and one master keyboard named "prefix keyboard". if sendCore is 1, this pair of master devices is set to send core events (default). if enable is 1, this master device pair will be enabled immediately (default). defaults stacked on defaults, we love to see it ๐ŸŽ€
  • remove-master master [Floating|AttachToMaster] [returnPointer] [returnKeyboard] โ€” removes master and its paired master device. attached slave devices are set floating if Floating is specified or if the argument is omitted. if the second argument is AttachToMaster, returnPointer specifies the master pointer to attach all slave pointers to, and returnKeyboard specifies the master keyboard to attach all slave keyboards to.
  • reattach slave master โ€” reattaches slave to master.
  • float slave โ€” removes slave from its current master device.
  • set-cp window master โ€” sets the ClientPointer for the client owning window to master. master must specify a master pointer. no substitutions allowed bestie.
  • map-to-output device crtc โ€” restricts the movements of the absolute device to the RandR crtc. the output name must match a currently connected output (see xrandr(1)). if the NVIDIA binary driver is detected, or RandR 1.2 or later is not available, a Xinerama output may be specified as "HEAD-N", with N being the Xinerama screen number. this option has no effect on relative devices. if crtc is set to "all", the default behavior is applied.
  • enable device โ€” enables the device. this call is equivalent to xinput --set-prop device "Device Enabled" 1
  • disable device โ€” disables the device. this call is equivalent to xinput --set-prop device "Device Enabled" 0
  • device can be the device name as a string, or the XID of the device.
  • slave can be the device name as a string, or the XID of a slave device.
  • master can be the device name as a string, or the XID of a master device.
  • property can be the property as a string, or the Atom value.

๐Ÿ’œ CHANGING PROPERTIES ๐Ÿ’œ

when xinput should modify an existing driver property value, it is sufficient to provide the device name and property name as string, followed by the new value(s) of the property. for example:

xinput set-prop "my device" "my prop" 1 2 3

see? easy. no drama, no ceremony, just vibes โœจ


๐ŸŒˆ XWAYLAND ๐ŸŒˆ

Xwayland is an X server that uses a Wayland Compositor as backend. Xwayland acts as a translation layer between the X protocol and the Wayland protocol but does not have direct access to the hardware. the X Input Extension devices created by Xwayland ("xwayland-pointer", "xwayland-keyboard", etc.) map to the Wayland protocol devices, not to physical devices.

these X Input Extension devices are only visible to other X clients connected to the same Xwayland process. changing properties on Xwayland devices only affects the behavior of those clients. for example, disabling an Xwayland device with xinput does not disable the device in Wayland-native applications. other changes may not have any effect at all. ๐Ÿ˜ญ

in most instances, using xinput with an Xwayland device is indicative of a bug in a shell script, and xinput will print a warning. use the Wayland Compositor's native device configuration methods instead. bestie, this is not the move. ๐Ÿ™ˆ

โญ SEE ALSO โญ

X(7), xset(1), xrandr(1)


Copyright 1996,1997, Frederic Lepied.

Copyright 2007, Peter Hutterer.

Copyright 2008, Philip Langdale.

Copyright 2009-2011, Red Hat, Inc.


๐Ÿ‘‘ AUTHORS ๐Ÿ‘‘

  • Peter Hutterer <peter.hutterer@who-t.net>
  • Philip Langdale, <philipl@alumni.utexas.net>
  • Frederic Lepied, France <Frederic.Lepied@sugix.frmug.org>
  • Julien Cristau <jcristau@debian.org>
  • Thomas Jaeger <ThJaeger@gmail.com>
  • and more.

okay that's the whole page bestie ๐Ÿ’– this is X Version 11, xinput 1.6.4 โ€” go forth and configure your devices, you absolute legend ๐Ÿฆ‹โœจ