diff options
Diffstat (limited to 'keyboards/keychron/k7_pro')
-rw-r--r-- | keyboards/keychron/k7_pro/config.h | 7 | ||||
-rwxr-xr-x[-rw-r--r--] | keyboards/keychron/k7_pro/k7_pro.c | 18 | ||||
-rwxr-xr-x[-rw-r--r--] | keyboards/keychron/k7_pro/k7_pro.h | 29 | ||||
-rw-r--r-- | keyboards/keychron/k7_pro/readme.md | 2 | ||||
-rw-r--r-- | keyboards/keychron/k7_pro/via_json/k7_pro_ansi_rgb.json | 307 | ||||
-rw-r--r-- | keyboards/keychron/k7_pro/via_json/k7_pro_ansi_white.json | 307 |
6 files changed, 325 insertions, 345 deletions
diff --git a/keyboards/keychron/k7_pro/config.h b/keyboards/keychron/k7_pro/config.h index 93e77c7951..eae06b1a2f 100644 --- a/keyboards/keychron/k7_pro/config.h +++ b/keyboards/keychron/k7_pro/config.h @@ -47,6 +47,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/k7_pro/k7_pro.c b/keyboards/keychron/k7_pro/k7_pro.c index 31259eff2c..19f4c7cc40 100644..100755 --- a/keyboards/keychron/k7_pro/k7_pro.c +++ b/keyboards/keychron/k7_pro/k7_pro.c @@ -186,7 +186,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, @@ -214,6 +215,21 @@ void bluetooth_enter_disconnected_kb(uint8_t host_idx) { } } +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(¶m); + } +} + void bluetooth_pre_task(void) { static uint8_t mode = 1; diff --git a/keyboards/keychron/k7_pro/k7_pro.h b/keyboards/keychron/k7_pro/k7_pro.h index 7fbfbf92be..d542b11bd6 100644..100755 --- a/keyboards/keychron/k7_pro/k7_pro.h +++ b/keyboards/keychron/k7_pro/k7_pro.h @@ -50,32 +50,3 @@ enum { BAT_LVL, NEW_SAFE_RANGE, }; - -#define LAYOUT_ansi_68( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0F, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1F, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2F, \ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, K3F, \ - K40, K41, K42, K46, K4A, K4B, K4C, K4D, K4E, K4F \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, ___, K0F }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, ___, K1F }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, ___, K2D, ___, K2F }, \ - { K30, ___, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, ___, K3D, K3E, K3F }, \ - { K40, K41, K42, ___, ___, ___, K46, ___, ___, ___, K4A, K4B, K4C, K4D, K4E, K4F }, \ -} - -#define LAYOUT_iso_69( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0F, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1F, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2F, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, K3F, \ - K40, K41, K42, K46, K4A, K4B, K4C, K4D, K4E, K4F \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, ___, K0F }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, ___, K1F }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, ___, K2D, ___, K2F }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, ___, K3D, K3E, K3F }, \ - { K40, K41, K42, ___, ___, ___, K46, ___, ___, ___, K4A, K4B, K4C, K4D, K4E, K4F }, \ -} - diff --git a/keyboards/keychron/k7_pro/readme.md b/keyboards/keychron/k7_pro/readme.md index 9dd303a47a..f8881345ba 100644 --- a/keyboards/keychron/k7_pro/readme.md +++ b/keyboards/keychron/k7_pro/readme.md @@ -1,6 +1,6 @@ # Keychron K7 Pro -![Keychron K7 Pro](https://cdn.shopify.com/s/files/1/0059/0630/1017/t/5/assets/keychron-k7-pro-camerashot-photo-1-1676860139452.jpg?v=1676860142) +![Keychron K7 Pro](https://drive.google.com/file/d/1BSy1l3bs-EW-TgPWDY3qpPCSWVV3nqdQ/view?usp=share_link) A customizable 68 keys TKL low profile switch keyboard. diff --git a/keyboards/keychron/k7_pro/via_json/k7_pro_ansi_rgb.json b/keyboards/keychron/k7_pro/via_json/k7_pro_ansi_rgb.json index a94b23cdec..50b05af2a7 100644 --- a/keyboards/keychron/k7_pro/via_json/k7_pro_ansi_rgb.json +++ b/keyboards/keychron/k7_pro/via_json/k7_pro_ansi_rgb.json @@ -80,163 +80,156 @@ {"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": 5, "cols": 16}, - "layouts":{ - "keymap":[ - [ - { - "c": "#777777" - }, - "0,0", - { - "c": "#cccccc" - }, - "0,1", - "0,2", - "0,3", - "0,4", - "0,5", - "0,6", - "0,7", - "0,8", - "0,9", - "0,10", - "0,11", - "0,12", - { - "w":2.00 - }, - "0,13", - { - "c": "#cccccc" - }, - "0,15" - ], - [ - { - "w":1.50, - "c": "#aaaaaa" - }, - "1,0", - { - "c": "#cccccc" - }, - "1,1", - "1,2", - "1,3", - "1,4", - "1,5", - "1,6", - "1,7", - "1,8", - "1,9", - "1,10", - "1,11", - "1,12", - { - "w":1.50 - }, - "1,13", - "1,15" - ], - [ - { - "w":1.75, - "c": "#aaaaaa" - }, - "2,0", - { - "c": "#cccccc" - }, - "2,1", - "2,2", - "2,3", - "2,4", - "2,5", - "2,6", - "2,7", - "2,8", - "2,9", - "2,10", - "2,11", - { - "w":2.25, - "c": "#777777" - }, - "2,13", - { - "c": "#cccccc" - }, - "2,15" - ], - [ - { - "w":2.25, - "c": "#aaaaaa" - }, - "3,0", - { - "c": "#cccccc" - }, - "3,2", - "3,3", - "3,4", - "3,5", - "3,6", - "3,7", - "3,8", - "3,9", - "3,10", - "3,11", - { - "w":1.75, - "c": "#aaaaaa" - }, - "3,13", - { - "c": "#777777" - }, - "3,14", - { - "c": "#cccccc" - }, - "3,15" - ], - [ - { - "w":1.25, - "c": "#aaaaaa" - }, - "4,0", - { - "w":1.25 - }, - "4,1", - { - "w":1.25 - }, - "4,2", - { - "w":6.25, - "c": "#cccccc" - }, - "4,6", - { - "c": "#aaaaaa" - }, - "4,10", - { - "c": "#cccccc" - }, - "4,11", - "4,12", - { - "c": "#777777" - }, - "4,13", - "4,14", - "4,15" - ]] + "layouts": { + "keymap": [ + [ + { + "c": "#777777" + }, + "0,0", + { + "c": "#cccccc" + }, + "0,1", + "0,2", + "0,3", + "0,4", + "0,5", + "0,6", + "0,7", + "0,8", + "0,9", + "0,10", + "0,11", + "0,12", + { + "c": "#aaaaaa", + "w": 2 + }, + "0,13", + "0,15" + ], + [ + { + "w": 1.5 + }, + "1,0", + { + "c": "#cccccc" + }, + "1,1", + "1,2", + "1,3", + "1,4", + "1,5", + "1,6", + "1,7", + "1,8", + "1,9", + "1,10", + "1,11", + "1,12", + { + "c": "#aaaaaa", + "w": 1.5 + }, + "1,13", + "1,15" + ], + [ + { + "w": 1.75 + }, + "2,0", + { + "c": "#cccccc" + }, + "2,1", + "2,2", + "2,3", + "2,4", + "2,5", + "2,6", + "2,7", + "2,8", + "2,9", + "2,10", + "2,11", + { + "c": "#777777", + "w": 2.25 + }, + "2,13", + { + "c": "#aaaaaa" + }, + "2,15" + ], + [ + { + "w": 2.25 + }, + "3,0", + { + "c": "#cccccc" + }, + "3,2", + "3,3", + "3,4", + "3,5", + "3,6", + "3,7", + "3,8", + "3,9", + "3,10", + "3,11", + { + "c": "#aaaaaa", + "w": 1.75 + }, + "3,13", + { + "c": "#777777" + }, + "3,14", + { + "c": "#aaaaaa" + }, + "3,15" + ], + [ + { + "w": 1.25 + }, + "4,0", + { + "w": 1.25 + }, + "4,1", + { + "w": 1.25 + }, + "4,2", + { + "c": "#cccccc", + "w": 6.25 + }, + "4,6", + { + "c": "#aaaaaa" + }, + "4,10", + "4,11", + "4,12", + { + "c": "#777777" + }, + "4,13", + "4,14", + "4,15" + ] + ] } } diff --git a/keyboards/keychron/k7_pro/via_json/k7_pro_ansi_white.json b/keyboards/keychron/k7_pro/via_json/k7_pro_ansi_white.json index 3769ee5876..9d33e3a728 100644 --- a/keyboards/keychron/k7_pro/via_json/k7_pro_ansi_white.json +++ b/keyboards/keychron/k7_pro/via_json/k7_pro_ansi_white.json @@ -19,163 +19,156 @@ {"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": 5, "cols": 16}, - "layouts":{ - "keymap":[ - [ - { - "c": "#777777" - }, - "0,0", - { - "c": "#cccccc" - }, - "0,1", - "0,2", - "0,3", - "0,4", - "0,5", - "0,6", - "0,7", - "0,8", - "0,9", - "0,10", - "0,11", - "0,12", - { - "w":2.00 - }, - "0,13", - { - "c": "#cccccc" - }, - "0,15" - ], - [ - { - "w":1.50, - "c": "#aaaaaa" - }, - "1,0", - { - "c": "#cccccc" - }, - "1,1", - "1,2", - "1,3", - "1,4", - "1,5", - "1,6", - "1,7", - "1,8", - "1,9", - "1,10", - "1,11", - "1,12", - { - "w":1.50 - }, - "1,13", - "1,15" - ], - [ - { - "w":1.75, - "c": "#aaaaaa" - }, - "2,0", - { - "c": "#cccccc" - }, - "2,1", - "2,2", - "2,3", - "2,4", - "2,5", - "2,6", - "2,7", - "2,8", - "2,9", - "2,10", - "2,11", - { - "w":2.25, - "c": "#777777" - }, - "2,13", - { - "c": "#cccccc" - }, - "2,15" - ], - [ - { - "w":2.25, - "c": "#aaaaaa" - }, - "3,0", - { - "c": "#cccccc" - }, - "3,2", - "3,3", - "3,4", - "3,5", - "3,6", - "3,7", - "3,8", - "3,9", - "3,10", - "3,11", - { - "w":1.75, - "c": "#aaaaaa" - }, - "3,13", - { - "c": "#777777" - }, - "3,14", - { - "c": "#cccccc" - }, - "3,15" - ], - [ - { - "w":1.25, - "c": "#aaaaaa" - }, - "4,0", - { - "w":1.25 - }, - "4,1", - { - "w":1.25 - }, - "4,2", - { - "w":6.25, - "c": "#cccccc" - }, - "4,6", - { - "c": "#aaaaaa" - }, - "4,10", - { - "c": "#cccccc" - }, - "4,11", - "4,12", - { - "c": "#777777" - }, - "4,13", - "4,14", - "4,15" - ]] + "layouts": { + "keymap": [ + [ + { + "c": "#777777" + }, + "0,0", + { + "c": "#cccccc" + }, + "0,1", + "0,2", + "0,3", + "0,4", + "0,5", + "0,6", + "0,7", + "0,8", + "0,9", + "0,10", + "0,11", + "0,12", + { + "c": "#aaaaaa", + "w": 2 + }, + "0,13", + "0,15" + ], + [ + { + "w": 1.5 + }, + "1,0", + { + "c": "#cccccc" + }, + "1,1", + "1,2", + "1,3", + "1,4", + "1,5", + "1,6", + "1,7", + "1,8", + "1,9", + "1,10", + "1,11", + "1,12", + { + "c": "#aaaaaa", + "w": 1.5 + }, + "1,13", + "1,15" + ], + [ + { + "w": 1.75 + }, + "2,0", + { + "c": "#cccccc" + }, + "2,1", + "2,2", + "2,3", + "2,4", + "2,5", + "2,6", + "2,7", + "2,8", + "2,9", + "2,10", + "2,11", + { + "c": "#777777", + "w": 2.25 + }, + "2,13", + { + "c": "#aaaaaa" + }, + "2,15" + ], + [ + { + "w": 2.25 + }, + "3,0", + { + "c": "#cccccc" + }, + "3,2", + "3,3", + "3,4", + "3,5", + "3,6", + "3,7", + "3,8", + "3,9", + "3,10", + "3,11", + { + "c": "#aaaaaa", + "w": 1.75 + }, + "3,13", + { + "c": "#777777" + }, + "3,14", + { + "c": "#aaaaaa" + }, + "3,15" + ], + [ + { + "w": 1.25 + }, + "4,0", + { + "w": 1.25 + }, + "4,1", + { + "w": 1.25 + }, + "4,2", + { + "c": "#cccccc", + "w": 6.25 + }, + "4,6", + { + "c": "#aaaaaa" + }, + "4,10", + "4,11", + "4,12", + { + "c": "#777777" + }, + "4,13", + "4,14", + "4,15" + ] + ] } } |