LLMpediaThe first transparent, open encyclopedia generated by LLMs

libinput

Generated by GPT-5-mini
Note: This article was automatically generated by a large language model (LLM) from purely parametric knowledge (no retrieval). It may contain inaccuracies or hallucinations. This encyclopedia is part of a research project currently under review.
Article Genealogy
Parent: Freedesktop.org Hop 4
Expansion Funnel Raw 58 → Dedup 17 → NER 15 → Enqueued 12
1. Extracted58
2. After dedup17 (None)
3. After NER15 (None)
Rejected: 2 (not NE: 2)
4. Enqueued12 (None)
Similarity rejected: 2
libinput
Namelibinput
DeveloperWayland project contributors
Released2013
Operating systemLinux kernel
LicenseMIT License

libinput

libinput is a userspace input handling library used by Wayland compositors and X.Org Server via wrappers. It consolidates input handling for keyboards, mice, touchpads, touchscreens, and tablet devices to provide consistent behavior across GNOME, KDE, Sway, and other compositors. libinput aims to unify features previously split among projects including evdev, X.Org Server, and custom compositor input code.

Overview

libinput centralizes low-level input event processing for environments that use Wayland or integrate with X.Org Server compatibility layers. It interacts with the Linux kernel input subsystem and layers such as evdev and udev to enumerate and manage devices. The library is used by projects like GNOME, KDE, Sway, Weston, Enlightenment, and session managers including systemd-integrated environments.

Architecture and Components

libinput's architecture interfaces with the Linux kernel via evdev nodes and relies on udev device properties supplied by systemd. Core components include device discovery, event dispatch, filtering, gesture recognition, and calibration modules. The project exposes APIs consumed by compositors such as Weston, GNOME Shell, KWin, and display servers like X.Org Server through wrappers such as xf86-input-libinput. For pointer handling, libinput implements algorithms similar to those used by Synaptics drivers and borrows design patterns from input stacks in Android and macOS pointer acceleration subsystems. Gesture recognition supports multi-finger gestures comparable to implementations in Apple Inc. and Microsoft frameworks.

Device Support and Features

libinput supports a range of hardware produced by companies like Logitech, Lenovo, Dell, HP, Wacom, Synaptics, Elan Microelectronics, Apple Inc., and Microsoft. Supported device classes include USB and Bluetooth mice, keyboards from Cherry, touchpads using Synaptics and Elantech protocols, touchscreens from Elo Touch Solutions, and tablets by Wacom. Features encompass pointer acceleration, scroll methods (edge, two-finger, button), tap-to-click emulation for touchpads, palm detection inspired by Wacom heuristics, middle-button emulation, button mapping, and multi-touch gesture detection comparable to Apple Inc. and Google implementations. libinput also handles specialized inputs such as joystick-style devices and gaming peripherals from Razer and SteelSeries via the generic evdev interface.

Configuration and API

libinput exposes a C API consumed by compositors like Weston, KWin, and Mutter inside GNOME Shell. Configuration is intentionally limited to encourage consistent defaults across environments; exposed options include device-specific settings discoverable via udev attributes and runtime parameters manageable by compositors or utilities like libinput-tools and graphical frontends created by GNOME and KDE. The API presents device objects, event sources, and dispatch hooks, requiring integration with mainloops such as those used by GLib and libev. For X compatibility, the driver xf86-input-libinput integrates with the X.Org Server input module architecture, mapping libinput semantics onto the XInput protocol.

History and Development

libinput originated around 2013 as a response to fragmentation in Linux input handling between X.Org drivers, desktop environments like GNOME and KDE, and Wayland compositor-specific codebases. Early contributors included developers from Red Hat, Collabora, Intel Corporation, and SUSE. The project evolved through discussions at conferences such as FOSDEM and X.Org Developer Conference, with design influences from evdev and commercial drivers by Synaptics and Wacom. Key milestones include initial releases supporting core pointer and touchpad features, upstreaming of xf86-input-libinput into X.Org Server, and ongoing work adding gesture and tilt support for tablet devices. Maintenance is coordinated via repositories hosted by organizations like freedesktop.org and community-driven code review workflows.

Adoption and Integration

Adoption spans major desktop environments and compositors: GNOME uses libinput through Mutter, KDE integrates via KWin, tiling compositors such as Sway and i3wm-adjacent projects rely directly on libinput, and display servers supporting X.Org Server use xf86-input-libinput. Device configuration utilities and GUIs from GNOME and KDE interact with libinput settings. Distributions including Debian, Ubuntu, Fedora, Arch Linux, openSUSE, and Gentoo Linux ship libinput as the default input stack for Wayland sessions. Integration efforts also involve graphics stacks like Mesa, compositors such as Weston and Enlightenment, and firmware projects like Coreboot where consistent input behavior is tested.

Category:Free software