rpcs3 icon indicating copy to clipboard operation
rpcs3 copied to clipboard

[Feature request] Implement a shortcut/hotkey manager

Open schm1dtmac opened this issue 6 years ago • 29 comments

In CS:GO(NPUB30589), ESC is used to enter the pause menu and exit menus when a keyboard and mouse is connected to a PS3, or when you are using the Basic Keyboard handler in rpcs3. Issue is, ESC is also used to exit fullscreen, so as a result, each time I need to enter the pause menu, I end up also exiting fullscreen, which is quite annoying. I would like it so that the Exit Fullscreen key can be rebinded in the rpcs3 options.

schm1dtmac avatar Feb 22 '19 16:02 schm1dtmac

Would disabling ESC be a good solution? You can exit fullscreen with Alt+Enter as well.

vieiraa avatar May 16 '19 20:05 vieiraa

I am working on a shortcut manager but it will probably take a long time to finish

Megamouse avatar May 16 '19 21:05 Megamouse

Would disabling ESC be a good solution? You can exit fullscreen with Alt+Enter as well.

ESC would be great if:

  • removed from exit fullscreen binding
  • added to exit emulation (instead of exit fullscreen)

If someone can give me a quicktip (like told in which file this is defined), I can try change myself and open a PR.

raelgc avatar Jan 21 '20 13:01 raelgc

Should I just go into https://github.com/RPCS3/rpcs3/blob/master/rpcs3/rpcs3qt/gs_frame.cpp#L139 and change this:

	case Qt::Key_Escape:
		if (visibility() == FullScreen) { toggle_fullscreen(); return; }
		break;

by this?

	case Qt::Key_Escape:
		QWindow::close();
		break;

raelgc avatar Jan 21 '20 20:01 raelgc

Ok, just tested this and the raw close() will not fire the proper event chain (check for quit confirmation, etc).

QWindow::close() is the proper command.

I edited the above comment to reflect this.

Fine if I open a PR?

raelgc avatar Jan 23 '20 13:01 raelgc

I don't think people wanna close the game by clicking escape

Megamouse avatar Jan 23 '20 19:01 Megamouse

@Megamouse I'm an old guy, still used to press Escape to escape the current window :D

Now serious: I'm using a HTPC with Ubuntu and Retropie. Gamepad is my only device to interact with it (of course, I can attach a keyboard when required).

As most of users in the same situation, I've configured the gamepad home button to send the Esc to the emulators.

It works with most modern emulators: pcsx2, Dolphin, etc.

As rpcs3, they can be configured to exit the main program when emulation is finished. So, this way, I can get back to EmulationStation interface.

The esc key closing the emulation can solve this while you're working in the shortcut manager.

raelgc avatar Jan 23 '20 20:01 raelgc

Just remembered that this issue existed, and I'd like to mention that you could have it so that holding escape would quit emulation, but not if you press it once, which would be ideal here until a shortcut manager is created imo.

schm1dtmac avatar Feb 10 '20 17:02 schm1dtmac

was just coming to inquire about this. a way to set up binds would be great. whether it be for assigning toggling of fullscreen, stopping emulation, exiting rpcs3 alltogether etc.

that being said, im sure the developers are well enough aware and its on the proverbial laundry list : P

klepp0906 avatar May 17 '20 12:05 klepp0906

How's it going about this issue? I still can't use esc key to exit emulation even in --no-gui status.

lilcdj avatar Mar 26 '21 09:03 lilcdj

@lilcdj After talk with developers, I agree with them there is no need of this.

First: configure rpcs3 to exit after emulation is finished.

Then you can use gamepad -> keyboard mapper, like xpadder (on Windows) or antimicro (on Ubuntu) and configure your gamepad to, after you press the Home button, emit this sequence: Esc then Ctrl+S. It'll even produce a cool effect: exit from fullscreen then quit.

raelgc avatar Mar 28 '21 12:03 raelgc

I don't think people wanna close the game by clicking escape

what else would they want to close the game by? every emulator ive ever used uses ESC to close. Not that there is a problem with being different but.. so long as you have an toggleable option to confirm I cant imagine a more intuitive choice. the fullscreen toggle is a bit more abstract in my opinion.

@lilcdj After talk with developers, I agree with them there is no need of this.

First: configure rpcs3 to exit after emulation is finished.

Then you can use gamepad -> keyboard mapper, like xpadder (on Windows) or antimicro (on Ubuntu) and configure your gamepad to, after you press the Home button, emit this sequence: Esc then Ctrl+S. It'll even produce a cool effect: exit from fullscreen then quit.

configuring rpcs3 to exit after emulation by default is problematic if you are playing at the pc and dont want to have to re-open RPCS3 and wait for the reload (if you have lots of titles etc) before starting another game.

As opposed to using ala frontend via no-gui where options within the frontends are usually present to circumvent the complication. Launchbox for example allows small AHK scripts to accomplish this.

$Esc::
{
    Process, Close, {{{StartupEXE}}}
} 

Of course in some cases this will cause saves to not be written which could be a nightmare, and I havent tested with rpcs3.

A shortcut/hotkey manager would be nice and is pretty par these days but beggers/choosers n all. Just my 2c

I'm entirely onboard with whatevers chosen. After you guys fixed up no-gui im on cloud9 and will be for a long long time. Nothing but <3 here :)

klepp0906 avatar Mar 28 '21 16:03 klepp0906

