-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Add “Show Current File in Finder” menu item (#5001) #5005
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@svobs Should be able to explain how to add the shortcut for the menu item. |
I think adding the keybinding in "IINA Default" input config and it can be automatically matched and show up in the menu. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from what @low-batt has indicated, I have nothing to say. We should consider adding this into the default configuration, and we can add after merging this PR. The problem is should we add this to all default configs (mpv, VLC, Movist)?
54b5e93
to
1e8c04a
Compare
We do need to get the menu shortcut working. The one suggested is ⌘R. I checked Mac keyboard shortcuts and this is how Apple uses that key:
I don't think it is unreasonable to use ⌘R, but I'm not that familiar with IINA's key binding code. Need to hear from @svobs and @lhc70000. |
6aa33e3
to
784f781
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm okay with the changes. I'll try to abstract the logic of @IBAction func contextMenuShowInFinder(_ sender: NSMenuItem)
after merging this PR. Not sure whether or not that's worthwhile
Add the 2 lines below to the case statement of internal func handleIINACommand(_ cmd: IINACommand) {
switch cmd {
// […]
case .showCurrentFileInFinder:
menuActionHandler.menuShowCurrentFileInFinder(.dummy)
// […]
|
Having connectivity problems here...strange... After adding the code I posted above, everything will be in place for the end user to add a row like this one to your Key Bindings configuration: |
The shortcut key still needs to be added to |
I was in a little bit of a hurry when I wrote that, but I found time to re-evaluate and have determined that adding a case to I filed a PR, #5012, which has more info if curious. |
Co-authored-by: low-batt <86170219+low-batt@users.noreply.github.com>
I'm not sure that Cmd+R fits here, because it's usually used to refresh (in browsers, XCode, etc.) |
Apple guidance on custom keyboard shortcuts can be found here. Don't be confused by the entries in the
Focusing on the keys that trigger IINA actions we can see there isn't a consistent pattern but many use ⇧⌘: So ⇧⌘ and one of the keys not already used seems right. |
Not meant to divert the discussion too much, but there's an alternative is to not set any default keybindings for that and let the user to set whatever they want. |
I thought about that, but configuring key bindings is a bit advanced. I would not be surprised if many users looked at the new menu item, saw there was no keyboard shortcut and gave up. Therefore I think it is important we provide a default key binding. I'm thinking ⌃⌘R due to the use of ⌘R by Spotlight. |
I suggest ⇧⌘R. We use ⇧⌘ when possible and I prefer it over ⌃⌘ because it's more comfortable when pressing. The reason we have other modifiers for some shortcuts are
|
I agree, ⇧⌘R. |
We also use the ⇧⌘ convention for the mpv defaults as well, but it looks like we switched to ⌥⌘ for Movist and VLC. So ⌥⌘R for Moviest and VLC? |
Note that Apple says:
|
⇧⌘R meets those requirements, yes? We can use that for the IINA and mpv defaults. We will have to hear from others as to why the Moviest and VLC did not use that and instead used option, ⌥, instead of shift, ⇧. To match up with the existing conventions in those key bindings we should use ⌥⌘R in them. See what the other developers say. |
That seems almost backwards, no? Some menu items can have "alternate" versions which offer slightly different functionality. These can display an alternate title by holding down the Option key when clicking on the menu. Their key equivalent also incorporates Option. Example in IINA: |
I added ⇧⌘R to |
Isn't that what I did? I'm confused
|
i got it. The |
Great! I will see if I can get the other developers to get this one approved and merged. |
@ShlomoCode Thanks for addressing #5001 |
A regression bug introduced by #5005
@cmbail This change has been merged into the development version of IINA. It is not in the current release of IINA. Issue #5001 was closed automatically by GitHub when this pull request was merged. The downside of that is that it makes it look to users like the issue has been addressed and should be working in the latest release of IINA. I have been trying to re-open issues and leave them open until the change is in the released version of IINA, but it is exhausting to keep up with GitHub's automatic actions. GitHub users have been asking for a way to turn off this auto close feature, but last I looked GitHub has not provided a way to do that. It is a philosophical different. GitHub views issues as tasks for developers to do. Once a change has been merged then the developer has nothing more to do and GitHub closes the issue. The IINA project views issues as the public defect and feature request database. With that point of view you would not close issues until the features are available to users. Currently the GitHub view dominates. Sorry about the confusion. |
Thanks for clearing that up. |
Description:
Adds a menu bar item (under
File
) to reveal the current file in Finder.For some reason I was unable to set a Cmd+R shortcut, even though I set it through the interface builder, the shortcut doesn't work, so the PR does not currently include a shortcut.Built and tested with XCode 15.1, on MacOS 14.5.