by tom_ · 9mo ago · 0 comments
It looks like you can still use hidutil to remap some other key. This invocation seems to remap the Application key to the fn key:
sudo hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x700000065,"HIDKeyboardModifierMappingDst":0xFF00000003}]}'
On my keyboard, metakeywise, I then have 2 x Shift, 2 x Ctrl, 2 x Option (marked Alt), 2 x Command (marked Start), 1 x undetectable-to-macOS (marked Fn), and 1 x Fn (got that little Windows context menu logo on it). # note: works for e.g. Fn-F (fullscreen), but not Fn-F{1..12} (brightness etc.)
alias app2fn+=$'hidutil property --set \'{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x700000065,"HIDKeyboardModifierMappingDst":0xFF00000003}]}\''
alias app2fn-=$'hidutil property --set \'{"UserKeyMapping":[]}\''
alias app2fn?=$'hidutil property --get "UserKeyMapping"'