Dismiss
  • Toggle Theme
  • View as Mobile

Automating dev workflows with karabiner

Karabiner is an mac automation tool that allows you to set global hot keys to trigger different actions on your computer.

I'd tried it in the past but the config was very complicated .edn "Extensible Data Notation" format and I gave up. But at some point they started using JSON and the config was now readable to me. Hooray 🎉

Max Stoiber's karabiner repo was critical to getting me up and running. So, I highly recommend you go check out that out and watch his video. It convinced me to give karabiner another shot.

Setting up karabiner

  1. Download karabiner
  2. Then setup your karabiner config by following max's instructions here.
  3. Then you can configure your own hotkey combos.

How I use karabiner

I discovered that karabiner can automate more than just keyboard shortcuts and could also handle mouse buttons as well. This gave me some ideas 💡

I use a razer naga gaming mouse for my main setup. It looks like a damn telephone with its keypad on the left but those extra buttons are golden.

hi

Karabiner can handle conditions like "if device input is razer mouse and key code 1 is pressed then fire action XYZ"

Sounds complicated, but it's pretty simple once you have a solid starting point. Thanks to Max's typescript config.

So I got cookin' and setup some global mouse button helpers and some app specific ones.

Here's a quick demo of my current setup.

Details below on some of the shortcuts.

Global keys

  • Mouse button 1 - open/focus on Chrome
  • Mouse button 2 - open/focus on Iterm terminal
  • Mouse button 3 - 3 open/focus on VSCode
  • Mouse button 10 - top recording video with camtasia
  • Mouse button 11 - start recording video with camtasia

Generic "tab like app" controls

For any app that has "tabs" like browser, terminal, vscode, etc. I mapped forward and back tabs to the same keys.

  • Mouse button 6 - Forward tab
  • Mouse button 5 - Back tab
  • Mouse button 8 - Close tab

App specific triggers

In several applications I have app specfic triggers.

For example, inside VSCode I have buttons that automate some of the copilot recipes to explains, test or document my code. And in camtasia my video editing software I have mouse buttons to automate cutting and ripple deleting tracks to speed up my workflow there.

Wrapping up

The skys the limit with these hotkeys and karabiner, incredibly handy tool and having the configuration as code is icing on the cake.

Hope you find some use for it.