Homepage › Forums › RetroPie Project › Controller Configuration in RetroPie › Using a Save and Load Hotkey
- This topic has 7 replies, 2 voices, and was last updated 8 years, 10 months ago by Floob.
-
AuthorPosts
-
01/08/2016 at 17:58 #113446joshParticipant
Using a Save and Load Hotkey
I have looked up many sources but simply cannot find the answer to my question.
How can I set up a Save and Load Hotkey using Keyboard Input?
I know how I might be able to use this with a controller but don’t know how to do it with a keyboard. I am making a product much like the PiGRRL and I am using Adafruit’s Retro Game program to convert the GPIO signals to Keyboard Input. This all works fine for games but I simply can’t get it to work with keyboard hotkeys.
I tried changing these lines:
# Saves state.
#input_save_state = x
# Loads state.
#input_load_state = z
to
# Saves state.
input_save_state = x + rshift
# Loads state.
input_load_state = z + rshift
This did not seem to work however. I would be very grateful for a response and will mention the name of who replied in an upcoming blog on how I made my Super Pi Boy…Thanks again,
Josh01/08/2016 at 21:15 #113453FloobMemberThe lines you edited above can only have a single key.
The hotkey enable would be here:
input_enable_hotkey =So you hold your enable hotkey down then tap the hotkey
input_save_state = x
input_enable_hotkey = rshiftwould mean holding Right Shift and tapping x would save the game, assuming no other hotkeys or functions are mapped to x.
01/09/2016 at 09:55 #113476joshParticipantHi Floob,
Thanks for the quick reply! I have tried this for save but it appears that just RShift alone (Select Button) saves the game and when I used the same code to load the game (changing x to z) nothing happens. No hotkeys are mapped to X however, because we are using the Gameboy buttons, it is not possible to create a dedicated save and load button and all of the buttons are used. Start + Select work fine to exit a game. However, Select (RShift) and A (Z) together don’t work to load the game at all.
Here’s the code:
# Saves state.
input_save_state = x
input_enable_hotkey = rshift
# Loads state
input_load_state = z
input_enable_hotkey = rshiftThanks again,
Josh01/09/2016 at 11:55 #113482FloobMemberThis line should only exist once in the whole file
input_enable_hotkey = rshiftCan you post your retroarch.cfg to pastebin.com and I’ll check it.
If possible, can you tell me what keyboard keys each of your buttons map to?
01/09/2016 at 14:30 #113488joshParticipantHere is my retroarch.cfg file:
http://pastebin.com/zBByPybD
My input is as follows:
Up, Down, Left and Right = The Arrow Keys
Start = R
Select = Q
A = Z
B = XIf it matters, I am using the default NES emulator, I don’t know if that would change anything?
Thanks again,
Josh
PS: It had only just occurred to me that I said rshift was select, that was in the Retroarch Config file, not what the actual inputs were through Emulationstation…01/09/2016 at 15:07 #113494joshParticipantMe and my Dad have had another look at the config file.
Firstly, we were originally editing /opt/retropie/emulators/retroarch/retroarch.cfg however it seems like we were editing the wrong directory…
This is the correct directory:
/opt/retropie/configs/all/retroarch.cfg
These are the lines of code that we used:
# Saves state.
input_enable_hotkey = q
input_save_state = x
# Loads state.
input_load_state = z
My Super Pi Boy project is now complete!
Also, make sure that you uncomment the input_load_state = z line.Thank you so very much Floob for helping me with this issue. I hope that this post will help everyone who needs to overcome this problem.
Thanks again,
Josh01/09/2016 at 15:08 #113495FloobMemberThis
input_enable_hotkey = qshould read
input_enable_hotkey = rshift
on the assumption your arcade stick sends a right shift single on the button you want to use as the enable hotkey.
Then pressing x on your arcade stick (The A button?) should save the game.
The hotkey enable for your usb PS3 controller will be held in the controller config file, so that parts separate. /opt/retropie/configs/all/retroarch-joypads/
Here is a (slightly outdated) video on hotkeys
01/09/2016 at 16:06 #113497FloobMemberGreat, glad its sorted. Yes, the correct file is /opt/retropie/configs/all/retroarch.cfg unless you need to edit controller files as well.
-
AuthorPosts
- The forum ‘Controller Configuration in RetroPie’ is closed to new topics and replies.