EVDEV(4)
β¨ EVDEV(4) β¨
the generic Linux input driver β straight out of the Kernel Interfaces Manual, section 4 π
π NAME π
evdev β the generic Linux input driver, bestie. that's the whole name. iconic.
πΈ SYNOPSIS πΈ
Section "InputDevice"
Identifier "devname"
Driver "evdev"
Option "Device" "devpath"
Option "Emulate3Buttons" "True"
Option "Emulate3Timeout" "50"
Option "GrabDevice" "False"
...
EndSection
likeβ¦ yes that ... is literally in there. it means and so on, not that I forgot to finish my sentence π
π¦ DESCRIPTION π¦
okay so evdev is an Xorg input driver for Linux's generic event devices. generic event devices. which means it supports, like, everything the kernel knows about β most mice, keyboards, tablets and touchscreens all live here. no cap. and it's the default driver on the major Linux distributions, so if you're on a normal distro you're probably already running it and didn't even know. main character behavior, honestly. π
here's the tea: the evdev driver can serve as both a pointer and a keyboard input device. and multiple input devices? supported, through multiple instances of this driver β one InputDevice section in your xorg.conf per input device that's gonna use this driver. one section, one device, no sharing, we don't do that here π«Ά
π little PSA from me to you: it's recommended thatevdevdevices get configured through theInputClassdirective (go peek atxorg.conf(5)) instead of doing manual per-device configuration. why? because devices configured inxorg.conf(5)are not hot-plug capable. like, plug it in and nothing happens. tragic. don't do that to yourself.
π SUPPORTED HARDWARE π
in general? if the kernel has a driver for an input device, evdev can access it. that's the vibe. that's the whole rule. for a complete list, go read the Linux kernel documentation β the kernel docs are the source of truth here, I'm just the messenger π§
β¨ CONFIGURATION DETAILS β¨
okay bestie so first things first π β for the general deets and all the options that work with literally every input driver, go check xorg.conf(5). This section? This section is only the stuff that's specific to this driver, no cap.
The following driver Options are supported, and yes we're going through all of them, grab a snack π:
Option "ButtonMapping" "string"β sets the button mapping for this device. The mapping is a space-separated list of button mappings that line up in order with the physical buttons on the device (so like, the first number is the mapping for button 1, the next for button 2, etc. etc.). The default mapping is"1 2 3 ... 32". A mapping of0deactivates the button, and multiple buttons can absolutely share the same mapping, that's valid π . For example, a left-handed mouse with a deactivated scroll-wheel would use a mapping of"3 2 1 0 0". Invalid mappings are ignored and the default mapping is used instead. Buttons you didn't specify in your mapping just use the default mapping. easy.Option "Device" "string"β specifies the device through which the device can be accessed. This will generally be of the form/dev/input/eventX, where X is some integer. The mapping from device node to hardware is system-dependent. Property:"Device Node"(read-only).Option "DragLockButtons" "L1 B2 L3 B4"β sets "drag lock buttons" that simulate holding a button down, so that low dexterity people do not have to hold a button down at the same time they move a mouse cursor. The button numbers occur in pairs, with the lock button number occurring first, followed by the button number that is the target of the lock button. Property:"Evdev Drag Lock Buttons".Option "DragLockButtons" "M1"β sets a "master drag lock button" that acts as a "Meta Key", indicating that the next button pressed is to be "drag locked". Property:"Evdev Drag Lock Buttons".Option "Emulate3Buttons" "boolean"β enable/disable the emulation of the third (middle) mouse button for mice which only have two physical buttons. The third button is emulated by pressing both buttons simultaneously. Default: off. Property:"Evdev Middle Button Emulation".Option "Emulate3Timeout" "integer"β sets the timeout (in milliseconds) that the driver waits before deciding if two buttons were pressed "simultaneously" when 3 button emulation is enabled. Default: 50. Property:"Evdev Middle Button Timeout".Option "Emulate3Button" "integer"β specifies the physical button number to be emitted if middle button emulation is triggered. Default: 2. Property:"Evdev Middle Button Button".Option "EmulateWheel" "boolean"β enable/disable "wheel" emulation. Wheel emulation means emulating button press/release events when the mouse is moved while a specific real button is pressed. Wheel button events (typically buttons 4 and 5) are usually used for scrolling. Wheel emulation is useful for getting wheel-like behaviour with trackballs. It can also be useful for mice with 4 or more buttons but no wheel. See the description of the EmulateWheelButton, EmulateWheelInertia, EmulateWheelTimeout, XAxisMapping, and YAxisMapping options. Default: off. Property"Evdev Wheel Emulation".Option "EmulateWheelButton" "integer"β specifies which button must be held down to enable wheel emulation mode. While this button is down, X and/or Y pointer movement will generate button press/release events as specified for the XAxisMapping and YAxisMapping settings. If the button is0and EmulateWheel is on, any motion of the device is converted into wheel events. Default: 4. Property:"Evdev Wheel Emulation Button".Option "EmulateWheelInertia" "integer"β specifies how far (in pixels) the pointer must move to generate button press/release events in wheel emulation mode. Default: 10. Property:"Evdev Wheel Emulation Inertia".
This value must be set for any device that does not resemble a standard mouse. Specifically, on absolute devices such as tablets the value should be set to a reasonable fraction of the expected movement to avoid excess scroll events.
WARNING: the name "inertia" is a misnomer, bestie, it's giving fake news π. This option defines the distance required to generate one scroll event similar to the VertScrollDelta and HorizScrollDelta options. It does not enable inertia in the physical sense β scrolling stops immediately once the movement has stopped. periodt.
Option "EmulateWheelTimeout" "integer"β specifies the time in milliseconds the EmulateWheelButton must be pressed before wheel emulation is started. If the EmulateWheelButton is released before this timeout, the original button press/release event is sent. Default: 200. Property:"Evdev Wheel Emulation Timeout".Option "EmulateThirdButton" "boolean"β enable third button emulation. Third button emulation emits a right button event (by default) by pressing and holding the first button. The first button must be held down for the configured timeout and must not move more than the configured threshold for the emulation to activate. Otherwise, the first button event is posted as normal. Default: off. Property:"Evdev Third Button Emulation".Option "EmulateThirdButtonTimeout" "integer"β specifies the timeout in milliseconds between the initial button press and the generation of the emulated button event. Default: 1000. Property:"Evdev Third Button Emulation Timeout".Option "EmulateThirdButtonButton" "integer"β specifies the physical button number to be emitted if third button emulation is triggered. Default: 3. Property:"Evdev Third Button Button".Option "EmulateThirdButtonMoveThreshold" "integer"β specifies the maximum move fuzz in device coordinates for third button emulation. If the device moves by more than this threshold before the third button emulation is triggered, the emulation is cancelled and a first button event is generated as normal. Default: 20. Property:"Evdev Third Button Emulation Threshold".Option "GrabDevice" "boolean"β force a grab on the event device. Doing so will ensure that no other driver can initialise the same device, and it will also stop the device from sending events to/dev/kbdor/dev/input/mice. Events from this device will not be sent to virtual devices (e.g. rfkill or the Macintosh mouse button emulation). Default: disabled.Option "InvertX" "Bool"Option "InvertY" "Bool"β invert the given axis. Default: off. Property:"Evdev Axis Inversion".Option "IgnoreRelativeAxes" "Bool"Option "IgnoreAbsoluteAxes" "Bool"β ignore the specified type of axis. Default: unset. The X server cannot deal with devices that have both relative and absolute axes. Evdev tries to guess which axes to ignore given the device type and disables absolute axes for mice and relative axes for tablets, touchscreens and touchpad. These options allow to forcibly disable an axis type. Mouse wheel axes are exempt and will work even if relative axes are ignored. No property, this configuration must be set in the configuration. If either option is set toFalse, the driver will not ignore the specified axes regardless of the presence of other axes. This may trigger buggy behavior and events from this axis are always forwarded. Users are discouraged from setting this option. like fr, don't do it πOption "Calibration" "min-x max-x min-y max-y"β calibrates the X and Y axes for devices that need to scale to a different coordinate system than reported to the X server. This feature is required for devices that need to scale to a different coordinate system than originally reported by the kernel (e.g. touchscreens). The scaling to the custom coordinate system is done in-driver and the X server is unaware of the transformation. Property:"Evdev Axis Calibration".Option "Mode" "Relative"|"Absolute"β sets the mode of the device if device has absolute axes. The default value for touchpads is relative, for other absolute. This option has no effect on devices without absolute axes.Option "SwapAxes" "Bool"β swap x/y axes. Default: off. Property:"Evdev Axes Swap".Option "XAxisMapping" "N1 N2"β specifies which buttons are mapped to motion in the X direction in wheel emulation mode. Button number N1 is mapped to the negative X axis motion and button number N2 is mapped to the positive X axis motion. Default: no mapping. Property:"Evdev Wheel Emulation Axes".Option "YAxisMapping" "N1 N2"β specifies which buttons are mapped to motion in the Y direction in wheel emulation mode. Button number N1 is mapped to the negative Y axis motion and button number N2 is mapped to the positive Y axis motion. Default:"4 5". Property:"Evdev Wheel Emulation Axes".Option "TypeName" "type""β specify the X Input 1.x type (seeXListInputDevices(3)). There is rarely a need to use this option, evdev will guess the device type based on the device's capabilities. This option is provided for devices that need quirks.Option "VertScrollDelta" "integer"β the amount of motion considered one unit of scrolling vertically. Default:"1". Property:"Evdev Scrolling Distance".Option "HorizScrollDelta" "integer"β the amount of motion considered one unit of scrolling horizontally. Default:"1". Property:"Evdev Scrolling Distance".Option "DialDelta" "integer"β the amount of motion considered one unit of turning the dial. Default:"1". Property:"Evdev Scrolling Distance".Option "Resolution" "integer"β sets the resolution of the device in dots per inch. The resolution is used to scale relative motion events from mouse devices to 1000 DPI resolution. This can be used to make high resolution mice less sensitive without turning off acceleration. If set to 0 no scaling will be performed. Default:"0".
π SUPPORTED PROPERTIES π
okay so these are all the properties the evdev driver hands out like little friendship bracelets. each one's a runtime knob you can poke (iykyk) and they're listed right here, no cap:
π Evdev Axis Calibration
4 32-bit values, and the order is min-x, max-x, min-y, max-y. or, if you're feeling β¨unbotheredβ¨, 0 values to disable in-driver axis calibration entirely.
π Evdev Axis Inversion
2 boolean values (8 bit, so 0 or 1), order X, Y. 1 inverts the axis. that's it. that's the whole vibe.
π Evdev Axes Swap
1 boolean value (8 bit, 0 or 1). 1 swaps x/y axes. lowkey iconic.
π Evdev Drag Lock Buttons
8-bit. either 1 value or pairs of values. value range 0-32, and 0 disables a value.
π Evdev Middle Button Emulation
1 boolean value (8 bit, 0 or 1).
π Evdev Middle Button Timeout
1 16-bit positive value.
π Evdev Middle Button Button
1 8-bit value, allowed range 0-32, and 0 disables the button.
π Evdev Wheel Emulation
1 boolean value (8 bit, 0 or 1).
π Evdev Wheel Emulation Axes
4 8-bit values, order X up, X down, Y up, Y down. 0 disables a value.
π Evdev Wheel Emulation Button
1 8-bit value, allowed range 0-32, 0 disables the button.
π Evdev Wheel Emulation Inertia
1 16-bit positive value.
π Evdev Wheel Emulation Timeout
1 16-bit positive value.
π Evdev Scrolling Distance
3 32-bit values: vertical, horizontal and dial. three lil numbers, three whole directions, slay.
π AUTHORS π
the masterminds, the main characters, the people who actually did the homework:
- Kristian HΓΈgsberg
- Peter Hutterer
π SEE ALSO π
go read these next bestie, they're the whole extended universe:
and that's the whole page, bestie!! π
β¨ this lil masterpiece is from X Version 11, xf86-input-evdev 2.11.0, filed under EVDEV(4). go forth and configure ur mouse, u absolute legend π¦ππ«Ά
π¦ where this page comes from
- alpine 3.24: xf86-input-evdev-doc 2.11.0-r0 Β· MIT
- arch rolling: xf86-input-evdev 2.11.0-1 Β· HPND-sell-variant AND MIT
- debian trixie: xserver-xorg-input-evdev 1:2.11.0-1
- fedora 43: xorg-x11-drv-evdev 2.11.0-3.fc43 Β· HPND-sell-variant AND MIT
- fedora 44: xorg-x11-drv-evdev 2.11.0-4.fc44 Β· HPND-sell-variant AND MIT
- nixos 26.05: xf86-input-evdev 2.11.0
- nixpkgs unstable: xf86-input-evdev 2.11.0
- ubuntu questing: xserver-xorg-input-evdev 1:2.11.0-1
- ubuntu resolute: xserver-xorg-input-evdev 1:2.11.0-1build1
- ubuntu stonking: xserver-xorg-input-evdev 1:2.11.0-1build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms