summaryrefslogtreecommitdiffstats
path: root/keyboards/keychron/k5_pro
diff options
context:
space:
mode:
authorlalalademaxiya1 <2831039915@qq.com>2023-03-15 16:51:53 +0800
committerlalalademaxiya1 <2831039915@qq.com>2023-03-15 16:51:53 +0800
commitc6243da12f6643747a24a7aa761e103cc4a848c2 (patch)
tree82d29a9567d09c2d3845654c7e5b16b284b2bc30 /keyboards/keychron/k5_pro
parentee715fc26ade41e56f47e60527f17d5cbdfb584b (diff)
Update Keychron K Pro series keyboards
Diffstat (limited to 'keyboards/keychron/k5_pro')
-rwxr-xr-xkeyboards/keychron/k5_pro/ansi/rgb/config.h7
-rwxr-xr-xkeyboards/keychron/k5_pro/ansi/rgb/rgb.c2
-rwxr-xr-xkeyboards/keychron/k5_pro/ansi/white/config.h7
-rwxr-xr-xkeyboards/keychron/k5_pro/ansi/white/white.c2
-rwxr-xr-xkeyboards/keychron/k5_pro/config.h7
-rwxr-xr-xkeyboards/keychron/k5_pro/k5_pro.c18
-rwxr-xr-xkeyboards/keychron/k5_pro/matrix.c202
-rwxr-xr-xkeyboards/keychron/k5_pro/readme.md4
-rwxr-xr-xkeyboards/keychron/k5_pro/via_json/k5_pro_ansi_rgb_v1.00.json162
-rwxr-xr-xkeyboards/keychron/k5_pro/via_json/k5_pro_ansi_white_v1.00.json114
10 files changed, 223 insertions, 302 deletions
diff --git a/keyboards/keychron/k5_pro/ansi/rgb/config.h b/keyboards/keychron/k5_pro/ansi/rgb/config.h
index 7c0deb60e1..83294b9d52 100755
--- a/keyboards/keychron/k5_pro/ansi/rgb/config.h
+++ b/keyboards/keychron/k5_pro/ansi/rgb/config.h
@@ -25,13 +25,6 @@
# define DRIVER_2_LED_TOTAL 50
# define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
-/* Increase I2C speed to 1000 KHz */
-# define I2C1_TIMINGR_PRESC 0U
-# define I2C1_TIMINGR_SCLDEL 3U
-# define I2C1_TIMINGR_SDADEL 0U
-# define I2C1_TIMINGR_SCLH 15U
-# define I2C1_TIMINGR_SCLL 30U
-
/* Set to infinit, which is use in USB mode by default */
# define RGB_MATRIX_TIMEOUT RGB_MATRIX_TIMEOUT_INFINITE
diff --git a/keyboards/keychron/k5_pro/ansi/rgb/rgb.c b/keyboards/keychron/k5_pro/ansi/rgb/rgb.c
index 4eb555ed64..f20c3d1e97 100755
--- a/keyboards/keychron/k5_pro/ansi/rgb/rgb.c
+++ b/keyboards/keychron/k5_pro/ansi/rgb/rgb.c
@@ -19,7 +19,7 @@
// clang-format off
#ifdef RGB_MATRIX_ENABLE
const ckled2001_led g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+/* Refer to CKLED2001 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/k5_pro/ansi/white/config.h b/keyboards/keychron/k5_pro/ansi/white/config.h
index 5c7351d955..3c2d99a4cf 100755
--- a/keyboards/keychron/k5_pro/ansi/white/config.h
+++ b/keyboards/keychron/k5_pro/ansi/white/config.h
@@ -23,13 +23,6 @@
# define DRIVER_1_LED_TOTAL 108
# define LED_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL
-/* Increase I2C speed to 1000 KHz */
-# define I2C1_TIMINGR_PRESC 0U
-# define I2C1_TIMINGR_SCLDEL 3U
-# define I2C1_TIMINGR_SDADEL 0U
-# define I2C1_TIMINGR_SCLH 15U
-# define I2C1_TIMINGR_SCLL 30U
-
/* Set to infinit, which is use in USB mode by default */
# define LED_MATRIX_TIMEOUT LED_MATRIX_TIMEOUT_INFINITE
diff --git a/keyboards/keychron/k5_pro/ansi/white/white.c b/keyboards/keychron/k5_pro/ansi/white/white.c
index 2826b0249b..214f7a4238 100755
--- a/keyboards/keychron/k5_pro/ansi/white/white.c
+++ b/keyboards/keychron/k5_pro/ansi/white/white.c
@@ -19,7 +19,7 @@
// clang-format off
#ifdef LED_MATRIX_ENABLE
const ckled2001_led g_ckled2001_leds[LED_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+/* Refer to CKLED2001 manual for these locations
* driver
* | LED address
* | | */
diff --git a/keyboards/keychron/k5_pro/config.h b/keyboards/keychron/k5_pro/config.h
index e9ed742789..92a4b1192f 100755
--- a/keyboards/keychron/k5_pro/config.h
+++ b/keyboards/keychron/k5_pro/config.h
@@ -41,6 +41,13 @@
#define LED_CAPS_LOCK_PIN A0
#define LED_PIN_ON_STATE 1
+/* Increase I2C speed to 1000 KHz */
+#define I2C1_TIMINGR_PRESC 0U
+#define I2C1_TIMINGR_SCLDEL 3U
+#define I2C1_TIMINGR_SDADEL 0U
+#define I2C1_TIMINGR_SCLH 15U
+#define I2C1_TIMINGR_SCLL 51U
+
#ifdef KC_BLUETOOTH_ENABLE
/* Hardware configuration */
# define USB_BT_MODE_SELECT_PIN A10
diff --git a/keyboards/keychron/k5_pro/k5_pro.c b/keyboards/keychron/k5_pro/k5_pro.c
index 408d2c60ef..42940fff2b 100755
--- a/keyboards/keychron/k5_pro/k5_pro.c
+++ b/keyboards/keychron/k5_pro/k5_pro.c
@@ -201,7 +201,8 @@ void matrix_scan_kb(void) {
#ifdef KC_BLUETOOTH_ENABLE
static void ckbt51_param_init(void) {
/* Set bluetooth device name */
- ckbt51_set_local_name(STR(PRODUCT));
+ // ckbt51_set_local_name(STR(PRODUCT));
+ ckbt51_set_local_name(PRODUCT);
/* Set bluetooth parameters */
module_param_t param = {.event_mode = 0x02,
.connected_idle_timeout = 7200,
@@ -215,6 +216,21 @@ static void ckbt51_param_init(void) {
ckbt51_set_param(&param);
}
+void ckbt51_default_ack_handler(uint8_t *data, uint8_t len) {
+ if (data[1] == 0x45) {
+ module_param_t param = {.event_mode = 0x02,
+ .connected_idle_timeout = 7200,
+ .pairing_timeout = 180,
+ .pairing_mode = 0,
+ .reconnect_timeout = 5,
+ .report_rate = 90,
+ .vendor_id_source = 1,
+ .verndor_id = 0, // Must be 0x3434
+ .product_id = PRODUCT_ID};
+ ckbt51_set_param(&param);
+ }
+}
+
void bluetooth_enter_disconnected_kb(uint8_t host_idx) {
if (bt_factory_reset) {
bt_factory_reset = false;
diff --git a/keyboards/keychron/k5_pro/matrix.c b/keyboards/keychron/k5_pro/matrix.c
index 3bae52ab1a..3b422d9d2b 100755
--- a/keyboards/keychron/k5_pro/matrix.c
+++ b/keyboards/keychron/k5_pro/matrix.c
@@ -14,9 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "stdint.h"
-#include "hal.h"
-#include "gpio.h"
#include "quantum.h"
#define HC595_STCP B0
@@ -26,64 +23,21 @@
pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
-static inline void HC595_delay(uint16_t n) {
- while (n-- > 0) {
- asm volatile("nop" ::: "memory");
- }
-}
-
-#ifdef DRIVE_SHRIFT_REGISTER_WITH_SPI
-// clang-format off
-const SPIConfig hs_spicfg = {
- .circular = false,
- .slave = false,
- .data_cb = NULL,
- .error_cb = NULL,
- .ssport = PAL_PORT(HC595_STCP),
- .sspad = PAL_PAD(HC595_STCP),
- .cr1 = SPI_CR1_BR_1,
- .cr2 = SPI_CR2_DS_3 | SPI_CR2_DS_2 | SPI_CR2_DS_1 | SPI_CR2_DS_0 | SPI_CR2_SSOE | SPI_CR2_NSSP
-};
-// clang-format on
-#endif
-static void HC595_output(uint32_t data) {
-#ifdef DRIVE_SHRIFT_REGISTER_WITH_SPI
- spiSend(&SPID1, 1, &data);
-#else
- uint8_t i;
- uint8_t n = 1;
-
- for (i = 0; i < MATRIX_COLS; i++) {
- writePinLow(HC595_SHCP);
-
- if (data & 0x0001)
- writePinHigh(HC595_DS);
- else
- writePinLow(HC595_DS);
-
- data >>= 1;
-
- HC595_delay(n);
-
- writePinHigh(HC595_SHCP);
- HC595_delay(n);
+static inline void setPinOutput_writeLow(pin_t pin) {
+ ATOMIC_BLOCK_FORCEON {
+ setPinOutput(pin);
+ writePinLow(pin);
}
-
- HC595_delay(n);
- writePinLow(HC595_STCP);
- HC595_delay(n);
- writePinHigh(HC595_STCP);
-#endif
}
-static inline void setPinOutput_writeLow(pin_t pin) {
+static inline void setPinOutput_writeHigh(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
setPinOutput(pin);
- writePinLow(pin);
+ writePinHigh(pin);
}
}
-static inline void setPinInputHigh_atomic(pin_t pin) {
+static inline void setPinInput_high(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
setPinInputHigh(pin);
}
@@ -97,16 +51,65 @@ static inline uint8_t readMatrixPin(pin_t pin) {
}
}
+static inline void HC595_delay(uint16_t n) {
+ while (n-- > 0) {
+ asm volatile("nop" ::: "memory");
+ }
+}
+
+static void HC595_output(uint32_t data) {
+ ATOMIC_BLOCK_FORCEON {
+ for (uint8_t i = 0; i < MATRIX_COLS; i++) {
+ if (data & 0x1) {
+ writePinHigh(HC595_DS);
+ } else {
+ writePinLow(HC595_DS);
+ }
+
+ data = data >> 1;
+
+ writePinHigh(HC595_SHCP);
+ HC595_delay(1);
+ writePinLow(HC595_SHCP);
+ HC595_delay(1);
+ }
+ writePinHigh(HC595_STCP);
+ HC595_delay(1);
+ writePinLow(HC595_STCP);
+ HC595_delay(1);
+ }
+}
+
+static void HC595_output_oneBit(uint8_t data) {
+ ATOMIC_BLOCK_FORCEON {
+ if (data & 0x1) {
+ writePinHigh(HC595_DS);
+ } else {
+ writePinLow(HC595_DS);
+ }
+
+ writePinHigh(HC595_SHCP);
+ HC595_delay(1);
+ writePinLow(HC595_SHCP);
+ HC595_delay(1);
+
+ writePinHigh(HC595_STCP);
+ HC595_delay(1);
+ writePinLow(HC595_STCP);
+ HC595_delay(1);
+ }
+}
+
static bool select_col(uint8_t col) {
pin_t pin = col_pins[col];
- if (col < 0) {
- if (pin != NO_PIN) {
- setPinOutput_writeLow(pin);
- return true;
- }
+ if (pin != NO_PIN) {
+ setPinOutput_writeLow(pin);
+ return true;
} else {
- HC595_output(~(0x01 << (MATRIX_COLS - 1 - col)));
+ if (col == 0) {
+ HC595_output_oneBit(0x00);
+ }
return true;
}
return false;
@@ -115,81 +118,96 @@ static bool select_col(uint8_t col) {
static void unselect_col(uint8_t col) {
pin_t pin = col_pins[col];
- if (col < 0) {
- if (pin != NO_PIN) {
- setPinInputHigh_atomic(pin);
- }
+ if (pin != NO_PIN) {
+#ifdef MATRIX_UNSELECT_DRIVE_HIGH
+ setPinOutput_writeHigh(pin);
+#else
+ setPinInput_high(pin);
+#endif
} else {
- if (col >= MATRIX_COLS - 1) HC595_output(0xFFFFFFFF);
+ HC595_output_oneBit(0x01);
}
}
static void unselect_cols(void) {
- if (col_pins[0] != NO_PIN) setPinInputHigh_atomic(col_pins[0]);
- HC595_output(0xFFFFFFFF);
+ for (uint8_t x = 0; x < MATRIX_COLS; x++) {
+ pin_t pin = col_pins[x];
+ if (pin != NO_PIN) {
+#ifdef MATRIX_UNSELECT_DRIVE_HIGH
+ setPinOutput_writeHigh(pin);
+#else
+ setPinInput_high(pin);
+#endif
+ } else {
+ if (x == 0) HC595_output(0xFFFFFFFF);
+ }
+ }
}
void select_all_cols(void) {
- if (col_pins[0] != NO_PIN) setPinOutput_writeLow(col_pins[0]);
- HC595_output(0x00000000);
+ for (uint8_t x = 0; x < MATRIX_COLS; x++) {
+ pin_t pin = col_pins[x];
+ if (pin != NO_PIN) {
+ setPinOutput_writeLow(pin);
+ } else {
+ if (x == 0) HC595_output(0x00000000);
+ }
+ }
}
-void matrix_read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) {
+static void matrix_read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col, matrix_row_t row_shifter) {
+ bool key_pressed = false;
+
// Select col
if (!select_col(current_col)) { // select col
return; // skip NO_PIN col
}
- HC595_delay(100);
+ matrix_output_select_delay();
// For each row...
for (uint8_t row_index = 0; row_index < MATRIX_ROWS; row_index++) {
// Check row pin state
if (readMatrixPin(row_pins[row_index]) == 0) {
// Pin LO, set col bit
- current_matrix[row_index] |= (MATRIX_ROW_SHIFTER << current_col);
- // key_pressed = true;
+ current_matrix[row_index] |= row_shifter;
+ key_pressed = true;
} else {
// Pin HI, clear col bit
- current_matrix[row_index] &= ~(MATRIX_ROW_SHIFTER << current_col);
+ current_matrix[row_index] &= ~row_shifter;
}
}
+ // Unselect col
unselect_col(current_col);
- HC595_delay(100);
+ matrix_output_unselect_delay(current_col, key_pressed); // wait for all Row signals to go HIGH
}
void matrix_init_custom(void) {
+ setPinOutput(HC595_DS);
+ setPinOutput(HC595_STCP);
+ setPinOutput(HC595_SHCP);
+
for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
if (row_pins[x] != NO_PIN) {
- setPinInputHigh_atomic(row_pins[x]);
+ setPinInput_high(row_pins[x]);
}
}
-#ifdef DRIVE_SHRIFT_REGISTER_WITH_SPI
- palSetPadMode(PAL_PORT(HC595_SHCP), PAL_PAD(HC595_SHCP), PAL_MODE_ALTERNATE(5) | PAL_STM32_OSPEED_HIGHEST); /* SCK */
- palSetPadMode(PAL_PORT(HC595_DS), PAL_PAD(HC595_DS), PAL_MODE_ALTERNATE(5) | PAL_STM32_OSPEED_HIGHEST); /* MOSI*/
- palSetPadMode(PAL_PORT(HC595_STCP), PAL_PAD(HC595_STCP), PAL_MODE_ALTERNATE(5) | PAL_STM32_OSPEED_HIGHEST); /* CS*/
- spiStart(&SPID1, &hs_spicfg);
-#else
- setPinOutput(HC595_DS);
- setPinOutput(HC595_STCP);
- setPinOutput(HC595_SHCP);
-#endif
+
unselect_cols();
}
bool matrix_scan_custom(matrix_row_t current_matrix[]) {
- bool matrix_has_changed = false;
-
matrix_row_t curr_matrix[MATRIX_ROWS] = {0};
// Set col, read rows
- for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) {
- matrix_read_rows_on_col(curr_matrix, current_col);
+ matrix_row_t row_shifter = MATRIX_ROW_SHIFTER;
+ for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++, row_shifter <<= 1) {
+ matrix_read_rows_on_col(curr_matrix, current_col, row_shifter);
}
- matrix_has_changed = memcmp(current_matrix, curr_matrix, sizeof(curr_matrix)) != 0;
- if (matrix_has_changed) memcpy(current_matrix, curr_matrix, sizeof(curr_matrix));
+ bool changed = memcmp(current_matrix, curr_matrix, sizeof(curr_matrix)) != 0;
+ if (changed) memcpy(current_matrix, curr_matrix, sizeof(curr_matrix));
- return matrix_has_changed;
+ return changed;
}
diff --git a/keyboards/keychron/k5_pro/readme.md b/keyboards/keychron/k5_pro/readme.md
index 63b070d3b6..a02434fa90 100755
--- a/keyboards/keychron/k5_pro/readme.md
+++ b/keyboards/keychron/k5_pro/readme.md
@@ -1,10 +1,12 @@
# Keychron K5 Pro
+![Keychron K3 Pro](https://drive.google.com/file/d/1Sfc0C-Ye0S2wW6eYiaJfluRCJI-b-UKE/view?usp=share_link)
+
A customizable 100% keyboard.
* Keyboard Maintainer: [Keychron](https://github.com/keychron)
* Hardware Supported: Keychron K5 Pro
-* Hardware Availability: [Keychron](https://www.keychron.com)
+* Hardware Availability: [Keychron K5 Pro]()
Make example for this keyboard (after setting up your build environment):
diff --git a/keyboards/keychron/k5_pro/via_json/k5_pro_ansi_rgb_v1.00.json b/keyboards/keychron/k5_pro/via_json/k5_pro_ansi_rgb_v1.00.json
index c6dad89b84..7528f32040 100755
--- a/keyboards/keychron/k5_pro/via_json/k5_pro_ansi_rgb_v1.00.json
+++ b/keyboards/keychron/k5_pro/via_json/k5_pro_ansi_rgb_v1.00.json
@@ -21,29 +21,29 @@
"type": "dropdown",
"content": ["id_qmk_rgb_matrix_effect", 3, 2],
"options": [
- ["00. None", 0],
- ["01. SOLID_COLOR", 1],
- ["02. BREATHING", 2],
- ["03. BAND_SPIRAL_VAL", 3],
- ["04. CYCLE_ALL", 4],
- ["05. CYCLE_LEFT_RIGHT", 5],
- ["06. CYCLE_UP_DOWN", 6],
- ["07. RAINBOW_MOVING_CHEVRON", 7],
- ["08. CYCLE_OUT_IN", 8],
- ["09. CYCLE_OUT_IN_DUAL", 9],
- ["10. CYCLE_PINWHEEL", 10],
- ["11. CYCKE_SPIRAL", 11],
- ["12. DUAL_BEACON", 12],
- ["13. RAINBOW_BEACON", 13],
- ["14. JELLYBEAN_RAINDROPS", 14],
- ["15. PIXEL_RAIN", 15],
- ["16. TYPING_HEATMAP", 16],
- ["17. DIGITAL_RAIN", 17],
- ["18. REACTIVE_SIMPLE", 18],
- ["19. REACTIVE_MULTIWIDE", 19],
- ["20. REACTIVE_MULTINEXUS", 20],
- ["21. SPLASH", 21],
- ["22. SOLID_SPLASH", 22]
+ ["None", 0],
+ ["Solid Color", 1],
+ ["Breathing", 2],
+ ["Band Spiral Val", 3],
+ ["Cycle All", 4],
+ ["Cycle Left Right", 5],
+ ["Cycle Up Down", 6],
+ ["Rainbow Moving Chevron", 7],
+ ["Cycle Out In", 8],
+ ["Cycle Out In Dual", 9],
+ ["Cycle Pinwheel", 10],
+ ["Cycle Spiral", 11],
+ ["Dual Beacon", 12],
+ ["Rainbow Beacon", 13],
+ ["Jellybean Raindrops", 14],
+ ["Pixel Rain", 15],
+ ["Typing Heatmap", 16],
+ ["Digital Rain", 17],
+ ["Reactive Simple", 18],
+ ["Reactive Multiwide", 19],
+ ["Reactive Multinexus", 20],
+ ["Splash", 21],
+ ["Solid Splash", 22]
]
},
{
@@ -54,7 +54,7 @@
"content": ["id_qmk_rgb_matrix_effect_speed", 3, 3]
},
{
- "showIf": "{id_qmk_rgb_matrix_effect} != 0",
+ "showIf": "{id_qmk_rgb_matrix_effect} != 0 && ( {id_qmk_rgb_matrix_effect} < 4 || {id_qmk_rgb_matrix_effect} == 18 || ({id_qmk_rgb_matrix_effect} > 17 && {id_qmk_rgb_matrix_effect} != 21) ) ",
"label": "Color",
"type": "color",
"content": ["id_qmk_rgb_matrix_color", 3, 4]
@@ -65,81 +65,21 @@
}
],
"customKeycodes": [
- {
- "name": "Left Option",
- "title": "Left Option in macOS",
- "shortName": "LOpt"
- },
- {
- "name": "Right Option",
- "title": "Right Option in macOS",
- "shortName": "ROpt"
- },
- {
- "name": "Left Cmd",
- "title": "Left Command in macOS",
- "shortName": "LCmd"
- },
- {
- "name": "Right Cmd",
- "title": "Right Command in macOS",
- "shortName": "RCmd"
- },
- {
- "name": "Mission Control",
- "title": "Mission Control in macOS",
- "shortName": "MCtrl"
- },
- {
- "name": "Launch Pad",
- "title": "Launch Pad in macOS",
- "shortName": "LPad"
- },
- {
- "name": "Task View",
- "title": "Task View in windows",
- "shortName": "Task"
- },
- {
- "name": "File Explorer",
- "title": "File Explorer in windows",
- "shortName": "File"
- },
- {
- "name": "Screen Shot",
- "title": "Screenshot in macOS",
- "shortName": "SShot"
- },
- {
- "name": "Cortana",
- "title": "Cortana in windows",
- "shortName": "Cortana"
- },
- {
- "name": "Siri",
- "title": "Siri in macOS",
- "shortName": "Siri"
- },
- {
- "name": "Bluetooth Host 1",
- "title": "Bluetooth Host 1",
- "shortName": "BTH1"
- },
- {
- "name": "Bluetooth Host 2",
- "title": "Bluetooth Host 2",
- "shortName": "BTH2"
- },
- {
- "name": "Bluetooth Host 3",
- "title": "Bluetooth Host 3",
- "shortName": "BTH3"
- },
- {
- "name": "Battery Level",
- "title": "Show battery level",
- "shortName": "Batt"
- }
+ {"name": "Left Option", "title": "Left Option", "shortName": "LOpt"},
+ {"name": "Right Option", "title": "Right Option", "shortName": "ROpt"},
+ {"name": "Left Cmd", "title": "Left Command", "shortName": "LCmd"},
+ {"name": "Right Cmd", "title": "Right Command", "shortName": "RCmd"},
+ {"name": "Misson Control", "title": "Misson Control, availabe in macOS", "shortName": "MCtrl"},
+ {"name": "Launch pad", "title": "Launch pad, availabe in macOS", "shortName": "LPad"},
+ {"name": "Task View", "title": "Task View in Windows", "shortName": "Task"},
+ {"name": "File Explorer", "title": "File Explorer in Windows", "shortName": "File"},
+ {"name": "Screen shot", "title": "Screenshot in macOS", "shortName": "SShot"},
+ {"name": "Cortana", "title": "Cortana in Windows", "shortName": "Cortana"},
+ {"name": "Siri", "title": "Siri in macOS", "shortName": "Siri"},
+ {"name": "Bluetooth Host 1", "title": "Bluetooth Host 1", "shortName": "BTH1"},
+ {"name": "Bluetooth Host 2", "title": "Bluetooth Host 2", "shortName": "BTH2"},
+ {"name": "Bluetooth Host 3", "title": "Bluetooth Host 3", "shortName": "BTH3"},
+ {"name": "Battery Level", "title": "Show battery level", "shortName": "Batt"}
],
"matrix": {"rows": 6, "cols": 21},
"layouts": {
@@ -158,27 +98,31 @@
"0,3",
"0,4",
{
- "x": 0.5
+ "x": 0.5,
+ "c": "#aaaaaa"
},
"0,5",
"0,6",
"0,7",
"0,8",
{
- "x": 0.5
+ "x": 0.5,
+ "c": "#cccccc"
},
"0,9",
"0,10",
"0,11",
"0,12",
{
- "x": 0.25
+ "x": 0.25,
+ "c": "#aaaaaa"
},
"0,14",
"0,15",
"0,16",
{
- "x": 0.25
+ "x": 0.25,
+ "c": "#cccccc"
},
"0,17",
"0,18",
@@ -187,9 +131,13 @@
],
[
{
- "y": 0.25
+ "y": 0.25,
+ "c": "#aaaaaa"
},
"1,0",
+ {
+ "c": "#cccccc"
+ },
"1,1",
"1,2",
"1,3",
@@ -244,12 +192,12 @@
"2,11",
"2,12",
{
+ "c": "#aaaaaa",
"w": 1.5
},
"2,13",
{
- "x": 0.25,
- "c": "#aaaaaa"
+ "x": 0.25
},
"2,14",
"2,15",
@@ -369,12 +317,10 @@
},
"5,11",
{
- "c": "#cccccc",
"w": 1.25
},
"5,12",
{
- "c": "#aaaaaa",
"w": 1.25
},
"5,13",
diff --git a/keyboards/keychron/k5_pro/via_json/k5_pro_ansi_white_v1.00.json b/keyboards/keychron/k5_pro/via_json/k5_pro_ansi_white_v1.00.json
index e11af48486..75db3294af 100755
--- a/keyboards/keychron/k5_pro/via_json/k5_pro_ansi_white_v1.00.json
+++ b/keyboards/keychron/k5_pro/via_json/k5_pro_ansi_white_v1.00.json
@@ -4,81 +4,21 @@
"productId": "0x0253",
"keycodes": ["qmk_lighting"],
"customKeycodes": [
- {
- "name": "Left Option",
- "title": "Left Option in macOS",
- "shortName": "LOpt"
- },
- {
- "name": "Right Option",
- "title": "Right Option in macOS",
- "shortName": "ROpt"
- },
- {
- "name": "Left Cmd",
- "title": "Left Command in macOS",
- "shortName": "LCmd"
- },
- {
- "name": "Right Cmd",
- "title": "Right Command in macOS",
- "shortName": "RCmd"
- },
- {
- "name": "Mission Control",
- "title": "Mission Control in macOS",
- "shortName": "MCtrl"
- },
- {
- "name": "Launch Pad",
- "title": "Launch Pad in macOS",
- "shortName": "LPad"
- },
- {
- "name": "Task View",
- "title": "Task View in windows",
- "shortName": "Task"
- },
- {
- "name": "File Explorer",
- "title": "File Explorer in windows",
- "shortName": "File"
- },
- {
- "name": "Screen Shot",
- "title": "Screenshot in macOS",
- "shortName": "SShot"
- },
- {
- "name": "Cortana",
- "title": "Cortana in windows",
- "shortName": "Cortana"
- },
- {
- "name": "Siri",
- "title": "Siri in macOS",
- "shortName": "Siri"
- },
- {
- "name": "Bluetooth Host 1",
- "title": "Bluetooth Host 1",
- "shortName": "BTH1"
- },
- {
- "name": "Bluetooth Host 2",
- "title": "Bluetooth Host 2",
- "shortName": "BTH2"
- },
- {
- "name": "Bluetooth Host 3",
- "title": "Bluetooth Host 3",
- "shortName": "BTH3"
- },
- {
- "name": "Battery Level",
- "title": "Show battery level",
- "shortName": "Batt"
- }
+ {"name": "Left Option", "title": "Left Option", "shortName": "LOpt"},
+ {"name": "Right Option", "title": "Right Option", "shortName": "ROpt"},
+ {"name": "Left Cmd", "title": "Left Command", "shortName": "LCmd"},
+ {"name": "Right Cmd", "title": "Right Command", "shortName": "RCmd"},
+ {"name": "Misson Control", "title": "Misson Control, availabe in macOS", "shortName": "MCtrl"},
+ {"name": "Launch pad", "title": "Launch pad, availabe in macOS", "shortName": "LPad"},
+ {"name": "Task View", "title": "Task View in Windows", "shortName": "Task"},
+ {"name": "File Explorer", "title": "File Explorer in Windows", "shortName": "File"},
+ {"name": "Screen shot", "title": "Screenshot in macOS", "shortName": "SShot"},
+ {"name": "Cortana", "title": "Cortana in Windows", "shortName": "Cortana"},
+ {"name": "Siri", "title": "Siri in macOS", "shortName": "Siri"},
+ {"name": "Bluetooth Host 1", "title": "Bluetooth Host 1", "shortName": "BTH1"},
+ {"name": "Bluetooth Host 2", "title": "Bluetooth Host 2", "shortName": "BTH2"},
+ {"name": "Bluetooth Host 3", "title": "Bluetooth Host 3", "shortName": "BTH3"},
+ {"name": "Battery Level", "title": "Show battery level", "shortName": "Batt"}
],
"matrix": {"rows": 6, "cols": 21},
"layouts": {
@@ -97,27 +37,31 @@
"0,3",
"0,4",
{
- "x": 0.5
+ "x": 0.5,
+ "c": "#aaaaaa"
},
"0,5",
"0,6",
"0,7",
"0,8",
{
- "x": 0.5
+ "x": 0.5,
+ "c": "#cccccc"
},
"0,9",
"0,10",
"0,11",
"0,12",
{
- "x": 0.25
+ "x": 0.25,
+ "c": "#aaaaaa"
},
"0,14",
"0,15",
"0,16",
{
- "x": 0.25
+ "x": 0.25,
+ "c": "#cccccc"
},
"0,17",
"0,18",
@@ -126,9 +70,13 @@
],
[
{
- "y": 0.25
+ "y": 0.25,
+ "c": "#aaaaaa"
},
"1,0",
+ {
+ "c": "#cccccc"
+ },
"1,1",
"1,2",
"1,3",
@@ -183,12 +131,12 @@
"2,11",
"2,12",
{
+ "c": "#aaaaaa",
"w": 1.5
},
"2,13",
{
- "x": 0.25,
- "c": "#aaaaaa"
+ "x": 0.25
},
"2,14",
"2,15",
@@ -308,12 +256,10 @@
},
"5,11",
{
- "c": "#cccccc",
"w": 1.25
},
"5,12",
{
- "c": "#aaaaaa",
"w": 1.25
},
"5,13",