Linux command
ds4 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Monitor
ds4
Watch a specific
ds4 [/dev/hidraw0]
Show
ds4 --help
说明
ds4 is a small command-line monitor for Sony DualShock 4 (PS4) controllers connected to a Linux machine over USB or Bluetooth. It opens the controller's hidraw node, parses incoming HID input reports, and continuously prints the decoded state of every analog stick, trigger, button, touchpad point, gyroscope axis, accelerometer axis and battery indicator. Unlike ds4drv, which creates virtual gamepad and mouse devices via uinput, ds4 does not emulate any input devices — it only reads and prints. This makes it useful for verifying that a controller is detected, debugging button mappings before configuring a wrapper such as antimicrox or AntiMicroX, reverse-engineering vendor-specific HID reports, or characterising sensor drift on the IMU. The tool is written in Go and distributed in source form via the Go module path github.com/kenshaw/ds4. The first positional argument can override the auto-detected hidraw device path.
FAQ
What is the ds4 command used for?
ds4 is a small command-line monitor for Sony DualShock 4 (PS4) controllers connected to a Linux machine over USB or Bluetooth. It opens the controller's hidraw node, parses incoming HID input reports, and continuously prints the decoded state of every analog stick, trigger, button, touchpad point, gyroscope axis, accelerometer axis and battery indicator. Unlike ds4drv, which creates virtual gamepad and mouse devices via uinput, ds4 does not emulate any input devices — it only reads and prints. This makes it useful for verifying that a controller is detected, debugging button mappings before configuring a wrapper such as antimicrox or AntiMicroX, reverse-engineering vendor-specific HID reports, or characterising sensor drift on the IMU. The tool is written in Go and distributed in source form via the Go module path github.com/kenshaw/ds4. The first positional argument can override the auto-detected hidraw device path.
How do I run a basic ds4 example?
Run `ds4` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
Where can I find more ds4 examples?
This page includes 3 examples for ds4, plus related commands for nearby Linux tasks.