Is there a way to remap the Fn and Ctrl keys on an Apple wireless keyboard?

Windows:

It can be done using SharpKeys 2.1.1:

SharpKeys is a utility that manages a Registry key that allows Windows to remap one key to any other key. Included in the application is a list of common keyboard keys and a Type Key feature to automatically recognize most keyboard keys.

  • What you can do:

    Map an entire key to any other key - e.g. you could remap Caps Lock to a Shift key

  • What you can't do:

    Allow you to swap two keys with each other - e.g. you can’t have Q and Z swap places because the remapping code would get confused


Mac OS X

It can be done using DoubleCommand:

DoubleCommand is software for Mac OS X (a kernel extension) that lets you remap keys, in other words change the way your keyboard works. Often used to make a PC keyboard more comfortable with a Mac, swapping the Alt (Option) and Windows (Command or Apple) keys, since they are in swapped positions on Mac and PC keyboards. DoubleCommand is a quick and easy way to fix this if you use a PC keyboard with your Mac.


Related reading:

I've found the MacBook Pro Keyboard - How to Swap / Remap Keys? to contain useful information on this subject.


Alas, this most probably won't work. With the exception of exchanging the bluetooth keyboard's firmware or rewire the harddware buttons.

Reason: The Fn key is a modifier for the generated scancodes. This key is a modifier at the hardware level. A fn keypress cannot be seen even (using 'xev' on my Apple bluetooth keyboard under linux)

EDIT: A quick test shows it might be possible (using showkey on a real tty):
Fn has keycode 464
Ctrl has keycode 29


For versions up to (and including) 10.11, you can swap the keys with Karabiner (formerly KeyRemap4MacBook), while DoubleCommand can only turn your fn key into a control key.

For versions 10.12+, you'll want to use Karabiner-Elements, a complete rewrite of Karabiner, that is still catching up to the function available in Karabiner. The features that it supports are still in flux.