Skip to content

Instantly share code, notes, and snippets.

@mahemoff
Created January 17, 2017 09:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mahemoff/f8c9b201458d165d91c03796911d67ee to your computer and use it in GitHub Desktop.
Save mahemoff/f8c9b201458d165d91c03796911d67ee to your computer and use it in GitHub Desktop.
Karabiner tmux - make caps lock main tmux key and backquote secondary tmux key for shell sessions
<?xml version="1.0"?>
<root>
<appdef>
<appname>Terminal</appname>
<equal>com.apple.Terminal</equal>
<equal>iTerm</equal>
<equal>net.sourceforge.iTerm</equal>
<equal>com.googlecode.iterm2</equal>
</appdef>
<item>
<name>Mahemoff TMUX Key Remappings</name>
<item>
<name>TMUX: Right Control to Ctrl+B</name>
<identifier>private.right_control_to_control_b</identifier>
<only>Terminal</only>
<autogen>
--KeyToKey--
KeyCode::CONTROL_R,
KeyCode::B, ModifierFlag::CONTROL_L
</autogen>
</item>
<item>
<name>Restore backquote and tilde with Ctrl</name>
<identifier>private.control_q_to_backquote</identifier>
<only>Terminal</only>
<autogen>
--KeyToKey--
KeyCode::BACKQUOTE, ModifierFlag::CONTROL_L,
KeyCode::BACKQUOTE
</autogen>
</item>
<item>
<name>TMUX Inner: backquote key to Ctrl+A</name>
<identifier>private.section_to_control_a</identifier>
<only>Terminal</only>
<autogen>
--KeyToKey--
KeyCode::BACKQUOTE,
KeyCode::A, ModifierFlag::CONTROL_L
</autogen>
</item>
</item>
</root>
@mahemoff
Copy link
Author

  • Karabiner Settings > Misc & Install > Open private.xml
  • Need to "Reload XML" after editing and use checkboxes to accept the new rules
  • This is for US keyboard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment