These days I get all my music needs from streaming websites, so the media keys on my keyboard are basically useless to me:

Media keys

I want to map them to cmd+[ and cmd+], which is the shortcut to change tabs across many mac applications (Chrome, SublimeText). Can this be done and if so how do?


2 Answers 2


You can use a private.xml like this with KeyRemap4MacBook:

<?xml version="1.0"?>
    <autogen>__ConsumerToKey__ ConsumerKeyCode::MUSIC_PREV,
    KeyCode::BRACKET_LEFT, ModifierFlag::COMMAND_L | ModifierFlag::SHIFT_L</autogen>
    <autogen>__ConsumerToKey__ ConsumerKeyCode::MUSIC_NEXT,
    KeyCode::BRACKET_RIGHT, ModifierFlag::COMMAND_L | ModifierFlag::SHIFT_L</autogen>

For some keyboards you might need to replace __ConsumerToKey__ ConsumerKeyCode::MUSIC_PREV with __KeyToKey__ KeyCode::VK_CONSUMERKEY_MUSIC_PREV.

See the source for the key code values and predefined settings.

  • KeyRemap4MacBook is called Karabiner now Commented Aug 7, 2016 at 9:24

BetterTouchTool is probably the easiest way to do this (and unlike KeyRemap4MacBook, it lets you control key-remappings on a per-app basis).

  • KeyRemap4Macbook does also support application-specific settings. See the "specify application" part in the first link in my answer.
    – Lri
    Commented Oct 18, 2013 at 22:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .