Skip to content

Instantly share code, notes, and snippets.

@giseongeom
Last active August 26, 2022 08:56
Show Gist options
  • Save giseongeom/2967a6632d5f76501fd62207e339b870 to your computer and use it in GitHub Desktop.
Save giseongeom/2967a6632d5f76501fd62207e339b870 to your computer and use it in GitHub Desktop.
Change windows menu key as Mac option using hidutil
# hidutil property --set '{"UserKeyMapping":[ { "HIDKeyboardModifierMappingSrc": 0x700000065, "HIDKeyboardModifierMappingDst": 0x7000000E6 } ]}'
hidutil property --set '{"UserKeyMapping":[
{
"HIDKeyboardModifierMappingSrc": 0x700000065,
"HIDKeyboardModifierMappingDst": 0x7000000E6
},
]}'
@giseongeom
Copy link
Author

com.example.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.dgrcode.KeyRemapping</string>
	<key>ProgramArguments</key>
	<array>
		<string>/usr/bin/hidutil</string>
		<string>property</string>
		<string>--set</string>
		<string>{"UserKeyMapping":[ { "HIDKeyboardModifierMappingSrc": 0x700000065, "HIDKeyboardModifierMappingDst": 0x7000000E6 } ]}</string>
	</array>
	<key>RunAtLoad</key>
	<true/>
</dict>
</plist>




Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment