PCSX2 / pcsx2

PCSX2 - The Playstation 2 Emulator
https://pcsx2.net
GNU General Public License v3.0
11.6k stars 1.6k forks source link

[Feature Request]: Exit Hotkey #10580

Closed dragoonDorise closed 8 months ago

dragoonDorise commented 8 months ago

Description

RPCSX2 is missing the ability to be closed using a hotkey. You can do this in windows with ALT F4, but in Linux it just ignores both ATL F4 or CTRL Q.

Reason

This will make it easy to control in an HTPC using a gamepad, now you can exit the emulation with a shortcut and if you use big picture you can also exit from there, but those are extra steps that could just be done in one single step.

Examples

These emus have this feature: Citra, Retroarch, Dolphin, Duckstation, RPCS3, Yuzu, ScummVM, Vita3K, Xemu

stenzek commented 8 months ago

ALT+F4 works fine for me on Linux (KDE).

Sorry, but this argument is rubbish. An exit hotkey would cause the confirm shutdown/save state dialog to open, the same way that a VM shutdown does, which requires mouse input. If the goal is to make it easier for controllers, then that's already worse than the intended way, which is to have one button/combination to open the Pause Menu -> Close/Shutdown (forget what it is in PCSX2) -> Save, then Exit from the main menu.

Unless you disable saving on shutdown, and confirm shutdown, in which case users can't save their progress for quick resume from the game list, and they can easily lose progress by accidentally pressing the exit hotkey.

Also, maybe check the things you're quoting, DuckStation uses the same code for this sort of thing as PCSX2, and it does not have a quit hotkey for the same reason.

dragoonDorise commented 8 months ago

@stenzek In PCSX2 the Shutdown Machine Hotkey takes you back to the Emulator, but in DuckStation the PowerOff Hotkey closes the Emulation and the Emulator. That's what I meant, if it was possible to to have the same PowerOff functionality in PCSX2 like DuckStation already has, English is not my first language, so sorry If didn't properly explain myself when opening the issue.

Regarding the keyboard hotkey, I forgot to specify that this happens while in game scope in SteamOS or ChimeraOS, CTRL Q does work on some other emus like Citra for instance.

refractionpcsx2 commented 8 months ago

You can run pcsx2 with nogui or batch, and it will close on exit.

stenzek commented 8 months ago

It does not close the emulator in DuckStation. If you're using batch mode, it'll exit as a result of the VM shutting down, in the same way that shutting down via the pause menu does, the two are unrelated.

Same for PCSX2. But like I said above, it's a bad idea to bind it to a key, because you end up with either a popup that you have to interact with the mouse, or accidental game/progress loss. This is not good UX.

dragoonDorise commented 8 months ago

@refractionpcsx2 @stenzek I completely forgot about -batch, that does the trick, thanks!