I am using Arduino Keyboard library to write a keyboard firmware.
Does pressing the same scancode a second time (without release) send a _keyReport over USB?
for example:
Keyboard.press(MODIFIERKEY_LEFT_SHIFT); //first press alters _keyReport and sends it over USB
Keyboard.press(MODIFIERKEY_LEFT_SHIFT); //second press does not alter the _keyReport
Does the second press send the _keyReport over USB, even when it has not changed?
I started tracing from Keyboard.press() and got as far as USB_Send().
But I don't understand the low-level code in USB_Send().
Maybe there is some code that detects if keyReport has changed since the last send, I don't know.
Here is the trace:
Arduino\hardware\arduino\avr\cores\arduino\HID.cpp > Keyboard::press() > Keyboard_::sendReport() > WEAK HID_SendReport() >
Arduino\hardware\arduino\avr\cores\arduino\USBCore.cpp > USB_Send()
Is _keyReport sent over USB even when _keyReport has not changed?
Thank you.