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.
- Install Seil
- Open System Preferences > Seil
- Change "Caps Lock" to keycode
62
.
-
Install Karabiner
-
Open System Preferences > Karabiner> Misc & Uninstall
-
Click "Open private.xml"
-
Copy and Paste the private.xml provided with in this gist.
-
Open System Preferences > Karabiner > Change Key
-
Click "ReloadXML"
-
Toggle open "TMUX Key Remappings"
-
Check "TMUX: Right Control to Control+B
If instead of replacing your private.xml you add:
<item>
<name>TMUX: Right Control to Ctrl+B</name>
<appendix>TMUX Key Remappings</appendix>
<identifier>private.right_control_to_control_b</identifier>
<autogen>
--KeyToKey--
KeyCode::CONTROL_R,
KeyCode::B, ModifierFlag::CONTROL_L
</autogen>
</item>
to your existing private.xml, then it also works in iTerm.