hidutil property --set '{ "UserKeyMapping": [{ "HIDKeyboardModifierMappingSrc": 0x70000002B, "HIDKeyboardModifierMappingDst": 0x7000000E1 }, { "HIDKeyboardModifierMappingSrc": 0x700000039, "HIDKeyboardModifierMappingDst": 0x70000002B }, { "HIDKeyboardModifierMappingSrc": 0x7000000E1, "HIDKeyboardModifierMappingDst": 0x7000000E2 }] }'
It remaps tab->L.shift, capslock->tab, L.shift->L.alt Why? Using TheCoreLite, so I can hit tab/caps/shift labelled keys with pinky and cmd with thumb and reach a good number of hotkeys including function keys.
On Windows, the PowerToys keyboard manager can do the same with a nice config UI.