Create a gist now

Instantly share code, notes, and snippets.

For Karabiner
<?xml version="1.0"?>
<root>
<vkopenurldef> <name>KeyCode::VK_OPEN_URL_MV.R</name>
<url type="shell"> <![CDATA[ osascript ~/.mv_window.js R]]> </url>
</vkopenurldef>
<vkopenurldef> <name>KeyCode::VK_OPEN_URL_MV.L</name>
<url type="shell"> <![CDATA[ osascript ~/.mv_window.js L]]> </url>
</vkopenurldef>
<vkopenurldef> <name>KeyCode::VK_OPEN_URL_MV.MAX</name>
<url type="shell"> <![CDATA[ osascript ~/.mv_window.js MAX]]> </url>
</vkopenurldef>
<vkopenurldef> <name>KeyCode::VK_OPEN_URL_MV.SWITCH</name>
<url type="shell"> <![CDATA[ osascript ~/.mv_window.js ]]> </url>
</vkopenurldef>
<vkopenurldef> <name>KeyCode::VK_OPEN_URL_MV.ITUNES</name>
<url type="shell"> <![CDATA[ osascript ~/.mv_window.js iTunes]]> </url>
</vkopenurldef>
<vkopenurldef> <name>KeyCode::VK_OPEN_URL_MV.1</name>
<url type="shell"> <![CDATA[ osascript ~/.mv_window.js 0]]> </url>
</vkopenurldef>
<vkopenurldef> <name>KeyCode::VK_OPEN_URL_MV.2</name>
<url type="shell"> <![CDATA[ osascript ~/.mv_window.js 1]]> </url>
</vkopenurldef>
<vkopenurldef> <name>KeyCode::VK_OPEN_URL_MV.3</name>
<url type="shell"> <![CDATA[ osascript ~/.mv_window.js 2]]> </url>
</vkopenurldef>
<vkopenurldef> <name>KeyCode::VK_OPEN_URL_MV.4</name>
<url type="shell"> <![CDATA[ osascript ~/.mv_window.js 3]]> </url>
</vkopenurldef>
<vkopenurldef> <name>KeyCode::VK_OPEN_URL_MV.5</name>
<url type="shell"> <![CDATA[ osascript ~/.mv_window.js 4]]> </url>
</vkopenurldef>
<vkopenurldef> <name>KeyCode::VK_OPEN_URL_MV.6</name>
<url type="shell"> <![CDATA[ osascript ~/.mv_window.js 5]]> </url>
</vkopenurldef>
<vkopenurldef> <name>KeyCode::VK_OPEN_URL_MV.7</name>
<url type="shell"> <![CDATA[ osascript ~/.mv_window.js 6]]> </url>
</vkopenurldef>
<vkopenurldef> <name>KeyCode::VK_OPEN_URL_MV.8</name>
<url type="shell"> <![CDATA[ osascript ~/.mv_window.js 7]]> </url>
</vkopenurldef>
<vkopenurldef> <name>KeyCode::VK_OPEN_URL_MV.9</name>
<url type="shell"> <![CDATA[ osascript ~/.mv_window.js 8]]> </url>
</vkopenurldef>
<vkopenurldef> <name>KeyCode::VK_OPEN_URL_MV.0</name>
<url type="shell"> <![CDATA[ osascript ~/.mv_window.js 9]]> </url>
</vkopenurldef>
<item>
<name>C-RIGHT to Window Right</name>
<identifier>private.mv_r</identifier>
<autogen> __KeyToKey__ KeyCode::CURSOR_RIGHT, ModifierFlag::CONTROL_L | ModifierFlag::NONE,
KeyCode::VK_OPEN_URL_MV.R
</autogen>
</item>
<item>
<name>C-LEFT to Window Left</name>
<identifier>private.mv_l</identifier>
<autogen> __KeyToKey__ KeyCode::CURSOR_LEFT, ModifierFlag::CONTROL_L | ModifierFlag::NONE,
KeyCode::VK_OPEN_URL_MV.L
</autogen>
</item>
<item>
<name>C-UP to Window Maximize</name>
<identifier>private.mv_max</identifier>
<autogen> __KeyToKey__ KeyCode::CURSOR_UP, ModifierFlag::CONTROL_L | ModifierFlag::NONE,
KeyCode::VK_OPEN_URL_MV.MAX
</autogen>
</item>
<item>
<name>C-DOWN to Window Switch</name>
<identifier>private.mv_switch</identifier>
<autogen> __KeyToKey__ KeyCode::CURSOR_DOWN, ModifierFlag::CONTROL_L | ModifierFlag::NONE,
KeyCode::VK_OPEN_URL_MV.SWITCH
</autogen>
</item>
<item>
<name>C-UNDERSCORE to Switch iTunes</name>
<identifier>private.mv_itunes</identifier>
<autogen> __KeyToKey__ KeyCode::JIS_UNDERSCORE, ModifierFlag::CONTROL_L | ModifierFlag::NONE,
KeyCode::VK_OPEN_URL_MV.ITUNES
</autogen>
</item>
<item>
<name>C-1 to Dock1</name>
<identifier>private.dock1</identifier>
<autogen> __KeyToKey__ KeyCode::1, ModifierFlag::CONTROL_L | ModifierFlag::NONE,
KeyCode::VK_OPEN_URL_MV.1
</autogen>
</item>
<item>
<name>C-2 to Dock2</name>
<identifier>private.dock2</identifier>
<autogen> __KeyToKey__ KeyCode::2, ModifierFlag::CONTROL_L | ModifierFlag::NONE,
KeyCode::VK_OPEN_URL_MV.2
</autogen>
</item>
<item>
<name>C-3 to Dock3</name>
<identifier>private.dock3</identifier>
<autogen> __KeyToKey__ KeyCode::3, ModifierFlag::CONTROL_L | ModifierFlag::NONE,
KeyCode::VK_OPEN_URL_MV.3
</autogen>
</item>
<item>
<name>C-4 to Dock4</name>
<identifier>private.dock4</identifier>
<autogen> __KeyToKey__ KeyCode::4, ModifierFlag::CONTROL_L | ModifierFlag::NONE,
KeyCode::VK_OPEN_URL_MV.4
</autogen>
</item>
<item>
<name>C-5 to Dock5</name>
<identifier>private.dock5</identifier>
<autogen> __KeyToKey__ KeyCode::5, ModifierFlag::CONTROL_L | ModifierFlag::NONE,
KeyCode::VK_OPEN_URL_MV.5
</autogen>
</item>
<item>
<name>C-6 to Dock6</name>
<identifier>private.dock6</identifier>
<autogen> __KeyToKey__ KeyCode::6, ModifierFlag::CONTROL_L | ModifierFlag::NONE,
KeyCode::VK_OPEN_URL_MV.6
</autogen>
</item>
<item>
<name>C-7 to Dock7</name>
<identifier>private.dock7</identifier>
<autogen> __KeyToKey__ KeyCode::7, ModifierFlag::CONTROL_L | ModifierFlag::NONE,
KeyCode::VK_OPEN_URL_MV.7
</autogen>
</item>
<item>
<name>C-8 to Dock8</name>
<identifier>private.dock8</identifier>
<autogen> __KeyToKey__ KeyCode::8, ModifierFlag::CONTROL_L | ModifierFlag::NONE,
KeyCode::VK_OPEN_URL_MV.8
</autogen>
</item>
<item>
<name>C-9 to Dock9</name>
<identifier>private.dock9</identifier>
<autogen> __KeyToKey__ KeyCode::9, ModifierFlag::CONTROL_L | ModifierFlag::NONE,
KeyCode::VK_OPEN_URL_MV.9
</autogen>
</item>
<item>
<name>C-0 to Dock10</name>
<identifier>private.dock10</identifier>
<autogen> __KeyToKey__ KeyCode::0, ModifierFlag::CONTROL_L | ModifierFlag::NONE,
KeyCode::VK_OPEN_URL_MV.0
</autogen>
</item>
</root>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment