MacOS – change Caps Lock key to fn key

keyboardmacbook promacos

I replaced standard fn key by left control, left control by another useful key.

And as far as I don't use Caps Lock key in everyday life, I decided to replace Caps Lock key by fn.

I use for this purpose PCKeyboardHack.

change Caps Lock to fn key in PCKeyboardHack

I just inputed number 63 (which corresponds to fn) in Change Caps Lock row.

But now my Caps Lock don't do nothing: neither CapsLocking nor fn key work.

When I change Caps Lock key by forward delete for example (117 code) – it is ok. And Caps Lock starts work as forward delete key.

change Caps Lock to forward delete in PCKeyboardHack

But I need to set fn to Caps Lock key.

UPDATE

I have noticed in KeyRemap4MacBook EventViewer: when I press Caps Lock

KeyRemap4MacBook EventViewer

… I get control_l keycode. But in fact it don't work even as control_l (I checked).

Why it shows control_l? Maybe because I have changed fn key to left control in KeyRemap4MacBook app.

fn to control_l in KeyRemap4MacBook

When I uncheck this checkbox and watch in EventViewer on Caps Lock clicking again: I see Fn code on output.

fn logged in eventViewer but in fact not working

But in fact it does not work as Fn (I check it on fn+delete)

Update 2

I disabled CAPS LOCK

CAPS LOCK - no action

In PCKeyboardHack set F19 to Caps Lock

F19 to Caps LOCK

In KeyRemap4MacBook remap F19 to fn

<item>
    <name>f19_to_fn</name>
    <identifier>f19_to_fn</identifier>
    <autogen>__KeyToKey__ KeyCode::F19, KeyCode::FN</autogen>
</item>

enable f19 to fn in PCKeyboardHack

And now Caps Lock works as fn except f1 – f12 keys. For example when I press default fn + f11 I see Launchpad. When I press remapped fn + f11 I see volume down. So f11 not working with remapped fn.

In other combinations like fn + delete = forward delete remapped fn works well.

Best Answer

Just changing caps lock to key code 63 with PCKeyboardHack works for me. Have you tried setting caps lock no action from System Preferences?

You could also try to use PCKeyboardHack to for example change caps lock to F19 and then use a private.xml like this with KeyRemap4MacBook:

<?xml version="1.0"?>
<root>
  <item>
    <name>test</name>
    <identifier>test</identifier>
    <autogen>__KeyToKey__ KeyCode::F19, KeyCode::FN</autogen>
  </item>
</root>