News for hackers. Stuff that matters.
Re:macOS command-line tools you might not know about by BruceEel on Tuesday June 27, 2023 @09:20AM (#36492319)
Nice list.

Also, hidutil (https://developer.apple.com/library/archive/technotes/tn2450...).

Example:

     hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x700000049,"HIDKeyboardModifierMappingDst":0x700000065}]}'
For my PC keyboard, remaps "Ins" (normally useless under macOS) to something ("PC Execute") I can trap and remap with Keyboard Maestro.
Re:macOS command-line tools you might not know about by maratc on Tuesday June 27, 2023 @09:27AM (#36492415)

    hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x700000064,"HIDKeyboardModifierMappingDst":0x700000035}]}'
Remaps top left key on Euro-style keyboards from useless "paragraph" to useful "backtick".
Re:macOS command-line tools you might not know about by kevans91 on Tuesday June 27, 2023 @11:34AM (#36494367)
Yes, this is great... I was given a Macbook with a Norweigan keyboard for testing a port of FreeBSD on it, and I quickly discovered that the keyboard layout remapping stuff available via the UI won't remap at least this one key to what I'd find on my US keyboard.
Re:macOS command-line tools you might not know about by hoherd on Tuesday June 27, 2023 @09:56AM (#36492826)
not to be confused with hdiutil:

    hdiutil detach /Volumes/some-usb-drive

    hdiutil makehybrid -joliet -o foo.iso ./srcfolder/
Re:macOS command-line tools you might not know about by jiripospisil on Tuesday June 27, 2023 @10:42AM (#36493561)
There's a nice generator for these mappings https://hidutil-generator.netlify.app/
Re:macOS command-line tools you might not know about by xiaomai on Wednesday June 28, 2023 @04:48PM (#36512367)
Oh wow, this is amazing. I had been unable to _swap_ esc and caps lock on the mac until now.