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

Transcode to PSP using Handbrake

Source: Handbrake 0.9.9.5530 64-bit edition Target: (Phat) Playstation Portable PSP-1000 , System Software: 6.60 Many internet articles on how to transcode video to PSP using Handbrake have not worked for me. Even the most helpful are incomplete. I hope this post will help fill in the blanks. There is no longer any PSP preset for Handbrake, but from what I can gather, the preset had only limited success as the x264 encoder would change syntax and settings between versions. Other presets that may have worked before, like 'iPod' and 'Apple-Universal' now do not. Here is what worked for me, step by step:

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)

Dismissing Racism

Whenever white people kill people of colour, as in 2021's anti-Asian shootings in Atlanta Georgia , this sort of counter-commentary appears: "Since the killing of six Asian women who worked in massage parlors in Atlanta, the media has amplified the false narrative that “white supremacy” is to blame.  ... official crime stats show that white people are significantly underrepresented in terms of the violent crime threat they pose to Asians."  ... citing FBI statistics , whereas whites comprise 62% of the population, they committed 24% of crimes against Asians in 2018.  In comparison, blacks, who comprise 13% of the population, committed 27.5% of all violent crimes against Asian Americans in 2018.  So clearly, white people do not represent the biggest crime threat to Asian Americans." Not only is this an attack on the media and its imagined agenda, it also implies that Asians can't tell who's assaulting them.