Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Karabiner private.xml for Emacs, Vim, VSCode, Unity, Houdini.
<?xml version="1.0"?>
<root>
<appdef>
<appname>TERMINAL</appname>
<equal>com.apple.Terminal</equal>
</appdef>
<appdef>
<appname>ITERM2</appname>
<equal>com.googlecode.iterm2</equal>
</appdef>
<appdef>
<appname>PYCHARM</appname>
<equal>com.jetbrains.pycharm</equal>
</appdef>
<appdef>
<appname>VSCODE</appname>
<equal>com.microsoft.VSCode</equal>
</appdef>
<appdef>
<appname>UNITY</appname>
<equal>com.unity3d.UnityEditor5.x</equal>
</appdef>
<appdef>
<appname>HOUDINI</appname>
<equal>com.sidefx.HoudiniApprentice</equal>
</appdef>
<windownamedef>
<name>VIM</name>
<regex>.*vim.*</regex>
</windownamedef>
<windownamedef>
<name>EMACS</name>
<regex>.*emacsclient.*</regex>
</windownamedef>
<item>
<name>Private Mapping</name>
<!-- all -->
<item>
<name>Control J to N</name>
<identifier>private.swap_ctrl_j2n</identifier>
<autogen>
__KeyToKey__
KeyCode::J, ModifierFlag::CONTROL_L,
KeyCode::N
</autogen>
</item>
<!-- vim -->
<item>
<name>Custom Vim Change CONTROL_C+EISUU</name>
<identifier>private.control_C_plus_eisuu</identifier>
<only>TERMINAL,ITERM2</only>
<windowname_only>VIM</windowname_only>
<autogen>
__KeyToKey__
KeyCode::C, ModifierFlag::CONTROL_L,
KeyCode::JIS_EISUU, KeyCode::C, ModifierFlag::CONTROL_L
</autogen>
</item>
<item>
<name>Custom Vim Change ESC+EISUU</name>
<identifier>private.escape_plus_eisuu</identifier>
<only>TERMINAL,ITERM2</only>
<windowname_only>VIM</windowname_only>
<autogen>
__KeyToKey__
KeyCode::ESCAPE,
KeyCode::JIS_EISUU, KeyCode::ESCAPE
</autogen>
</item>
<!-- Emacs -->
<item>
<name>Custom Emacs Change CONTROL_G+EISUU</name>
<identifier>private.control_g_plus_eisuu</identifier>
<only>TERMINAL,ITERM2</only>
<windowname_only>EMACS</windowname_only>
<autogen>
__KeyToKey__
KeyCode::G, ModifierFlag::CONTROL_L,
KeyCode::JIS_EISUU, KeyCode::G, ModifierFlag::CONTROL_L
</autogen>
</item>
<!-- PyCharm -->
<item>
<name>Custom PyCharm Change CONTROL_C+EISUU</name>
<identifier>private.control_C_plus_eisuu_pycharm</identifier>
<only>PYCHARM</only>
<autogen>
__KeyToKey__
KeyCode::C, ModifierFlag::CONTROL_L,
KeyCode::JIS_EISUU, KeyCode::ESCAPE
</autogen>
</item>
<item>
<name>Custom PyCharm Change ESC+EISUU</name>
<identifier>private.escape_plus_eisuu_pycharm</identifier>
<only>PYCHARM</only>
<autogen>
__KeyToKey__
KeyCode::ESCAPE,
KeyCode::JIS_EISUU, KeyCode::ESCAPE
</autogen>
</item>
<!-- VSCode -->
<item>
<name>Custom VSCode Ctrl+C to ESC</name>
<identifier>private.ctrl_c_to_escape_vscode</identifier>
<only>VSCODE</only>
<autogen>
__KeyToKey__
KeyCode::C, ModifierFlag::CONTROL_L,
KeyCode::JIS_EISUU, KeyCode::ESCAPE
</autogen>
</item>
<item>
<name>Custom VSCode Ctrl+N to Cursor Down</name>
<identifier>private.ctrl_n_to_cursor_down_vscode</identifier>
<only>VSCODE</only>
<autogen>
__KeyToKey__
KeyCode::N, ModifierFlag::CONTROL_L,
KeyCode::CURSOR_DOWN
</autogen>
</item>
<item>
<name>Custom VSCode Ctrl+P to Cursor Up</name>
<identifier>private.ctrl_p_to_cursor_up_vscode</identifier>
<only>VSCODE</only>
<autogen>
__KeyToKey__
KeyCode::P, ModifierFlag::CONTROL_L,
KeyCode::CURSOR_UP
</autogen>
</item>
<item>
<name>Custom VSCode Ctrl+M to Return</name>
<identifier>private.ctrl_m_to_return_vscode</identifier>
<only>VSCODE</only>
<autogen>
__KeyToKey__
KeyCode::M, ModifierFlag::CONTROL_L,
KeyCode::RETURN
</autogen>
</item>
<item>
<name>Custom VSCode Ctrl+G to Esc</name>
<identifier>private.ctrl_g_to_esc_vscode</identifier>
<only>VSCODE</only>
<autogen>
__KeyToKey__
KeyCode::G, ModifierFlag::CONTROL_L,
KeyCode::ESCAPE
</autogen>
</item>
<!-- Unity -->
<item>
<name>Custom Unity Invalid Kana</name>
<identifier>private.invalid_kana_unity</identifier>
<only>UNITY</only>
<autogen>
__KeyToKey__
KeyCode::JIS_KANA,
KeyCode::VK_NONE
</autogen>
</item>
<!-- Houdini -->
<item>
<name>Custom Houdini Invalid Kana</name>
<identifier>private.invalid_kana_houdini</identifier>
<only>HOUDINI</only>
<autogen>
__KeyToKey__
KeyCode::JIS_KANA,
KeyCode::VK_NONE
</autogen>
</item>
</item>
</root>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.