Just that: to be able to go back to previous zoom/screen position after changing the zoom level (specially with a shortcut)
Hey Leonardo,
That’s a really nice idea. Would you mind giving us extra info about how this could work and how it would differentiate against the shortcuts we have for Artboard Navigation such as:
- fn + → Jump to next Artboard
- fn + ← Jump to previous Artboard
Thanks a ton in advance!
The idea is to be able to toggle the last two zoom/locations with the same shortcut.
Let’s say I’m working at some detail level and I hit CMD-1 (Fit Canvas)
Now I’m viewing the whole Page
What if I want to go back to the previous view? I can hit CMD-2 (Zoom to selection) or CMD-3 (Zoom to Arboard), but those would work only if I have the element or artboard selected. Even then, the zoom level won’t be the same I was working before zooming out.
What I don’t now for sure is what should be the behaviour after zooming with the wheel (with tons of intermediate zoom levels in the process). Maybe it can consider the final zoom /placement after the action is finished (not zooming/panning for one second, for instance).
Ahh, so a better way to phrase this request would be:
- Add the ability to perform a ⌘Z on a Zoom (so it goes back to the previously used Zoom level).
Would that be a good interpretation of the request?
Somehow.
Yes, because: it would allow the user to go back to previous zoom level.
But, no, since it would not allow the user to go back and forth between two zoom levels that may be very useful for several reasons.
For instance in AutoCAD you have the option go “zoom to previous”
It’s like having a small zoom level / pan history to go back and forth. (One step is enough, but more would be even better). The benefit of just one level is that you can use the same shortcut to swap them
Ahh, thanks a ton for the extra context and info Leo, we truly appreciate that.
This makes it more clear to get the full picture on how this feature would work. We’ll make sure to make a note to our team so they can get all the details of the request!
This doesn’t completely answer the need you describe, but still useful sometimes: if you press and hold §, Sketch will zoom to 100%; and then return to your previous zoom level when you release the key.
Oh that’s a nice trick, thanks for sharing! I wonder though, what’s the key that triggers this temporary zoom reset for those of us with a U.S. keyboard layout (there’s no § symbol on it)
Nice tip @Cykelero . How is the function named on menu for those with a different keyboard layout?
Sorry, I don’t know the name of the feature—I only saw it mentioned in a StackExchange post.
On some keyboards you’ll find the key on the very left, on the number row:
@raulrincon Do you have any idea how to find that function? I tried with the search box under the Help menu, but no luck.
Ah…it’s one of those gidden gems by Sketch.
The action itself is not exposed via any menu, that’s why it is not heavily Documented. However, there’s a way to re-map the shortcut to one you like a bit more.
You can create a file named keybidings.plist
and there, add the definition for this action, and then the shortcut. After you’ve done that, you need to add this file to your Application Support folder for Sketch:
- Open a new Finder window
- Press ⇧⌘G (Shift-Command-G) to open the Go to Folder… dialog
- Copy and paste the following path:
~/Library/Application Support/com.bohemiancoding.sketch3
- Press enter, and drop the keybindings.plist file there (make sure to adjust the shortcut you want to use!)
- Restart Sketch and voila! It should work.
Here’s a sample .plist
I made while testing the workaround. Check it out and let us know how it goes!
Edit
If you’d like to add some custom shortcut in combination with one of the modifier keys, you can use the following codes (Thanks @leohans for the headsup!):
command
=@
control
=^
- e
option
=~
shift
=$
Works like a charm now with the plist you’ve provided Raul – thanks a lot!
I drop here how to assign key combinations
command
= @
control
= ^
option
= ~
shift
= $
ohh nice one!
I’ll add those to my post
That is a nice workaround! Thanks everyone.
Are the names of other actions documented somewhere? It would be nice to be able to create a .plist with your personal shortcodes that you can install on various computers (instead of having to create them in System Settings).
Edit: I found the names of other actions inside the ‘CommandBarHabits.plist’ in the same folder the ‘keybindings.plist’ sits. But I could not get them to work in the keybindings file. No idea why and enough of rabbit holing for today.
As for the original questions, I would like that option (toggle your last viewport change back and forth). Cinema4D has a separate viewport change history that you can step back (alt-cmd-Z / shift-alt-cmd-Z if I remember correctly). While that might be overkill for Sketch I like the idea that you could go back to previous pages & artboards that way.
Hey!
Thank you all for the extra feedback and comments.
Here’s a default keybidings.plist file that you guys can use as reference. (It has some other actions you might be interested in).