DavidoTek / ProtonUp-Qt

Install and manage GE-Proton, Luxtorpeda & more for Steam and Wine-GE & more for Lutris with this graphical user interface.
https://davidotek.github.io/protonup-qt
GNU General Public License v3.0
1.22k stars 40 forks source link

[Feature Request] Add More Keyboard Shortcuts #206

Closed sonic2kk closed 1 year ago

sonic2kk commented 1 year ago

Is your feature request related to a problem? Please describe. Nope, this is a very minor quality-of-life idea.

Describe the solution you'd like It dawned on me recently that ProtonUp-Qt does not have many keyboard shortcuts. I wanted to open this issue to gauge whether or not it would be desirable to have more keyboard shortcuts and, if so, what those shortcuts should be. Here's a rough list of what I was thinking:

I should state that I am more than happy to implement these shortcuts myself, but I would like to get some feedback on what the shortcuts should be beforehand.

Describe alternatives you've considered Using the "Tab" key to navigate the UI, which works, but intuitive keyboard shortcuts would be nicer I think. Emphasis on Intuitive, which is a big part of what I want feedback on.

Adding a shortcut to open a dialog is as straightforward as a one-line call to QShortcut(QKeySequence('shortcut'), self.ui).activated.connect(func) (or a lambda to here to pass data to an existing method if it requires it). The important part is getting the shortcuts right.

Additional context I don't think it would be fitting necessarily to add these as tooltips, but documenting the shortcuts somewhere might be a good idea. Or they could be left as "easter eggs" heheh ;-)

DavidoTek commented 1 year ago

Great idea! I think users who regularly use ProtonUp-Qt will benefit a lot.

I should state that I am more than happy to implement these shortcuts myself, but I would like to get some feedback on what the shortcuts should be beforehand.

Awesome! Let me know if you need anything else from me.

Remove Compat Tool: Del button, or some modifier key + backspace for keyboards which don't have a delete key

I wonder if it should desplay a message box asking if the tool should be deleted if the button is accedentally pressed. Though I think that it is not that critical as reinstalled is quite simple and even the configuration won't be changed.

Add Compat Tool: Ctrl+N? Maybe something like Ctrl+Alt+G for GE-Proton

Ctrl+N sounds about right. Having shortcuts for individual compatibility tools would be a nice enhancement. We have two options for this. Either, as you suggested, add a shortcut Ctrl+Alt+<something> for most common compatibility tools or alternatively, pressing Ctrl+N and then selecting a tool using the letters (e.g. G=GE-Proton, S=SteamTinkerLaunch). That currently works if the upper combobox is in focus. I'm open on this though.

I'm also cautious that maybe this should be used for the Custom Install Directory option. Though I'm not sure how widely used this is, and this option could instead be set to Shift+Ctrl+N

I don't think it's that widely used. If we go so far to add shortcuts, I think we can add one for this as well. Using Shift+Ctrl+<something> seems to be the right choice for something that isn't used often.

About dialog: F1

I think many apps use Ctrl+. for opening the settings. But as it is called About, I think we can use F1 as well :smile:

Adding a shortcut to open a dialog is as straightforward as a one-line call to QShortcut(QKeySequence('shortcut'), self.ui).activated.connect(func)

Very good.

don't think it would be fitting necessarily to add these as tooltips, but documenting the shortcuts somewhere might be a good idea. Or they could be left as "easter eggs" heheh ;-)

We could add a section to the README/Flathub description/About dialog.

sonic2kk commented 1 year ago

I wonder if it should desplay a message box asking if the tool should be deleted if the button is accedentally pressed. Though I think that it is not that critical as reinstalled is quite simple and even the configuration won't be changed.

I entirely agree and thought about this too. It will still show a message box if the compat tool is in use, but if the tool is not in use then even the remove button will not display a dialog. Granted, it is easier (in my opinion anyway) to accidentally press the Delete key on a keyboard. I think it is a lot more deliberate to press the Remove button on the UI.

or alternatively, pressing Ctrl+N and then selecting a tool using the letters (e.g. G=GE-Proton, S=SteamTinkerLaunch). That currently works if the upper combobox is in focus. I'm open on this though.

I tested this out a bit and I think the overlap in tool names ("SteamTinkerLaunch" and "Steam-Play-None" for example) makes the dedicated shortcuts a better fit, i.e. Ctrl+Alt+T for Proton-tkg.

This approach will mean creating a way to pass the compat tool name to the install dialog, which from taking a (very quick) glance, it doesn't seem like a major issue. Just something to call out :-)

We could add a section to the README/Flathub description/About dialog.

Sounds great! :smile:

sonic2kk commented 1 year ago

Something that occurred to me is that there could be potential accessibility enhancements too around this, in regards to navigating without a mouse (see this note from GitHub). I wonder if there are any other areas where this could be improved as well. Projects especially in recent years have made a strong push to improve accessibility support, though I'm not sure that would be involved to implement this on the ProtonUp-Qt/PySide6 side. And it would probably be a separate enhancement proposal as well, though one that I don't have enough of a background on accessibility to really propose myself, apart from just bringing the idea up.

sonic2kk commented 1 year ago

Was looking at potentially adding a shortcut to switch between launchers, but Qt already has this built in it seems! With the main widget focused (i.e. without the compat tool list selected) you can press Alt + the first letter of the launcher to switch to it:

I initially tested this to see if these shortcuts were already taken or something and that's how I found out they are already in place. Nifty! :smile:

DavidoTek commented 1 year ago

Note to myself @DavidoTek: For easier keyboard navigation, the Tab Order should be changed. Also the NoFocus policy should not be used if not needed. See https://github.com/DavidoTek/ProtonUp-Qt/pull/215#issuecomment-1480346194

sonic2kk commented 1 year ago

With #217 merged and v2.8.0 released, I guess this can be closed :smile: Seems like the work related to keyboard shortcuts is complete!