I use a generic external USB keyboard (specifically Amazon Basics Wired Keyboard) with my MacBook Pro. The keyboard doesn't include the fn key present on MacBook's built-in keyboard.

On the external keyboard, I wish for F1, F2 etc. keys to function just like built-in keyboards default configuration, i.e. to control Mac features like adjusting brightness, Mission Control, Launchpad etc. and not work as plain function keys.

How do I configure the external keyboard to do that? I would much prefer for a solution built into macOS rather than relying on a 3rd party app.

I am using a late 2013 15" MacBook Pro running macOS High Sierra 10.13.6.


The fn key isn't a modifier that's sent to the OS, it modifies the scan code that is sent.

To test this out, you can use a built in utility called xev (requires X11) to view the scan codes being sent from your mouse and keyboard. You can also use Karabiner's Event Viewer to to obtain the key press scan codes.

What this means is that the scan code for F1 (130) will be different from the scan code of fnF1 (107). Keep in mind that macOS allows you to "lock" the fn key to a particular behavior (have the function keys act as normal function keys or act as the "special feature keys").

This is different from other modifier keys (like Shift or Option in that both scan codes are sent (i.e. Shift A sends 64 and 8).

As for remapping a keyboard, you can use the built in utility hidutil to remap keys. This answer here can guide you on how to do that.

This is a bit of a workaround for a simple keyboard, and my preference would be to just purchase a cheap keyboard with the fn key functionality built in so everything works out of the box.

  • The answer is wrong in principal. MacOS does detect fn key standalone. For testing this, you can go to Accessibility>Keyboard>Enable Sticky Keys. Now press the fn key alone and you will its recognised by the OS. Having said that karbinger or probably xev does not detect it. I'm not very sure but I think the Sticky key option picks the fn key from a lower level rather than from the driver. – simar Dec 23 '20 at 8:07

No chance.

to use the function keys on the Mac you'll need an Apple keyboard.

I had the same problem at one of my customers Mac.

Edit: This information is wrong. Look at Allans post for the solution.

  • 1
    Actually, this can be done. – Allan Jul 19 '18 at 10:25
  • 1
    Sorry for the wrong information. – Fabian Gr Jul 19 '18 at 10:31

You must log in to answer this question.

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