Mac keyboard with hidutil #

[Update: 13-Apr-2023 with some of the background context and some things I learned from hackernews]

[Update: 18-Dec-2023] This hidutil stopped working for me in MacOS 13.6 and 14.2. Also see other people having problems too.

[Update: 28-Jan-2024] Some people say hidutil works again in Mac OS 14.3.

On my Mac, I've used KeyRemap4Macbook, Karabiner, Karabiner Elements, and FunctionFlip for some of my key remapping needs. The main things I want:

  1. On the laptop keyboard, some media keys should be function keys but other media keys should stay media keys. When using fn I want to get the other version of the key.
  2. On external keyboards, make the function keys act like the laptop keyboard.
  3. On external keyboards, the numpad should act like "numlock off". For example, 4 should be Left Arrow.
  4. On external keyboards, the Windows key should act as Option, and the Alt key should act as Command. This can usually be set in the System Preferences. (Except it doesn't work on one of my keyboards)
  5. I also use those same external keyboards with my Windows and Linux machines, so I prefer to make these changes through software rather than firmware.

Labels: ,