Joystick/controller input in text UI menus?
-
The Retropie setup script accepts joystick input. I'm working on a script that can be run from within emulationstation that I'd like users without a keyboard to be able to run, or at least cleanly exit from.
The script is working fine with keyboard input, but doesn't accept any joystick input. It's a fairly simple script, built with the "dialog" utility. Does anyone know how to enable joystick input in dialog, or what text UI tool that does support controller input is used to create RetroPie-Setup? I tried reading through the script files, but couldn't make heads or tails of them.
Pi Model or other hardware: 3B+
Power Supply used: Canakit
RetroPie Version Used: 4.4
Built From: Pre made SD Image on RetroPie website
USB Devices connected: Logitech wireless keyboard, Buffalo Classic USB controller -
RetroPie uses
joy2key
to simulate a keyboard using the gamepad. Look in the RetroPie scripts which usedialog
to see how it's used - i.e. the Wifi setup dialog, the scraper configuration screen, etc. -
Take a look at my post here: https://retropie.org.uk/forum/topic/18978/script-setup-for-an-automatic-savestate-selector/8#
I had the exact same problem and could solve it.In short, RetroPie uses Joy2Key to map jystick input to keyboard input to let users navigate menus with their joysticks. There are scripts which can be used to 'borrow' that function. Feel free to look at my script to see how I did that.
Here's my script: https://github.com/Jandalf81/savestate_selector/blob/master/savestate_selector.sh
-
Thanks. Worked perfectly.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.