In theory, an option can be added to give Esc a second function (exit if not in fullscreen), although you'll have to push it twice in fullscreen. It sounds like a compromise with minimal effort to implement.

Nekotekina avatar Mar 28 '21 16:03 Nekotekina

In theory, an option can be added to give Esc a second function (exit if not in fullscreen), although you'll have to push it twice in fullscreen. It sounds like a compromise with minimal effort to implement.

I was actually thinking that very thing, just didnt suggest it as I didnt want to seem pushy. You guys do so much its hard to make suggestions or argue points of view without feeling like youre coming across as ungrateful which I'd hate to do.

klepp0906 avatar Mar 28 '21 16:03 klepp0906

Modern applications never use Esc to exit completely. It would be a significant step back in UX to make such a hotkey the default, and is also completely unneeded.

I don't mind if hotkeys themselves become configurable however, I think RPCS3 definitely misses a field from it's settings menu like that; but I'm 100% against changing the default behaviour of Esc - or at least, of changing it to exiting the game. No-gui mode nonwithstanding.

An argument could be also made for making it completely unbounded by default, since Alt + Enter alone serves the purpose of going to and back from fullscreen both. I'd say it'll even be necessary, once there will be a native pause menu.

All in all though, the proper solution here seems to be adding a Shortcuts dialog to the GUI tab in the emulator settings, and make every currently hardcoded action rebindable. Toggles can't just keep increasing and cluttering the interface, and some of the default keybinds may not be comfortable, or even known to some - thinking about the screenshot hotkey here, for example. In my opinion, this would be the best for everyone.

dio-gh avatar Mar 28 '21 18:03 dio-gh

"Modern applications never use Esc to exit completely. It would be a significant step back in UX to make such a hotkey the default, and is also completely unneeded."

Is this satire? Virtually every emulator of note works this way OTHER than RPCS3.

Why do emulation authors seem laser focused on making sure that their programs are completely unusable?

star69rem avatar Jan 08 '23 05:01 star69rem

Using any frontends or other launchers usually relay on "ESC" to close the emulator. Perhaps esc could also exit only if the --nogui option is used. Its a bit more code, but it would be even better if it was mappable in the options, which would give people the freedom to exit, fullscreen with the best key that suits their needs. maybe leave alt-f4 alone but give the option for another exit key or another full-screen key. key-combinations aren't the easiest to work with in other frontends. Keep up the great work!

pupphelper avatar Jan 08 '23 05:01 pupphelper

It makes sense to have Esc exiting when --nogui is true.

raelgc avatar Jan 08 '23 11:01 raelgc

Perhaps, maybe, when savestates would be fast enough, then Esc can be bound to save a state then close the emulation so the user won't lose progress accidentally. Otherwise accidental clicks would result in a complete progress loss.

elad335 avatar Jan 08 '23 12:01 elad335

The shortcut/hotkey manager will be implemented as part of the Qt6 build, or shortly afterwards. It is not worth the effort to add it in Qt5 due to various reasons.

Megamouse avatar Jan 08 '23 15:01 Megamouse

Looks like either PR 13186 or the shortcut manager should achieve what I wanted from the issue, since I just wanted to be able to unbind the key entirely to begin with for use in PS3 CSGO with Keyboard and Mouse, so it's good to see there are options on the table for that now.

schm1dtmac avatar Jan 09 '23 18:01 schm1dtmac

Repurposed this ticket as a general shortcut manager following the discussion above

AniLeo avatar Apr 23 '23 13:04 AniLeo

Why not start with a simple .ini file with the shortcuts, then evolve to build the UX to reassign and save to that .ini file?

raelgc avatar Apr 23 '23 17:04 raelgc

I already implemented most of this. It's just not really compatible with Qt 5, so I just postponed it

Megamouse avatar Apr 23 '23 17:04 Megamouse

The game window side is disabled and that must be what's being said

It's just not really compatible with Qt 5

But these are configurable for main window and able to be edited under configuration -> shortcuts image

Darkhost1999 avatar Jun 10 '23 21:06 Darkhost1999

This issue can be closed.

raelgc avatar Aug 18 '23 21:08 raelgc

obviously not

Megamouse avatar Aug 18 '23 21:08 Megamouse

If the issue was still the original one I'd devised a while ago for unbinding Escape from exit fullscreen, I'd have probably closed it by now anyways ( since that request has been satisfied as of PR #13186 ), but clearly it's expanded in scope to focus on a more broad shortcut manager, so I see no reason to close it yet until that's completed in its entirety.

schm1dtmac avatar Aug 19 '23 11:08 schm1dtmac

obviously not

Agreed. I am used to using the physical "Pause" key on my keyboard to pause my emulator, because of years of playing games on Final Burn. I'd like the option to change it, if at all possible.

oxyacetylene avatar Apr 19 '24 08:04 oxyacetylene

I'm surprised there isn't more discussion here regarding the general shortcut manager that this evolved into. The ability to change hotkeys to whatever a user's preferences are seems like something more people would be looking for.

Personally I have a universal layout for these kinds of functions, and I apply it to every emulator that allows it. RPCS3 is one of the only ones I can't do that with unfortunately.

(Just an example of some of what I use, to illustrate how much it differs from the defaults)

Close Program = Esc x 2 Screenshot = F10 Record = Insert Savestate = F2 Loadstate = F4

SkyHighGam3r avatar May 24 '24 04:05 SkyHighGam3r