Skip to content

image_viewer: Reveal images in file manager from keyboard shortcut - #56438

Merged
JosephTLyons merged 2 commits into
zed-industries:mainfrom
terror:reveal-images-with-keybinding
Jun 8, 2026
Merged

image_viewer: Reveal images in file manager from keyboard shortcut#56438
JosephTLyons merged 2 commits into
zed-industries:mainfrom
terror:reveal-images-with-keybinding

Conversation

@terror

@terror terror commented May 11, 2026

Copy link
Copy Markdown
Contributor

Resolves #55617

This diff makes the standard Reveal in Finder/File Manager shortcut work when an image tab is focused. Image tabs already expose the reveal action from the tab context menu, but the keyboard shortcut was only bound in the Editor context, so pressing cmd-k r on macOS or ctrl-k r on Linux/Windows did nothing while focus was in the image viewer.

With this change, ImageView handles the existing editor::RevealInFileManager action, and the default keymaps bind the same reveal shortcut in the ImageViewer context. This keeps image tabs consistent with text editor tabs while reusing the same project path reveal path used elsewhere.

Release Notes:

  • Fixed Reveal in Finder/File Manager shortcuts not working when an image tab is focused.

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label May 11, 2026
@ChristopherBiscardi ChristopherBiscardi added the area:editor Feedback for code editing, formatting, editor iterations, etc label May 12, 2026
@terror terror changed the title Reveal images in file manager from keyboard shortcut image_viewer: Reveal images in file manager from keyboard shortcut May 23, 2026
@JosephTLyons
JosephTLyons self-requested a review June 8, 2026 20:54
@JosephTLyons

JosephTLyons commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Hey @terror - sorry were late getting around to this PR, but all looks good on my end. I wish we could use the same keybinding here that we use in the project panel's Reveal in Finder action, which is cmd-alt-r, for consistency, but it seems like we can't do that because its clobbers the task spawning action in editor. Looks like the choice to use cmd-k r was already decided long ago too, as it's what is used for non image file in the tab context menu.

Anyway, no issues with this PR, so I'm going to merge. Thank you!

@JosephTLyons
JosephTLyons added this pull request to the merge queue Jun 8, 2026
Merged via the queue into zed-industries:main with commit ef731e7 Jun 8, 2026
32 checks passed
@terror
terror deleted the reveal-images-with-keybinding branch June 9, 2026 03:29
This was referenced Jun 18, 2026
jonx pushed a commit to jonx/zed-aros that referenced this pull request Jul 17, 2026
…ed-industries#56438)

Resolves zed-industries#55617

This diff makes the standard Reveal in Finder/File Manager shortcut work
when an image tab is focused. Image tabs already expose the reveal
action from the tab context menu, but the keyboard shortcut was only
bound in the `Editor` context, so pressing `cmd-k r` on macOS or `ctrl-k
r` on Linux/Windows did nothing while focus was in the image viewer.

With this change, `ImageView` handles the existing
`editor::RevealInFileManager` action, and the default keymaps bind the
same reveal shortcut in the `ImageViewer` context. This keeps image tabs
consistent with text editor tabs while reusing the same project path
reveal path used elsewhere.

Release Notes:
- Fixed Reveal in Finder/File Manager shortcuts not working when an
image tab is focused.

Co-authored-by: Joseph T. Lyons <JosephTLyons@gmail.com>
jolutz pushed a commit to jolutz/zed that referenced this pull request Aug 8, 2026
…ed-industries#56438)

Resolves zed-industries#55617

This diff makes the standard Reveal in Finder/File Manager shortcut work
when an image tab is focused. Image tabs already expose the reveal
action from the tab context menu, but the keyboard shortcut was only
bound in the `Editor` context, so pressing `cmd-k r` on macOS or `ctrl-k
r` on Linux/Windows did nothing while focus was in the image viewer.

With this change, `ImageView` handles the existing
`editor::RevealInFileManager` action, and the default keymaps bind the
same reveal shortcut in the `ImageViewer` context. This keeps image tabs
consistent with text editor tabs while reusing the same project path
reveal path used elsewhere.

Release Notes:
- Fixed Reveal in Finder/File Manager shortcuts not working when an
image tab is focused.

Co-authored-by: Joseph T. Lyons <JosephTLyons@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:editor Feedback for code editing, formatting, editor iterations, etc cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Keyboard shortcut for "Reveal in Finder" not available for .png files

3 participants