Add a keyboard hotkey and more ways to open the on-screen menus #699
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This will add:
The new option was added here:
Core Options → Input → Menu Activation InputsAvailable settings:
Ctrl+Home was used for the hotkey, because:
As far as i can see, it's very safe overall as a hotkey...
The standalone DOSBox Pure uses Ctrl+F12 to open the menu, but this wasn't used because:
I've also implemented Ctrl+Home in a way that can avoid unwanted in-game inputs. For example, the Ctrl key will fire the weapons in DOOM, but if you hold down Home first, and then press Ctrl, the menu will open without the weapon firing. So either Ctrl+Home or Home+Ctrl can be used, depending on the game. In standalone DBP, Ctrl followed by F12 will open the menu, but only in this specific order, which triggers in-game input whenever a game uses the Ctrl key (unavoidable weapon firing in DOOM).
The existing option in:
Input → Use L3 Button to Show Menuhas been renamed toMenu Behavior for L3 Button & HotkeyAvailable settings:
Open previous menu (default)
Previously this was named “On (Default to Menu)”. The name was changed to describe what it does. It still functions identical: opens the Start Menu on the first L3/hotkey press, then reopens the previously viewed menu on following presses.
Always open Start Menu (swap CDs/Disks)
New setting. It will always open the Start Menu. Intended for users who have no use for the other menus and just want a quick way change CDs/disks. I also put "(swap CDs/Disks)" in the name, being as some people have trouble finding out how to do this, so i tried to make it even more obvious.
Always open On-Screen Keyboard
Replaces "On (Default to On-Screen Keyboard)". Previously this setting opened the OSK first and then reopened the previously viewed menu, so it already behaved similarly to “Open previous menu (default)”. It's now been changed to always open the OSK. I think most controller/touchscreen users would likely prefer to always open the OSK immediately.
Always open Gamepad Mapper
New setting. Does exactly what it says. Useful for when first configuring the controls of many games/a large game collection, as this can now save a decent amount of time overall. Also good for quickly testing out different controller mappings when experimenting to find the best button layout. Many games do not need disc swapping or the OSK, so this could also be the best setting to use in those cases.
So that's everything. What do you think?
I wanted to add a hotkey because sometimes i'm literally too lazy to go get a controller, just to press the L3 button to open the menu, while there's already a keyboard right in front of me. And the DBP menus are a really useful and unique feature, so the more ways to access them, the better. It also felt odd that the standalone version had a keyboard hotkey, but the core didn't. Maybe i'm missing something here? Because i would have expected this core to already have a hotkey, unless there's a reason not to. I'm also learning C++, not familiar with this projects files, this is my first proper PR, and
dosbox_pure_libretro.cppis long and complex... Hopefully everything has been done right... Right?? I'm hesitant to submit this 😅But these changes have been thoroughly tested on Win10/11 with several different keyboards/controllers, and Android was tested with a controller. It works without issues. Here's a Windows build to try out.