lighterowl / transgui

A fork of Transmission Remote GUI
GNU General Public License v2.0
133 stars 3 forks source link

v5.18.4f breaks cmd-H "Hide" shortcut on MacOS #76

Closed pwinn closed 9 months ago

pwinn commented 9 months ago

I see that there was some work to use more Mac-like keyboard shortcuts in this release, but unfortunately, now when I hit cmd-H to hide the app, I get an hourglass cursor and nothing else. That seems to be the only shortcut broken, though. Cmd-A works to select all (nice!), cmd-q works to quit, even option-cmd-H works to hide all other apps. Only cmd-H fails. Unfortunately, that's the keyboard shortcut I use the most.

I checked the console, but transgui outputs nothing when I hit cmd-H.

In case this isn't affecting every Mac user, I'm running MacOS Sonoma 14.0 on an Apple M1.

lighterowl commented 9 months ago

Hi there, thanks for the report. Reproduced with Big Sur on Intel so most likely not version- or CPU-exclusive.

This is caused by the keyboard shortcut for the context menu option used for setting a torrent to high priority (RMB on a torrent list -> Queue -> High priority). It's defined to be Ctrl+H on most platforms, which means that it gets mapped to Cmd+H on macOS.

Obviously this is a bug as the application shouldn't be stealing standard OS-wide shortcuts. Can you suggest a new shortcut for this?

While you're at it, can you test if any of the other standard keyboard shortcuts - other than the ones you've mentioned - don't work as expected?

pwinn commented 9 months ago

I wasn't displaying Priority as a column, so I hadn't noticed, but sure enough, I have several arbitrary recent torrents set as High Priority. Clearly they're from each time I forgot and tried to hide the app!

Most other MacOS-wide shortcuts involve function keys, and fortunately, transgui stops at Cmd-F4, so it doesn't conflict with Cmd-F5. I couldn't find any other conflicts.

I don't actually use torrent Priority, just occasionally file Priority, and I'd never used a keyboard shortcut for it, so I'm not sure how much it would disrupt users who do use it. But maybe Cmd-UpArrow for high priority?

Thanks.

lighterowl commented 9 months ago

As a workaround for now, I can only suggest editing $HOME/.config/Transmission Remote GUI/transgui.ini and replacing the value of the SetHighPriority key in the Shortcuts section with something else, for example SetHighPriority=Meta+9 which will bind it to Cmd-9.

Cmd-UpArrow won't work unfortunately because UpArrow is bound to moving in the list of both files and torrents and the list widget's shortcuts seem to take precedence over ones bound to individual items' actions.

According to this, Cmd-9 isn't reserved for any system-wide action so I'll switch to using this shortcut on MacOS in the new release.

pwinn commented 9 months ago

Oh, I'm an idiot. There's also Cmd-M for "minimize," which is currently overridden by something too. I don't use that one often, but just thought of it.

lighterowl commented 9 months ago

Interesting - that one isn't bound to anything explicitly in transgui, but doesn't work for me either. I'll keep looking and see what I find.

lighterowl commented 9 months ago

It looks like Cmd-M isn't handled by Lazarus out-of-the-box as it didn't work in the Lazarus IDE or a minimal Lazarus-based application. I added handling to transgui itself though the visual effect is the same as pressing Cmd-H. This differs from ordinary MacOS applications (like Terminal) which display an animation of the window being minimized. However the end result is the same so I don't think it makes a difference.

If you can, please try the latest build and let me know how it works for you : https://github.com/xavery/transgui/actions/runs/7304259464/artifacts/1132002568 . It also includes the switch from Cmd-H to Cmd-9 for "High priority".

lighterowl commented 9 months ago

No activity for over a week, closing. Please reopen if you still experience issues.

pwinn commented 9 months ago

Sorry, yes, worked great! Thank you.