Last Updated: February 25, 2016
·
2.672K
· destructuring

Capslock key as tmux Ctrl-B

Binding Capslock key to a macro "Ctrl-B" makes tmux operation a simple one, two key sequence.

In the Keyboard System Preferences, under Keyboard tab, click on Modifier Keys. Set the Capslock key to no action.

In the App Store, buy Keyboard Maestro, a $36 program. (What the fuck! but hey, I'm very peculiar particular about my habits.)

In Keyboard Maestro, create a macro triggered by "The Apple Internal Keyboard / Trackpad Caps Lock key is pressed" and responds with "Type the ⌃B Keystroke"

I think OS X will kill inactive programs (Keyboard Maestro has been disappearing whenever I come back to my computer). Download TinkerTool, which has an option to disable killing inactive programs.

Ideally for me, a longtime xmonad user, I'd like Capslock to not do anything until I press another key simultaneously. The macro would then fire Ctrl-B and that other key in sequence. I would not have to release Caplocks to fire another tmux binding.