Design + Sketch
Published in

Design + Sketch

How to turn a spare MIDI device into a Sketch shortcut machine

While using Sketch day to day, I found myself looking for a faster way to align objects and have access functionality that I only use sparingly. Going back and forth to the Align menu manually or resizing artboard height, minimising image size, flattening compound shapes and pixel-fixing objects can become extremely slow and tedious.

To increase my productivity, I ended up converting a spare MIDI pad device into a shortcut machine that’s sped up my workflow and given me access to my less frequently used shortcuts more easily.

Aligning various icons with MIDI shortcuts.
Using a MIDI shortcut to resize artboard height.

The MIDI device

You can use any MIDI device to achieve what I’ve done. The one that I had spare was the Korg nanoPAD2. Some others that I’ve found work well for shortcuts are the Ableton Launchpad Mini and its big brothers. If you have a spare MIDI keyboard lying around, that’s also perfectly fine.

Any MIDI device can be used to make shortcuts in Sketch

Set up the device

While you may need to install the driver software that comes with your device, it isn’t usually necessary.

All MIDI devices use the same principle in their operation: a button press sends a simple set of values indicating things like note and velocity — in MIDI format — to your computer. Before you can start using your device as a shortcut powerhouse, however, you’ll need to find out what values your device is sending — the default values vary from model to model.

Some devices have manuals (like the Ableton Launchpad) that specify what value each button sends when in each mode. Others (like the nanoPAD2) let you assign custom values. The simplest way to find out what your device is sending through to your Mac is to monitor its signals. Unfortunately, there’s no native functionality for this in OS X. The app that I use is called MIDI Loupe and is available for free from the App Store.

Upon starting up MIDI Loupe, your device should appear on a list at the left of the app, with a tick indicating that the device is active. If you press some buttons on your MIDI device you should see the names for each signal appear in the log. We’ll go into what information you need from here shortly.

Signal input from MIDI device.

Add new shortcuts

At this point, you can add the new shortcuts for Sketch that you want to simplify with your MIDI device. You assign shortcuts in System Preferences under:

System Preferences > Keyboards > Shortcuts > App Shortcuts >

Click “+” while the menu item is selected to bring up the dialogue.

An empty shortcut for Sketch.

The ‘Menu Titles’ here are the same as the menu names in Sketch. If you want to assign a shortcut for aligning an object to the left, for example, enter “Left in Artboard” into System Preferences. You should use this over just the“Left” title because it covers all scenarios. “Left” won’t work if an object is selected by itself.

Enter the menu title of the menu item that you’d like to use and then create a shortcut sequence. I prefer to assign rather complex shortcut sequences to avoid conflicts with existing shortcuts. This will also let you save the simpler shortcuts for your actual keyboard.

The action is “Left in Artboard” and the shortcut is CMD+SHIFT+CTRL+OPT+L

Connect the dots

Now that you have a shortcut set up for your MIDI device and the device itself sending signals, you’ll need to connect the two together by converting the MIDI signals to keystrokes.

To do this, I use another free program called midiStroke. This will let you convert your MIDI signals to the keystrokes that you’ve assigned as Sketch shortcuts in System Preferences.

midiStroke converts your MIDI signals into keystrokes.

With midiStroke open, check that your MIDI device is selected from the “src” dropdown menu.

Remember those MIDI signals that we were using MIDI Loupe to identify before? This is where we’re going to use them. With MIDI Loupe open, press the button on your device to which you want to assign a shortcut and take note of what signal is being sent.

The values sent from a MIDI device

In this case, the top left pad of my device sends Note 53 on Channel 1. When looking at the log, you can disregard all other information. You’ll either see this ‘note number’ after the text Note On/Off, Control Message or Program change — with the most common being Note On/Off. Just add this to midiStroke to convert it.

Converting a MIDI signal to a keystroke.

In the “num” column, enter the main MIDI note that your device sends when you press the desired button. The default Channel is usually 1 or Global, but they can differ; just make sure that they match up.

Important note: midiStroke saves your keystrokes assignments when the program closes. If it crashes in the middle of a session, you’ll lose your progress. Make sure that you close and re-open every so often to save your assignments!

Test that your MIDI shortcut works in Sketch.

Using the MIDI left align shortcut. Hold ALT while using it on multiple objects to align to the artboard edge.


Go forth and assign as many MIDI shortcuts as you like! A few that I use often — other than the alignment tools — are “Resize to Fit Height” (with the Automate plugin), “Flatten” (for compound shapes), “Minimize File Size” and “Fix Selected Pixel Imperfect Layers” (with Pixel Perfecter).



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