Skip to content

Instantly share code, notes, and snippets.

@Crenshinibon
Created October 25, 2012 19:54
Show Gist options
  • Save Crenshinibon/3955017 to your computer and use it in GitHub Desktop.
Save Crenshinibon/3955017 to your computer and use it in GitHub Desktop.
Sending the keys to the BlueSmirf
static void sendKeyState(){
if(stateChanged){
calcKeyCodes();
byte hidReport[REPORT_LENGTH] = {0xFD,0x09,0x01,modifiers[0],0x00,0x00,0x00,0x00,0x00,0x00,0x00};
for(int i = 0; i < keyCodeIndex; i++){
hidReport[5 + i] = keyCodes[i];
}
for(int i = 0; i < REPORT_LENGTH; i++){
Serial.write(hidReport[i]);
}
Serial.flush();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment