1

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

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

<?xml version="1.0"?>
<root>
  <item>
    <name>test</name>
    <identifier>test</identifier>
    <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>
  </item>
</root>

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 – phil pirozhkov Aug 7 '16 at 9:24
1

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 Oct 18 '13 at 22:25

You must log in to answer this question.

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