Just a quick thing I noticed. I was trying to make a simple button that would send a CMD + S (to save a doc in my Mac) and when I tried to use the KEY_MODIFIER_LEFT_GUI, which according to this tutorial is 0x83, it did not work. Apparently the Mac command key is 0x08. after doing that it worked.
define MAC_CMD_KEY 0x08
define SAVE_KEY 0x16 // according to the HID usage table for S or s
sendKey(SAVE_KEY, MAC_CMD_KEY);
I hope this helps someone. btw if you google “KEY_MODIFIER_LEFT_GUI mac” you will see that 0x08 pop up everywhere.