void HIDDKeyboardInputReport_PressModifierKey(HIDDKeyboardInputReport *report, unsigned char key) { ASSERT((key >= HIDDKeyboardDriverDescriptors_FIRSTMODIFIERKEY) && (key <= HIDDKeyboardDriverDescriptors_LASTMODIFIERKEY), "Invalid standard key code (%d)\n\r", key); // Set corresponding bit unsigned char bit = key - HIDDKeyboardDriverDescriptors_FIRSTMODIFIERKEY; report->bmModifierKeys |= 1 << bit; }