# HG changeset patch # User Jacob Alexander # Date 1424758419 28800 # Node ID 18f461ea64402c19a759cacc1301f6c8622be457 # Parent 8c9e4b8a19995c4fb4f8bbf776645777fbca582a# Parent 9c04b0253707b08b0673134585e8afb1b85d14ce Merge pull request #16 from victorluft/bugfix/consumer_code_release clear buffers on Consumer/System Control release diff -r 8c9e4b8a1999 -r 18f461ea6440 Output/pjrcUSB/output_com.c --- a/Output/pjrcUSB/output_com.c Sun Feb 22 14:14:55 2015 -0800 +++ b/Output/pjrcUSB/output_com.c Mon Feb 23 22:13:39 2015 -0800 @@ -219,7 +219,10 @@ // Only send keypresses if press or hold state if ( stateType == 0x00 && state == 0x03 ) // Release state + { + USBKeys_ConsCtrl = 0; return; + } // Set consumer control code USBKeys_ConsCtrl = *(uint16_t*)(&args[0]); @@ -250,7 +253,10 @@ // Only send keypresses if press or hold state if ( stateType == 0x00 && state == 0x03 ) // Release state + { + USBKeys_SysCtrl = 0; return; + } // Set system control code USBKeys_SysCtrl = args[0];