void loadConfig() {
  for ( int i = 0; i < 32;  ++i ) {
    currentConf[i * 4] = i;
  }
  //-------------------------------------------
// Mode 0
  currentConf[1] = 255;
  currentConf[2] = 10;
  currentConf[3] = 10;
// Mode 1
  currentConf[5] = 10;
  currentConf[6] = 255;
  currentConf[7] = 20;
  //-------------------------------------------
}

void HIDaction(byte input) {
  byte mode = input >> 3;
  byte button = input & 0b00000111;
  switch (mode) {
    //-------------------------------------------
    case 0:
      switch (button) {
        case 1:
          Keyboard.press(KEY_LEFT_ARROW);
          Keyboard.releaseAll();
          break;
        case 2:
          Keyboard.print(" ");
          break;
        case 3:
          Keyboard.press(KEY_RIGHT_ARROW);
          Keyboard.releaseAll();
          break;
        case 4:
          Keyboard.print("f");
          break;
        case 5:
          Keyboard.print("m");
          break;
        case 6:
          Consumer.write(MEDIA_VOLUME_UP);
          break;
        case 7:
          Consumer.write(MEDIA_VOLUME_DOWN);
          break;
      }
      break;
    //-------------------------------------------
    case 1:
      switch (button) {
        case 1:
          Consumer.write(MEDIA_PREVIOUS);
          break;
        case 2:
          Keyboard.print(" ");
          Consumer.write(MEDIA_PLAY_PAUSE);
          break;
        case 3:
          Consumer.write(MEDIA_NEXT);
          break;
        case 4:
          Consumer.write(MEDIA_REWIND);
          break;
        case 5:
          Consumer.write(MEDIA_FAST_FORWARD);
          break;
        case 6:
          Consumer.write(MEDIA_VOLUME_UP);
          break;
        case 7:
          Consumer.write(MEDIA_VOLUME_DOWN);
          break;
      }
      break;
  }
}
