1

I would like to remap my Left Control to Fn key using hidutil. This is the command I've been trying to use:

hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x7000000E0,"HIDKeyboardModifierMappingDst":0x7000000??}]}'

There is a list of hex IDs on this page: https://developer.apple.com/library/archive/technotes/tn2450/_index.html but Fn key is not there.

I couldn't find it in a USB specification either: https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf.

The ID (0x3F) found in this document: https://github.com/tekezo/Karabiner/blob/master/src/bridge/generator/keycode/data/KeyCode.data is wrong.

What is the hex code for Fn key that I can use with hidutil? Or is it not possible what I've been trying to do?

(I would have remapped the keyboard using Karabiner-Elements if it wasn't buggy on my computer.)

1

I got this from Key Codes (freeware)

Fn key down

Modifier Change
    Keys:       
    Key Code:   65535 / 0xffff
    Modifiers:  8388864 / 0x800100 ⓘ

NX_SECONDARYFNMASK / kCGEventFlagMaskSecondaryFn / NSFunctionKeyMask = 8388608 / 0x800000

NX_NONCOALSESCEDMASK / kCGEventFlagMaskNonCoalesced = 256 / 0x100

Fn key up

Modifier Change
    Keys:       
    Key Code:   65535 / 0xffff
    Modifiers:  256 / 0x100 ⓘ

NX_NONCOALSESCEDMASK / kCGEventFlagMaskNonCoalesced = 256 / 0x100

tbh, it doesn't really mean a great deal to me, I'm no coder... ;)

  • I tried those codes but they don't work, or at least not with hidutil. Thanks though. – Mateusz Oct 25 '18 at 12:37

You must log in to answer this question.

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