Quantcast
Channel: SparkFun Electronics Comments
Viewing all articles
Browse latest Browse all 44542

Customer #396088 on Turn your ProMicro into a USB Keyboard/Mouse

$
0
0

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.


Viewing all articles
Browse latest Browse all 44542

Trending Articles