Skip to content

Instantly share code, notes, and snippets.

@julienma
Created July 21, 2016 02:39
Show Gist options
  • Save julienma/88377ba4f33ac9fdce59c0fa6697aa8e to your computer and use it in GitHub Desktop.
Save julienma/88377ba4f33ac9fdce59c0fa6697aa8e to your computer and use it in GitHub Desktop.
Karabiner modifier for Logitech K811 Keyboard: [EJECT] will do next/previous tracks.
<?xml version="1.0"?>
<root>
<deviceproductdef>
<productname>LOGITECH_K811</productname>
<productid>0xb317</productid>
</deviceproductdef>
<item>
<name>Logitech K811 Eject to Next / Previous Tracks</name>
<appendix>Change Keyboard Eject key to Next (press once) or Previous (press twice) Track functions</appendix>
<identifier>private.julienma.k811_eject_to_nextOrPreviousTrack</identifier>
<device_only>DeviceVendor::LOGITECH, DeviceProduct::LOGITECH_K811</device_only>
<autogen>
--KeyToConsumer--
ConsumerKeyCode::EJECT,
KeyCode::VK_NONE,
Option::KEYTOKEY_DELAYED_ACTION,
ConsumerKeyCode::MUSIC_NEXT,
Option::KEYTOKEY_DELAYED_ACTION_CANCELED_BY, ConsumerKeyCode::EJECT,
ConsumerKeyCode::MUSIC_PREV,
KeyCode::VK_KEYTOKEY_DELAYED_ACTION_DROP_EVENT,
</autogen>
</item>
</root>
@julienma
Copy link
Author

Install Karabiner:

brew cask install karabiner

Add the content of this gist to Karabiner's private.xlm.

This will enable next / previous tracks by clicking on EJECT on the K811:

  • press EJECT once: next track
  • press EJECT twice: previous track

@julienma
Copy link
Author

julienma commented Jan 6, 2017

Update: Karabiner doesn't work anymore with macOS Sierra 10.12.
The "replacement" app Karabiner-Element seems to be working, but the Eject key is not mappable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment