hidutil-key-remapping-generator
hidutil-key-remapping-generator copied to clipboard
Update keys.js with illumination key values
Adds illumination_decrement
and illumination_increment
hex codes as of macOS 13.4 Ventura.
The latest M2 macbooks removed hardware media keys for keyboard backlight control which many users may be looking to re-implement via remapping. I've tested that the values for decrementing and incrementing the keyboard backlight work by remapping F5 and F6 keys to decrement and increment respectively using the following command:
/usr/bin/hidutil property --set "{\"UserKeyMapping\":[{\"HIDKeyboardModifierMappingSrc\": 0x70000003E,\"HIDKeyboardModifierMappingDst\": 0xFF00000009},{\"HIDKeyboardModifierMappingSrc\": 0x70000003F, \"HIDKeyboardModifierMappingDst\": 0xFF00000008}]}"
Note that I have changed settings in my system preferences to default the keyboard to using function keys and media keys are accessed via using the FN modifier key alongside the desired media key.
As I understand the list is:
-
F5
is0x70000003E
-
F6
is0x70000003F
-
Mic button
is0xC000000CF
-
Moon button
is0x10000009B