Better LaunchBar Arrow Keys

launchbar-alternative-arrow-keys

I like the “Vim Mode” option in LaunchBar that allows you to use the H-J-K-L keys as arrows keys if you hold down CONTROL. But, on a MacBook keyboard at least, I still find it a little awkward to press the CONTROL key. It’s not the worst thing in the world, but I figured there’s a key I can remap to CONTROL using our good friend Karabiner. Here are the things I tried, from worst to best.

The Bad Ideas

First, I tried remapping my Hyper Key to CONTROL when LaunchBar is active. It’s much easier to reach over and hold down the CAPS LOCK key with my left pinky than it is to reach down for the CONTROL key with my left pinky. I used this for a day or two but got annoyed because I found that it was pretty common for me to want to use app launching shortcuts while LaunchBar was active. But if LaunchBar was active I couldn’t use HYPER-A to switch to iTerm or HYPER-E to switch to my editor.

So I realized that simply holding down the A key could be remapped to holding down CONTROL.

<item>
  <name>Hold A to Control in LaunchBar</name>
  <appendix>Tap to enter an A character</appendix>
  <identifier>private.a_control_launchbar</identifier>
  <only>LAUNCHBAR</only>
  <autogen>
    --KeyOverlaidModifier--
    KeyCode::A,
    KeyCode::CONTROL_L,
    KeyCode::A,
  </autogen>
</item>

That’s actually easier than reaching all the way over to the CAPS LOCK key with my pinky. The problem is that I found that if I was typing fast enough LaunchBar would lose keystrokes. For example, if I typed “kar” to launch Karabiner, the only thing that would get entered into LaunchBar was a single K.

The Good Idea

How about if I have to hold down two characters at once to simulate CONTROL? Sounds great! If I hold down D and F together, that will act like I’m holding down CONTROL:

<item>
  <name>D+F together to Control in LaunchBar</name>
  <identifier>private.df_together_to_control_launchbar</identifier>
  <only>LAUNCHBAR</only>
  <autogen>
    __SimultaneousKeyPresses__
    @begin
    KeyCode::D, KeyCode::F,
    @end

    @begin
    KeyCode::CONTROL_L | ModifierFlag::NONE,
    @end
  </autogen>
</item>

This seems to work great. I can’t find a problem with it. But there’s an even better way.

The Best Solution

There’s a built-in Karabiner option called Simultaneous Vi Mode.

karabiner-vi-mode

When you turn it on, you can hold down S and D together so that you can use the H-J-K-L keys as arrows keys anywhere in the system. Brilliant. I’ve had this turned on for a few minutes and have already found it useful.1 I also like that with this option, Karabiner pops up a little notification-style HUD in the bottom-right corner of the screen to let you know that this mode is active.

Karabiner HUD
Karabiner HUD


  1. I did notice that very rarely I’d type an “s” and “d” fast enough that Karabiner would turn on Vi Mode and my keystrokes didn’t register. To fix this I adjusted the Simultaneous Key Presses > Delay Threshold of Key in the Parameters tab. Its default value is 50ms. Turning it down to 40ms seems to prevent the accidental triggering.