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:
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.
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.
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.
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.
Comments
Post a Comment