I'd like to know the key pattern for the functional keys (F1, F2, F3....)

I recently purchased a separate media controller for my MacBookPro, it has the ability to map it's buttons to certain key patterns. I'd like to define two of the buttons on it to be Previous Song (F7) and Next Song (F9). But the controller isn't recognizing the key patterns.

I've tried just hitting the F7 key, which it doesn't recognize. I've also tried defining the key pattern as (F7 + fn-key), which it recognizes, but doesn't do anything, it just makes the "does not compute sound" that Mac's make.

So what is the correct key-pattern for specifying the functional keys at the top of the keyboard?

  • F7 is not the same key as 'previous song' . The special functions are accessed by Fn/F-key or just F-key depending on how you have system prefs/keyboard/keyboard configured. I'm reasonably certain that they are not transmitted in any recognisable form by the keyboard. i.e. there is no way of 'pressing' the special function key programatically.
    – Tetsujin
    Nov 24, 2015 at 7:54

1 Answer 1


From my brief research the media keys are passed as events.

As an alternative solution, perhaps you can use a solution similar to the one illustrated here:

  1. Define the keypress you want to perform an action (Using Keyboard Shortcuts in System Preferences or a third-party application like USB Overdrive)
  2. Write an AppleScript to perform the action you need:

    tell application "iTunes"
        next track
    end tell
  • I was thinking the AppleScript route would be a feasible solution. Thanks!
    – Sakiboy
    Nov 24, 2015 at 14:29

You must log in to answer this question.

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