+ // Check system control keys
+ if ( USBKeys_Changed & USBKeyChangeState_System )
+ {
+ if ( Output_DebugMode )
+ {
+ print("SysCtrl[");
+ printHex_op( USBKeys_SysCtrl, 2 );
+ print( "] " NL );
+ }
+
+ *tx_buf++ = 0x02; // ID
+ *tx_buf = USBKeys_SysCtrl;
+ tx_packet->len = 2;
+
+ // Send USB Packet
+ usb_tx( SYS_CTRL_ENDPOINT, tx_packet );
+ USBKeys_Changed &= ~USBKeyChangeState_System; // Mark sent
+ return;
+ }
+
+ // Check consumer control keys
+ if ( USBKeys_Changed & USBKeyChangeState_Consumer )
+ {
+ if ( Output_DebugMode )
+ {
+ print("ConsCtrl[");
+ printHex_op( USBKeys_ConsCtrl, 2 );
+ print( "] " NL );
+ }
+
+ *tx_buf++ = 0x03; // ID
+ *tx_buf++ = (uint8_t)(USBKeys_ConsCtrl & 0x00FF);
+ *tx_buf = (uint8_t)(USBKeys_ConsCtrl >> 8);
+ tx_packet->len = 3;
+
+ // Send USB Packet
+ usb_tx( SYS_CTRL_ENDPOINT, tx_packet );
+ USBKeys_Changed &= ~USBKeyChangeState_Consumer; // Mark sent
+ return;
+ }
+