hn.today

Using a PS3 Navigation Controller on Arch Linux

sava.rocks3 points1 comments
Screenshot of Using a PS3 Navigation Controller on Arch Linux

A practical how-to for turning a PS3 Navigation Controller into a usable input device on an Arch Linux system running X11 and dwm. It walks through installing bluez, python-evdev, xdotool, evtest and triggerhappy, pairing the controller with bluetoothctl, and creating a udev rule that symlinks the controller to a stable device path (e.g., /dev/input/navigation-controller). A Python script using evdev reads ABS_X/ABS_Y events, applies center, deadzone and max-speed values, and issues relative mouse moves with xdotool; the script includes retry logic to survive disconnects and is intended to run at login via .xinitrc.

Button handling is delegated to triggerhappy, with instructions to override its systemd unit so it starts after Bluetooth and watches the stable device. Examples include shell scripts that open Firefox to Netflix or HBO Max and use xdotool to fullscreen, plus a triggerhappy configuration mapping buttons to actions: X launches Netflix, O launches HBO Max, L1 toggles Play/Pause, L2 and L3 simulate right/left mouse clicks, the PS button sends super+q to close windows, and the D‑pad sends arrow keys. evtest is recommended to identify button codes. The result is a couch-friendly setup that repurposes an old controller as a wireless mouse and media launcher.

Read on sava.rocks1 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Hardware

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.