1
0
Dimitris Mantzouranis 4 сар өмнө
parent
commit
cc291cff7f
2 өөрчлөгдсөн 10 нэмэгдсэн , 1 устгасан
  1. 8 0
      quantum/via.c
  2. 2 1
      quantum/via.h

+ 8 - 0
quantum/via.c

@@ -357,6 +357,14 @@ void raw_hid_receive(uint8_t *data, uint8_t length) {
                     command_data[4] = value & 0xFF;
                     break;
                 }
+                case id_keycodes_version: {
+                    uint32_t value  = QMK_KEYCODES_VERSION_BCD;
+                    command_data[1] = (value >> 24) & 0xFF;
+                    command_data[2] = (value >> 16) & 0xFF;
+                    command_data[3] = (value >> 8) & 0xFF;
+                    command_data[4] = value & 0xFF;
+                    break;
+                }
                 default: {
                     // The value ID is not known
                     // Return the unhandled state

+ 2 - 1
quantum/via.h

@@ -39,7 +39,7 @@
 
 // This is changed only when the command IDs change,
 // so VIA Configurator can detect compatible firmware.
-#define VIA_PROTOCOL_VERSION 0x000C
+#define VIA_PROTOCOL_VERSION 0x000D
 
 // This is a version number for the firmware for the keyboard.
 // It can be used to ensure the VIA keyboard definition and the firmware
@@ -82,6 +82,7 @@ enum via_keyboard_value_id {
     id_switch_matrix_state = 0x03,
     id_firmware_version    = 0x04,
     id_device_indication   = 0x05,
+    id_keycodes_version    = 0x06,
 };
 
 enum via_channel_id {