using hidutil to map two keys to a single key

I've lost the functionality of my ] on my keyboard. Previously I used Karabiner to map [ + option to ], however now that I've updated to Sierra, this doesn't work.

I've seen this post: How do I remap a key in macOS Sierra, e.g., Right Alt to Right Control?

However is there a way to map 2 keys to a single key using hidutil property?

Specifically, I'd like to map [ + option to ]

I've tried a few iterations including:

hidutil property --set '{"UserKeyMapping": [{["HIDKeyboardModifierMappingSrc":0x70000002f "HIDKeyboardModifierMappingSrc":0x7000000e2], "HIDKeyboardModifierMappingDst":0x700000030}]}'

and

hidutil property --set '{"UserKeyMapping": [{"HIDKeyboardModifierMappingSrc":[0x70000002f, 0x7000000e2], "HIDKeyboardModifierMappingDst":0x700000030}]}'

Neither of these worked


Solution 1:

There's a third-party application called BetterTouchTool that will let you do this (and a ton more) quite easily. Unfortunately, it's no longer a free app. However, it's an amazing app that's worth far more than it costs if you ask me.

For the record, no, I'm not related to the product in any way. To the contrary, I'm a long-time paying customer who donated long before the dev started charging for it. At this point its so critical to my daily use on a Mac I feel completely lost without it.)