Skip to content

Instantly share code, notes, and snippets.

@agoston
Created September 23, 2014 11:39
Show Gist options
  • Save agoston/c36ee11227b762c028bd to your computer and use it in GitHub Desktop.
Save agoston/c36ee11227b762c028bd to your computer and use it in GitHub Desktop.
Karabiner global hotkey definition to switch between applications (place in ~/Library/Application Support/Karabiner/private.xml)
<?xml version="1.0"?>
<root>
<vkopenurldef>
<name>KeyCode::VK_OPEN_URL_APP_Karabiner_Term</name>
<url type="file">/Users/agoston/Applications/iTerm.app</url>
</vkopenurldef>
<vkopenurldef>
<name>KeyCode::VK_OPEN_URL_APP_Karabiner_Firefox</name>
<url type="file">/Applications/Firefox.app</url>
</vkopenurldef>
<vkopenurldef>
<name>KeyCode::VK_OPEN_URL_APP_Karabiner_Mail</name>
<url type="file">/Applications/Microsoft Office 2011/Microsoft Outlook.app</url>
</vkopenurldef>
<vkopenurldef>
<name>KeyCode::VK_OPEN_URL_APP_Karabiner_IDEA</name>
<url type="file">/Users/agoston/Applications/IntelliJ IDEA 13.app</url>
</vkopenurldef>
<vkopenurldef>
<name>KeyCode::VK_OPEN_URL_APP_Karabiner_Chat</name>
<url type="file">/Applications/Microsoft Lync.app</url>
</vkopenurldef>
<item>
<name>Local Maci</name>
<item>
<name>Maci v0</name>
<identifier>remap.maci_v0</identifier>
<autogen>__KeyToKey__ KeyCode::KEY_1, ModifierFlag::OPTION_L, KeyCode::VK_OPEN_URL_APP_Karabiner_Term</autogen>
<autogen>__KeyToKey__ KeyCode::KEY_2, ModifierFlag::OPTION_L, KeyCode::VK_OPEN_URL_APP_Karabiner_Firefox</autogen>
<autogen>__KeyToKey__ KeyCode::KEY_3, ModifierFlag::OPTION_L, KeyCode::VK_OPEN_URL_APP_Karabiner_Mail</autogen>
<autogen>__KeyToKey__ KeyCode::KEY_4, ModifierFlag::OPTION_L, KeyCode::VK_OPEN_URL_APP_Karabiner_IDEA</autogen>
<autogen>__KeyToKey__ KeyCode::KEY_5, ModifierFlag::OPTION_L, KeyCode::VK_OPEN_URL_APP_Karabiner_Chat</autogen>
</item>
</item>
</root>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment