Skip to main content

Gamepad Mouse on Raspbian

Use a USB gamepad as a Raspberry Pi mouse.
Raspbian supports mice out of the box, but what if you want to use a USB gamepad to move the pointer around (and click buttons) instead?
I'm currently using a Logitech Dual Action gamepad to control my Raspberry Pi running Raspbian Stretch. Here's what I did:

Install Packages

Install the following through Add/Remove Software or the command line (sudo apt install):
  • joystick - drivers and useful joystick/gamepad test programs.
  • jstest-gtk - windowed test program.
  • xserver-xorg-input-joystick - enables joystick control of windowing system
  • qjoypad - enables reconfiguration and remapping of joystick events.
This should automatically install dependencies.

Reboot.

Note: rebooting with mouse and gamepad both connected through the same USB hub seemed to disable both devices. So you may wish to connect at least one directly to the Pi.

Configure

My gamepad-as-mouse defaults to left-thumbstick for movement, and buttons 1 and 2 mapped directly.

If this does not suit, use QJoyPad to remap the joystick input.

You'll have to run QJoyPad it every session unless you set it to run on startup.

Troubleshoot

Use jstest-gtk from the joystick package to test if your device is being detected.

Note

I wrote this because I could find no other guides on the internet. Feel free to suggest fixes.

Comments

Popular posts from this blog

Firefox History Statistics - Extracting from Places.sqlite

If you want to take a look at Firefox surfing activity, the about:me add-on is a good start. However, it presents only one view of data and is thus limited in its ability to present more detailed statistics. We will view that data in a different program. So let's first extract it from the browsing history stored in the Places.sqlite file into a CSV file using a Firefox add-on. Step 1 - Locate and copy Places.sqlite to a working location On Windows machines, Places.sqlite is found in a directory similar to: C:\Users\User1\AppData\Roaming\Mozilla\Firefox\Profiles\ .default\places.sqlite Copy the file to another location. The database will be locked while using Firefox, and the SQLite plugin we will use to open it.

Live Long and Prosper

Australia is becoming richer by getting older. Australian household net worth rose from an average of $764,500 in 2011-2012 to $1,022,000 in 2017-2018 . Those under 35 have barely seen any increase. The old, in particular the over-45s, are getting richer faster than the young. Older households are also a greater proportion of the sample, and of the population.

Scatterbox - build an Android Tor Socks Proxy Server

Cloak your location and create a firewall bypass device with a smartphone. 🕵Uses the Tor network . Does not require root. 1 - from Google Play, download and install: Orbot Orweb browser Socks Server Ultimate (Optional)