How to toggle the Pixel Fitting option via keyboard shortcut, without the need to navigate the preference panel with the cursor.

Image for post
Image for post

TL;TR

  1. Download and Install BetterTouchTool
  2. Open it and set a keyboard shortcut to trigger the action “Run Apple Script (enter directly as text)”
  3. A modal will open, copy and paste this script
  4. Done! 😎

MacOS has a pretty straightforward way to deal with custom shortcuts. In System Preferences > Keyboard > Shortcuts you can add your own sequence to activate pretty much each menu item and sub-item of every application.

The troubles start when we want to activate a shortcut for an option that is not in the menu bar. In our case “Fit layers and points to pixel bounds” is part of the “Preferences” panel, more specifically it’s a checkbox in the“Layers” tab. Despite we can easily use a shortcut (Cmd+,) to open the “Preferences”, in order to interact with anything that the panel contains we’re forced to use the mouse (or trackpad). …

Stefano Ferraro

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store