- Copy configuration below to
~/Library/LaunchAgents/com.local.KeyRemapping.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.local.KeyRemapping</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/hidutil</string>
<string>property</string>
<string>--set</string>
<string>{"UserKeyMapping":[
{
"HIDKeyboardModifierMappingSrc": 0xFF00000003,
"HIDKeyboardModifierMappingDst": 0x700000055
}
]}</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
If you use keyboard with a numpad you would better change 0x700000055 to something else. Google hdutil.