Skip to content

Instantly share code, notes, and snippets.

@vkargov
Created May 18, 2016 05:21
Show Gist options
  • Save vkargov/f8bc0bc05566fcb9d1bb688b9d31abbf to your computer and use it in GitHub Desktop.
Save vkargov/f8bc0bc05566fcb9d1bb688b9d31abbf to your computer and use it in GitHub Desktop.
My OSX/Karabiner keyboard layout...
<?xml version="1.0"?>
<root>
<name>My, ehm, stuff.</name>
<replacementdef>
<replacementname>WEIRDOAPPS</replacementname>
<replacementvalue><![CDATA[<only>EMACS, TERMINAL, X11, VIRTUALMACHINE</only>]]></replacementvalue>
</replacementdef>
<item>
<name>Command_R to Option_R (only in Emacs, Terminal, X11)</name>
<identifier>sitagi.cr_to_or</identifier>
{{WEIRDOAPPS}}
<autogen>__KeyToKey__ KeyCode::COMMAND_R, KeyCode::OPTION_R</autogen>
</item>
<item>
<name>Command_L to Option_L (only in Emacs, Terminal, X11)</name>
<identifier>sitagi.cl_to_ol</identifier>
{{WEIRDOAPPS}}
<appendix>(Pass-Through Command+Tab)</appendix>
{{ COMMAND_L_TO_OPTION_L_EXCEPT_TAB_EXTRA }}
<include path="/Applications/Karabiner.app/Contents/Resources/include/checkbox/snippets/modifier_tab_to_command_tab.xml">
<replacementdef>
<replacementname>FROM_MODIFIER</replacementname>
<replacementvalue>COMMAND_L</replacementvalue>
</replacementdef>
<replacementdef>
<replacementname>TO_MODIFIER</replacementname>
<replacementvalue>OPTION_L</replacementvalue>
</replacementdef>
</include>
</item>
<item>
<name>Option_R to Command_R (only in Emacs, Terminal, X11)</name>
<identifier>sitagi.or_to_cr</identifier>
{{WEIRDOAPPS}}
<autogen>__KeyToKey__ KeyCode::OPTION_R, KeyCode::COMMAND_R</autogen>
</item>
<item>
<name>Option_L to Command_L (only in Emacs, Terminal, X11)</name>
<identifier>sitagi.ol_to_cl</identifier>
{{WEIRDOAPPS}}
<only>EMACS, TERMINAL, X11</only>
<autogen>__KeyToKey__ KeyCode::OPTION_L, KeyCode::COMMAND_L</autogen>
</item>
<item>
<name>Return to Control_L</name>
<appendix>(+ When you type Return only, send Return)</appendix>
<identifier>sitagi.ret2ctrl</identifier>
<autogen>__KeyOverlaidModifier__ KeyCode::RETURN, KeyCode::CONTROL_L, KeyCode::RETURN</autogen>
</item>
</root>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment