Skip to content

Instantly share code, notes, and snippets.

@eladnava
Last active Sep 5, 2016
Embed
What would you like to do?
Karabiner private.xml for volume and music playback controls using F13 - F19 keys on wired Apple Keyboard
<?xml version="1.0"?>
<root>
<item>
<name>F19 to Sleep</name>
<identifier>Sleep</identifier>
<autogen>
__KeyToKey__
KeyCode::F19,
KeyCode::VK_CONSUMERKEY_EJECT, ModifierFlag::OPTION_L | ModifierFlag::COMMAND_L
</autogen>
</item>
<item>
<name>F18 to Volume Up</name>
<identifier>VolumeUp</identifier>
<autogen>
__KeyToKey__
KeyCode::F18,
ConsumerKeyCode::VOLUME_UP
</autogen>
</item>
<item>
<name>F17 to Volume Down</name>
<identifier>VolumeDown</identifier>
<autogen>
__KeyToKey__
KeyCode::F17,
ConsumerKeyCode::VOLUME_DOWN
</autogen>
</item>
<item>
<name>F16 to Mute</name>
<identifier>VolumeMute</identifier>
<autogen>
__KeyToKey__
KeyCode::F16,
ConsumerKeyCode::VOLUME_MUTE
</autogen>
</item>
<item>
<name>F15 to Next Song</name>
<identifier>NextSong</identifier>
<autogen>
__KeyToKey__
KeyCode::F15,
KeyCode::VK_CONSUMERKEY_MUSIC_NEXT
</autogen>
</item>
<item>
<name>F14 to Play/Pause Song</name>
<identifier>PlayPauseSong</identifier>
<autogen>
__KeyToKey__
KeyCode::F14,
KeyCode::VK_CONSUMERKEY_MUSIC_PLAY
</autogen>
</item>
<item>
<name>F13 to Previous Song</name>
<identifier>PrevSong</identifier>
<autogen>
__KeyToKey__
KeyCode::F13,
KeyCode::VK_CONSUMERKEY_MUSIC_PREV
</autogen>
</item>
<vkopenurldef>
<name>KeyCode::VK_OPEN_URL_SHELL_display_sleep</name>
<url type="shell">open -a /System/Library/Frameworks/ScreenSaver.framework/Versions/A/Resources/ScreenSaverEngine.app</url>
</vkopenurldef>
<item>
<name>Eject to Start Screensaver</name>
<identifier>EjectStartScreensaver</identifier>
<autogen>
__KeyToKey__ ConsumerKeyCode::EJECT, ModifierFlag::NONE,
KeyCode::VK_OPEN_URL_SHELL_display_sleep
</autogen>
</item>
</root>
@eladnava
Copy link
Author

eladnava commented Aug 27, 2016

Hotkeys

  1. F13 - Previous Song
  2. F14 - Play / Pause Song
  3. F15 - Next Song
  4. F16 - Mute
  5. F17 - Volume Down
  6. F18 - Volume Up
  7. F19 - Sleep (bonus)
  8. Eject - Lock & Screensaver (bonus)

Reference

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