# 使用 Homebrew, apk, apt, dnf, MacPorts, Nix, zypper 安装 xinput

查看 xinput 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:xinput
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install xinput
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install xinput
```

  证据: MacPorts ports tree: x11/xinput/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add xinput
```

  证据: Alpine Linux edge package indexes: xinput from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install xinput
```

  证据: Debian stable package indexes: xinput from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install xinput
```

  证据: Fedora Rawhide package metadata: xinput from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#xinput
```

  证据: nixpkgs package indexes: pkgs/by-name/xi/xinput/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- zypper (92%):

```sh
sudo zypper install xinput
```

  证据: openSUSE Tumbleweed package metadata: xinput from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

## 软件包事实

- **软件包键:** brew:xinput
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/xinput>
- **版本:** 1.6.4
- **来源摘要:** Utility to configure and test X input devices
- **主页:** <https://gitlab.freedesktop.org/xorg/app/xinput>
- **上游文档:** <https://gitlab.freedesktop.org/xorg/app/xinput>
- **许可证:** MIT
- **源码归档:** <https://www.x.org/pub/individual/app/xinput-1.6.4.tar.xz>
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- xinput (cli)
- xinput (别名)

## 依赖

- libx11
- libxext
- libxi
- libxinerama
- libxrandr

## 构建依赖

- pkgconf
- xorgproto

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_big_sur, arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, big_sur, monterey, sonoma, ventura, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 1.6.4
- 本地数据: OK
- 上游仓库: https://gitlab.freedesktop.org/xorg/app/xinput
- 信息: No package-manager update timestamp was available.
- 信息: Release/tag comparison is only available for GitHub repositories.
## 项目历史与用法

xinput is the X.Org command-line utility for inspecting, testing, and changing X Input extension devices. It is the terminal user's bridge to X11 keyboards, mice, touchpads, tablets, buttons, valuators, feedbacks, properties, and XI2 event testing.

### 项目历史

The xinput manpage records a 1996-1997 copyright for Frederic Lepied, with later authors including Philip Langdale, Peter Hutterer, Julien Cristau, Thomas Jaeger, and others. That places the utility in the X Input extension lineage: a CLI companion to the protocol/library work that let X clients distinguish devices beyond the core keyboard and pointer.

The underlying X Input Extension was created to support additional input devices beyond the pointer and keyboard defined by the core X protocol. X Input 2 changed the model again: the XI2 specification lists the initial XI2 protocol release in October 2009, smooth scrolling/raw-event changes in December 2011, and multitouch support in March 2012. xinput's `--test_xi2` and property commands expose that newer input stack to users and maintainers.

### 采用历史

xinput became a standard troubleshooting and configuration tool for X11 desktops because input hardware became more complex than a keyboard and three-button mouse. Touchpads, tablets, external mice, button remaps, acceleration settings, device enable/disable state, and driver properties all created a need for a scriptable inspection tool.

Its adoption is mostly operational rather than glamorous: distribution wikis, support answers, and user dotfiles use xinput to discover device ids, list properties, change button maps, test event delivery, and patch input behavior at session startup. Under Wayland/XWayland its role is narrower, but for real Xorg sessions it remains the canonical package.

### 使用方式

Common commands include listing devices, querying a device's long information, listing properties, setting a property, changing a button map, switching absolute/relative mode, watching property changes, and testing events. Device arguments may be names or X ids, and properties may be names or Atom values.

Package users reach for xinput when a touchpad is too sensitive, a mouse button needs remapping, a tablet reports unexpected axes, a device needs disabling for a session, or an X client is not receiving expected input events. It is both an everyday workaround tool and a developer diagnostic for the X Input extension.

### 为什么软件包爱好者会关心

xinput matters because it packages a complicated display-server protocol into a small CLI that can be pasted into bug reports and startup scripts. That is exactly the sort of utility package that keeps old subsystems maintainable.

It also marks the transition from the core X pointer/keyboard model to modern multi-device input. XI2 concepts such as device hierarchy, raw events, smooth scrolling, and multitouch are abstract protocol features; xinput is how many users first see them as concrete device ids and properties.

### 时间线

- 1996-1997: the xinput manpage records Frederic Lepied's copyright.
- 2008: later xinput authorship/copyright credits include Philip Langdale.
- 2009-10: X Input Extension 2.0 is initially released, according to the XI2 protocol specification.
- 2011-12: XI2.1 adds new raw event behavior and smooth scrolling support.
- 2012-03: XI2.2 adds multitouch support.
- 2018-07-29: the xorg/app/xinput project appears in freedesktop.org GitLab metadata.

### Related projects

- libXi is the X Input extension client library documented by X.Org.
- The X Input Extension and XI2 protocol are the underlying protocol layers xinput exercises.
- Xorg is the server whose input devices and properties xinput queries and changes.
- xinput-gui is a small graphical wrapper around xinput for users who want immediate property editing.

### 来源

- <https://gitlab.freedesktop.org/api/v4/projects/xorg%2Fapp%2Fxinput>
- <https://gitlab.freedesktop.org/xorg/app/xinput>
- <https://xorg.freedesktop.org/archive/X11R7.5/doc/man/man1/xinput.1.html>
- <https://xorg.freedesktop.org/archive/X11R7.7/doc/inputproto/XI2proto.txt>
- <https://xorg.freedesktop.org/releases/X11R7.7/doc/libXi/inputlib.html>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** xinput
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## 其他软件包管理器记录

- Debian apt - xinput - 1.6.4-1: normalized package name match | Debian stable package indexes: xinput from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Runtime configuration and test of XInput devices
- Nix - xinput: normalized package name match | nixpkgs package indexes: pkgs/by-name/xi/xinput/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - xinput - 1.6.4-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: xinput from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Runtime configuration and test of XInput devices
- apk - xinput - 1.6.4-r2: normalized package name match | Alpine Linux edge package indexes: xinput from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Utility to configure and test XInput devices | https://xorg.freedesktop.org/
- apk - xinput-doc - 1.6.4-r2: normalized package name match | Alpine Linux edge package indexes: xinput-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Utility to configure and test XInput devices (documentation) | https://xorg.freedesktop.org/
- dnf - xinput - 1.6.4-7.fc45: normalized package name match | Fedora Rawhide package metadata: xinput from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Utility to query X Input devices | https://www.x.org
- zypper - xinput - 1.6.4-1.11: normalized package name match | openSUSE Tumbleweed package metadata: xinput from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Utility to configure and test X input devices | https://xorg.freedesktop.org/
- MacPorts - xinput: normalized package name match | MacPorts ports tree: x11/xinput/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## 相关链接

- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Homebrew utility packages](https://pkg.so/zh-hans/brew-utility-packages/) - Matched Homebrew package provider.
- [Secret-risk packages](https://pkg.so/zh-hans/secret-risk-packages/) - Matched curated package taxonomy and local package facts.
- [pkgconf](https://pkg.so/zh-hans/brew/pkgconf/) - Build dependency declared by Homebrew.
- [xorg-server](https://pkg.so/zh-hans/brew/xorg-server/) - Shares pkgdb curated category or tags: cli, system, x11, xorg.
- [xauth](https://pkg.so/zh-hans/brew/xauth/) - Shares pkgdb curated category or tags: cli, system, x11, xorg.
- [xkbcomp](https://pkg.so/zh-hans/brew/xkbcomp/) - Shares pkgdb curated category or tags: cli, system, x11, xorg.
- [libxcvt](https://pkg.so/zh-hans/brew/libxcvt/) - Shares pkgdb curated category or tags: cli, system, x11, xorg.
- [libxpm](https://pkg.so/zh-hans/brew/libxpm/) - Shares pkgdb curated category or tags: cli, system, x11, xorg.
- [xeyes](https://pkg.so/zh-hans/brew/xeyes/) - Shares pkgdb curated category or tags: cli, system, x11, xorg.
- [xinit](https://pkg.so/zh-hans/brew/xinit/) - Shares pkgdb curated category or tags: cli, system, x11, xorg.
- [xrdb](https://pkg.so/zh-hans/brew/xrdb/) - Shares pkgdb curated category or tags: cli, system, x11, xorg.
- [quartz-wm](https://pkg.so/zh-hans/brew/quartz-wm/) - Local package facts share a topical domain. Shared terms: cli, libx11, libxext, libxinerama, libxrandr.
- [twm](https://pkg.so/zh-hans/brew/twm/) - Local package facts share a topical domain. Shared terms: cli, libx11, libxext, libxrandr, system.

## Combined YAML source

View the package source record on GitHub. [combined/xinput.yml](https://github.com/mxcl/pkgdb/blob/main/combined/xinput.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
