đŸ•šī¸ Using a PS3 Navigation Controller on Arch Linux

📆 2026-10-15 14:10

Everything here runs on Arch Linux with X11 and dwm:

🐧 Arch Linux Installation

đŸĒŸ Install dwm (Dynamic Window Manager)

Install the required packages

I needed to install Bluetooth utilities, Python, the Python input-device library, xdotool, evtest and triggerhappy.

Setup PS3 Navigation Controller

Pair the controller

Power on the PS3 Navigation Controller and open the Bluetooth control utility:

Inside bluetoothctl, run the following commands:

Once the controller appears, use its Bluetooth address in place of CONTROLLER_MAC:

Give the controller a stable device path

Linux assigns input devices names such as /dev/input/event19. That number can change after reconnecting the controller or rebooting, so hardcoding it in scripts is not ideal.

Instead, create a udev rule that gives the controller a predictable symlink:

and add this rule:

Reload the udev rules and apply them:

Turn the analog stick into a mouse

The analog stick reports its position through Linux input events. A Python script reads those events and uses xdotool to move the mouse pointer. I like keeping my custom scripts inside .config/scripts and store them inside my dotfiles repository.

Create the script:

Add the following code:

And make it executable with chmod +x

Now that the analog stick will act as a mouse we can

Configure triggerhappy

First of all edit the triggerhappy service:

And paste this:

Make sure you paste the code above between:

Together, these settings make the controller listener start after bluetooth is started, use the intended configuration and input device, and recover automatically if the daemon stops. Enable the service with:

Configure navigation controller buttons

The analog stick handles mouse movement, but the physical buttons are handled by triggerhappy. I chose the X button to open Netflix.com in Firefox and make it full screen and the O button to open HBOMax.com.

Netflix Script

Of couse, the HBOMax one the same but the URL is changed when launching firefox.

Identify the controller buttons

If you want to bind a different button or simply figure out which button corresponds to which Linux input event, evtest is your friend.

Now press and release the buttons you want to identify. The output will show the event name, code, and value. For example here's what happens when you press the Up arrow on the DPAD:

My triggerhappy conf

Finishing touches

Restart triggerhappy with:

and start the navigation controller "mouse" script at login:

And there you have it. If you chose to use a navigation controller yourself and use my triggerhappy config:

It's a fun way to repurpose old hardware and make an Arch Linux machine more comfortable to use from the couch. đŸ›‹ī¸ + 🎮 = đŸ“Ŋ + đŸŋ

If this tutorial saved you time, sanity, or a mild existential crisis... consider fueling future chaos with a small donation:

☕ Buy me a Ko-Fi

🎓 Back to my tutorials

đŸšļ Back to my homepage