libretro / libretro/RetroArch

RetroPad HotKey Strings Not Found / Working

Open
#11,893 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
14.1k
Forks
2.2k
Avg merge
7h 35m
Merged PRs (30d)
51

Description

So after digging around there is many references to "RetroPad Select" RetroPad L1" "RetroPad A" Etc. You get the idea. Well we are supposed to have the option to link hotkey to RetroPad buttons. Such As

Input_enable_hotkey = "RETRO_DEVICE_ID_JOYPAD_START"
Input_menu_toggle = "RETRO_DEVICE_ID_JOYPAD_A"
Input_exit_emulator = "RetroPad B"
Input_save_state = "RetroPad Down"
Input_load_state = "RetroPad Up"
Input_state_slot_increase = "RetroPad Right"
Input_state_slot_decrease = "RetroPad Left"

I am try to figure this out so it will make programming the hotkeys for over 22+ controllers just a little easier. The official documents say "Tip! Hotkeys Can Be Mapped To RetroPad Buttons." This tip unfortunately does not explain the names that retroarch looks for to recognize the retropad settings. Based on each controller the hotkey values are different so for 1 controller the button that represents B might be "2" but it would be "7" on the next controller and "4" on the other controller. Well I have over 22 controllers thst will need programming so I decided it would be the perfect time to follow the guide and actually map the "RetroPad" that way instead of looking for button "1" to toggle menu it will be looking for "RetroPad A" That way whichever controller I am using the button that has been mapped to "RetroPad A" will be recognized as the hotkey. Doing in this manner will make things just a littler smoother when it comes to multiple controllers. So 2 issues the docs do not mention the code that retroarch is looking for to represent "RetroPad A" It could be just that "RetroPad A" or I also seen in some code "RETRO_DEVICE_ID_JOYPAD_A" so my friends what string represent "RetroPad A" also there is multiple input calls for a hotkey such as

Input_menu_toggle
Input_menu_toggle_axis
Input_menu_toggle_btn
Input_menu_toggle_mbtn

SO the million $ question is what is the string that will toggle the menu and make it use RetroPad A as the value? Sorry for the book but I just know if I am not clear It won't make sense.
So what's the total string to make the toggle menu work using any button as long as it is mapped to the "RetroPad A". And will I need to nul out any other button values as I know there are some cfg that take precedence. So thanks for your help I am sure one of you who actual work on this code daily will be like hey its this simple. I apologize for bothering but I have searched for a week now trying to find the answer so I figured it is time to ask the people who pump the blood into retroarch. Thank You ALLL so much for all the work you have put into this. If this works like I am thinking it should it might be a good commit because it will make programming multiple controllers much easier. I will take the time to work on the main files and bind everything and submit for review but this should make the basic hotkeys for a user much easier to use as basically any controller has an A & B Start and D-Pad they would have to change some of the more advanced hotkeys but the basic menu quit and saved functions will work better this way I think. Anyway if someone can help out atleast let me know my question would be great and I'll be able to move forward from there. Thanks again!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the documentation and input-handling entry points for RetroPad hotkeys, then trace how Input_menu_toggle and its axis, button, and mbutton variants are interpreted. Done means documenting the accepted string for RetroPad A and explaining any precedence or conflicting configuration values.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.