Sure thing. Everything flows from kaleidoscope::hid:
As written in the comments _pressModifierKey is a hack to make sure that when you send a modifier, it gets to the host at least one usb report before the keys it’s modifying. This is a workaround for ChromeOS and not actually a required part of the spec.
Everything eventually flows to
which calls KeyboardioHID’s
press() pulls out the modifier keys and puts them into
_keyReport.modifiers, rather than
sendReport() actually sends the USB event:
What it’s sending is not
_keyReport.allKeys, which is the concatenated version of all the bits in those two fields.
(To get the github embeds, click on a line number in a github source listing. You’ll get a URL like
Then just paste it inline in your message.)