SpaceLauncher for macOS

Leader Key

This article shows what a leader key is and how to configure it with different types.

First, let’s define some terms.

In SpaceLauncher, you press and hold the space bar and then press other keys to trigger an action.

e.g. Spacebar S -> launch Safari

I refer to the space bar as the leader key. I call it that because in SpaceLauncher 2 you can set different types of leader keys.

I refer to the other keys you pressed after the leader key as trigger keys. (S in the example.)

Spacebar F then W -> open Downloads folder

In this example F, W is a sequence of trigger keys.

What’s new with leader keys?

Starting with SpaceLauncher 2.0, you can specify different leader keys and how to use them, e.g.

What is a custom key code?

A key code is a system-defined integer code that corresponds to a given key. e.g.

On the default layout keyboard, the key code for the Space bar is 49, the key code for the A key is 0, and the key code for the S key is 1.

When you specify space in preferences, you are actually telling the system its key code. The custom key code text field allows you to specify the key code directly.

SpaceLauncher can’t list all available keys, because you may have a different keyboard device that I never know about. Of course I can limit the available keys to a small set, but I want you to have the freedom to set your key bindings. So I explicitly list some recommended keys and also the custom key code text field that gives you the ability to use other keys.

What is the custom key code?

A key code is a system defined integer code corresponding to a given key. e.g.

In default layout keyboard, Spacebar’s key code is 49, A’s key code is 0, S’s key code is 1.

When you specify space in settings, actually sl tell system its keycode. The custom key code text field allow you specify keycode directly.

SpaceLauncher can’t list all the available keys, because you may have a different keyboard device that I never know. Of course I can limit the available keys to a small set, but I want you get freedom to set your key bindings. So I explicitly list some recommended keys and also the custom key code text field that give you the ability to use other keys.

How do I get the key code for a key?

When you add/edit a new key binding, there’s a ‘Look up key code’ button in the leader key settings. Click the button and type in a key, then you can see the key’s key code.

You can see that Z’s key code is 6 if you’re using a standard keyboard layout. For holding Z and pressing S to trigger an action, you set the leader key as follows,

More Examples

To hold F12 and press trigger keys to trigger an action, and remove F12’s original function,

Note that by default, the F12 key in macOS is Volume Up, you may want to change the behavior in System Settings, KeyBoard, Keyboard Shortcuts…, Function Keys.

To press and release Option-S, and then press trigger keys,

To press and release Command, and then press trigger keys,