Freeplaytech Forum
How to reprogram hotkey switch - Printable Version

+- Freeplaytech Forum (https://forum.freeplaytech.com)
+-- Forum: Freeplay Zero / Freeplay CM3 / Game Pie Advance (https://forum.freeplaytech.com/forumdisplay.php?fid=24)
+--- Forum: Freeplay Zero/CM3 (AKA GPA) Software (https://forum.freeplaytech.com/forumdisplay.php?fid=26)
+--- Thread: How to reprogram hotkey switch (/showthread.php?tid=4608)



How to reprogram hotkey switch - jouska - 04-24-2018

Hi everyone, I messed up my power on/off switch during the build so now I have to use a screwdriver to reach the hotkey switch. I've been trying to figure out how to reprogram the hotkey switch to a different button with no luck, as well as create a hotkey combination that will turn off the Freeplay Zero. Thanks


RE: How to reprogram hotkey switch - Flavor - 04-24-2018

Hey Jouska! Turning off the Freeplay Zero shouldn't be too difficult (from a software perspective). In the main menu, you can hit the START button, and somewhere in there is a shutdown option.

Offhand, if I recall correctly, the shutdown script is located at /home/pi/Freeplay/Freeplay-Support/shutdown_daemon.py
It should look like this: https://github.com/TheFlav/Freeplay-Support/blob/master/shutdown_daemon.py

Here's the line that tells it which button (GPIO) is used for shutdown.
STOP_REQ = 20 # Stop/start button input, active low to shutdown RPi

As for the hotkey feature, you can change the hotkey. A lot of people use SELECT as a hotkey.
From the main menu, hit START. Then select CONFIGURE INPUT. Hold down the A button to start the process. For any button that you don't have, just hold down A to skip it. When you get to the last item, it's HOTKEY. Just tap SELECT (or whatever else you want the hotkey to be). [I would normally double-tap the power button to define the hotkey as power.]

Now, having said all that, if you need a new power button, you should let me know. Maybe the real solution is to just replace/repair it. Go to https://www.freeplaytech.com/contact/ and select the SUPPORT option if you want help with that.