Skip to content

Instantly share code, notes, and snippets.

@lejafar
Last active June 19, 2016 11:55
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 lejafar/3ea56be208e4958116acf4150ab98566 to your computer and use it in GitHub Desktop.
Save lejafar/3ea56be208e4958116acf4150ab98566 to your computer and use it in GitHub Desktop.
private.xml example to trigger a custom script using bluetooth remote using Karabiner, I'm using it with my Qmote from @qblinks
<?xml version="1.0"?>
<root>
<vkopenurldef>
<name>KeyCode::VK_OPEN_URL_SHELL_whatever</name>
<url type="shell">
<![CDATA[ /bin/bash ~/whatever.sh ]]>
</url>
</vkopenurldef>
<item>
<name>Set remote trigger for ~/whatever.sh</name>
<appendix>Swap right arrow keystroke, triggered by a remote, with executing ~/whatever.sh</appendix>
<identifier>private.whatever</identifier>
<block>
<!-- As far as I'm concerned, I should only exclude my apple keyboard -->
<device_not>DeviceVendor::APPLE_COMPUTER, DeviceProduct::ANY</device_not>
<autogen>
__KeyToKey__
KeyCode::CURSOR_RIGHT,
KeyCode::VK_OPEN_URL_SHELL_whatever,
</autogen>
</block>
</item>
</root>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment