batocera-linux / batocera.linux

batocera.linux
https://batocera.org
Other
1.92k stars 495 forks source link

Escape key retroarch - exit emulator #7641

Open Massouille78 opened 1 year ago

Massouille78 commented 1 year ago

hello,

when i am on old computer systems with Retroarch (example: AMSTRAD cpc, dosboxPure),

i use the Esc key on my keyboard to return to the previous menu in the emulated system or exit the on-screen menu.

but this Escape key also exits retroarch.

would it be possible to modify it.

for example ALT+F4 already exits retroarch.

would it be possible to add an option in the ES menu please?

thank you in advance

image

TVsIan commented 1 year ago

I have to dig through the code - Game Mode should fix your issue, that locks out all of Retroarch's hotkeys while it's turned on. It looks like we're not currently using it. I should be able to add it in as an option to start on or off, and r3 appears to be the last unused controller hotkey, so hopefully I can get that working.

Darknior commented 1 year ago

Very good idea, to disable ESC to qui emulator on old computers with an option in ES. You can maybe use "Game mode" @TVsIan . I don't know it, or just replace it by an combo, ALT+ESC, or the existing ALT+F4, to prevent to qui when pressing ESC key ... I remember it is possible to change the key in configuen.

TVsIan commented 1 year ago

I’m tinkering with it now. The main problems are:

1) The Game Focus mode ignores the hotkey button - so if you set it to a gamepad button, it toggles on every press. I assume this is by design, since it would disable the hotkey. 2) MAME hotkeys still activate, unless MAME’s UI is also toggled off. And we use MAME for a lot of computer cores.

I think I have a solution to both - the default keyboard key for both is scroll lock, and it passes through to the MAME core. Using evmapy to map Hotkey + R3 to scroll lock on computer systems should make it seamless. Plus adding an option to have it on or off at launch.

In the process of mapping standalone MAME to use hotkey + r3 as well, I think I got MAME’s configgen to map the hotkeys itself, so I can eliminate that .keys file.

On Thu, Dec 8, 2022 at 7:55 PM Fabien @.***> wrote:

Very good idea, to disable ESC to qui emulator on old computers with an option in ES. You can maybe use "Game mode" @TVsIan https://github.com/TVsIan . I don't know it, or just replace it by an combo, ALT+ESC, or the existing ALT+F4, to prevent to qui when pressing ESC key ... I remember it is possible to change the key in configuen.

— Reply to this email directly, view it on GitHub https://github.com/batocera-linux/batocera.linux/issues/7641#issuecomment-1343692045, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE5KD2XOG4M6DCJQ6LIBWHDWMJ7PHANCNFSM6AAAAAASYOD4KU . You are receiving this because you were mentioned.Message ID: @.***>

Darknior commented 1 year ago

Perfect solution @TVsIan , i like it :)

Massouille78 commented 1 year ago

Excellent solution, thanks!

Hew-ux commented 1 year ago

I fixed this in a PR long ago by resetting the default hotkey back to L Shift: https://github.com/batocera-linux/batocera.linux/pull/5980 You can configure this yourself manually as well.

Massouille78 commented 8 months ago

@TVsIan Hello, to solve my problem, I write in barocera.conf : dos.retroarch.input_auto_game_focus = "1" To play correctly with keyboard and mouse to dosbox pure.

That will be a ES feature please?

FN + Scroll lock or FN + F6 to exit Game mode Focus mode can be R3 + hotkey?

What do you think about this?

Thanks in advance,