|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Only send keypresses if press or hold state |
|
|
// Only send keypresses if press or hold state |
|
|
if ( stateType == 0x00 && state == 0x03 ) // Release state |
|
|
if ( stateType == 0x00 && state == 0x03 ) // Release state |
|
|
|
|
|
{ |
|
|
|
|
|
USBKeys_ConsCtrl = 0; |
|
|
return; |
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// Set consumer control code |
|
|
// Set consumer control code |
|
|
USBKeys_ConsCtrl = *(uint16_t*)(&args[0]); |
|
|
USBKeys_ConsCtrl = *(uint16_t*)(&args[0]); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Only send keypresses if press or hold state |
|
|
// Only send keypresses if press or hold state |
|
|
if ( stateType == 0x00 && state == 0x03 ) // Release state |
|
|
if ( stateType == 0x00 && state == 0x03 ) // Release state |
|
|
|
|
|
{ |
|
|
|
|
|
USBKeys_SysCtrl = 0; |
|
|
return; |
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// Set system control code |
|
|
// Set system control code |
|
|
USBKeys_SysCtrl = args[0]; |
|
|
USBKeys_SysCtrl = args[0]; |