Embed URL


SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

TMUX: Rebinding CAPS LOCK to CTRL + B

View private.xml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
<?xml version="1.0"?>
<name>TMUX Key Remappings</name>
<name>TMUX: Right Control to Ctrl+B</name>
KeyCode::B, ModifierFlag::CONTROL_L
View private.xml

Disabling CAPS LOCK

If you haven't already done so, gain an extra key and open up your System Preferences > Keyboard > Modifier Keys ... and rebind CAPSLOCK to No Action.

Rebinding CAPSLOCK to CONTROL_R (Right Control Key)

  • Install PCKeyboardHack
  • Open System Preferences > PCKeyboardHack
  • Change "Caps Lock" to keycode 62.

Reassigning the Caps Lock

Rebinding CONTROL_R (Right Control Key) to CONTROL + B

  • Install KeyRemap4MacBook

  • Open System Preferences > KeyRemap4MackBook > Misc & Uninstall

  • Click "Open private.xml"

Opening private.xml

  • Copy and Paste the private.xml provided with in this gist.
  • Open System Preferences > KeyRemap4MackBook > Change Key
  • Click "ReloadXML"
  • Toggle open "TMUX Key Remappings"
  • Check "TMUX: Right Control to Control+B

Enabling Keybinding

yeah! thanks dude.... this rocks!

Awesome! If anyone's wondering why not to simply map Caps Lock to Ctrl-B , the answer is it doesn't work very well at all. It seems to require Caps Lock to be up before the other key is pressed, and even then, seems to require some delay. I assume this is why @burtlo did it this way.

Also, careful if using iTerm or other terminals; the XML will need to include them. See


PCKeyboardhack has been renamed. In Yosemite press command+space sail
KeyRemap4MacBook has been renamed to Karabiner. command+space karabiner
Thanks for this awesome tip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.