Skip to content

Commit

Permalink
Add support for K1 Pro ISO RGB, bluetooth delete, USB cable only. (#838)
Browse files Browse the repository at this point in the history
  • Loading branch information
richud authored Jan 25, 2025
1 parent 21f5bc9 commit 121f85c
Show file tree
Hide file tree
Showing 16 changed files with 1,142 additions and 0 deletions.
9 changes: 9 additions & 0 deletions keyboards/keychron/k1_pro/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#pragma once

/* 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

233 changes: 233 additions & 0 deletions keyboards/keychron/k1_pro/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,233 @@
{
"manufacturer": "Keychron",
"keyboard_name": "K1 Pro",
"maintainer": "richud",
"bootloader": "stm32-dfu",
"diode_direction": "ROW2COL",
"dip_switch": {
"pins": ["A8"]
},
"eeprom": {
"wear_leveling": {
"backing_size": 4096
}
},
"build": {
"lto": true
},
"features": {
"bootmagic": true,
"dip_switch": true,
"extrakey": true,
"mousekey": true,
"nkro": true,
"raw": true
},
"indicators": {
"_comment": "K1 Pro Rev 6: A0 is BT LED, H3 is CAPS LED",
"caps_lock": "H3"
},
"led_matrix": {
"sleep": true
},
"matrix_pins": {
"cols": ["C15", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null],
"custom": true,
"custom_lite": true,
"rows": ["B5", "B4", "B3", "A15", "A14", "A13"]
},
"matrix_size": {
"cols": 17,
"rows": 6
},
"processor": "STM32L432",
"url": "https://github.com/Keychron",
"usb": {
"vid": "0x3434"
},
"layouts": {
"LAYOUT_tkl_ansi": {
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0},
{"matrix": [0, 1], "x": 2, "y": 0},
{"matrix": [0, 2], "x": 3, "y": 0},
{"matrix": [0, 3], "x": 4, "y": 0},
{"matrix": [0, 4], "x": 5, "y": 0},
{"matrix": [0, 5], "x": 6.5, "y": 0},
{"matrix": [0, 6], "x": 7.5, "y": 0},
{"matrix": [0, 7], "x": 8.5, "y": 0},
{"matrix": [0, 8], "x": 9.5, "y": 0},
{"matrix": [0, 9], "x": 11, "y": 0},
{"matrix": [0, 10], "x": 12, "y": 0},
{"matrix": [0, 11], "x": 13, "y": 0},
{"matrix": [0, 12], "x": 14, "y": 0},
{"matrix": [0, 14], "x": 15.25, "y": 0},
{"matrix": [0, 15], "x": 16.25, "y": 0},
{"matrix": [0, 16], "x": 17.25, "y": 0},
{"matrix": [1, 0], "x": 0, "y": 1.25},
{"matrix": [1, 1], "x": 1, "y": 1.25},
{"matrix": [1, 2], "x": 2, "y": 1.25},
{"matrix": [1, 3], "x": 3, "y": 1.25},
{"matrix": [1, 4], "x": 4, "y": 1.25},
{"matrix": [1, 5], "x": 5, "y": 1.25},
{"matrix": [1, 6], "x": 6, "y": 1.25},
{"matrix": [1, 7], "x": 7, "y": 1.25},
{"matrix": [1, 8], "x": 8, "y": 1.25},
{"matrix": [1, 9], "x": 9, "y": 1.25},
{"matrix": [1, 10], "x": 10, "y": 1.25},
{"matrix": [1, 11], "x": 11, "y": 1.25},
{"matrix": [1, 12], "x": 12, "y": 1.25},
{"matrix": [1, 13], "x": 13, "y": 1.25, "w": 2},
{"matrix": [1, 14], "x": 15.25, "y": 1.25},
{"matrix": [1, 15], "x": 16.25, "y": 1.25},
{"matrix": [1, 16], "x": 17.25, "y": 1.25},
{"matrix": [2, 0], "x": 0, "y": 2.25, "w": 1.5},
{"matrix": [2, 1], "x": 1.5, "y": 2.25},
{"matrix": [2, 2], "x": 2.5, "y": 2.25},
{"matrix": [2, 3], "x": 3.5, "y": 2.25},
{"matrix": [2, 4], "x": 4.5, "y": 2.25},
{"matrix": [2, 5], "x": 5.5, "y": 2.25},
{"matrix": [2, 6], "x": 6.5, "y": 2.25},
{"matrix": [2, 7], "x": 7.5, "y": 2.25},
{"matrix": [2, 8], "x": 8.5, "y": 2.25},
{"matrix": [2, 9], "x": 9.5, "y": 2.25},
{"matrix": [2, 10], "x": 10.5, "y": 2.25},
{"matrix": [2, 11], "x": 11.5, "y": 2.25},
{"matrix": [2, 12], "x": 12.5, "y": 2.25},
{"matrix": [2, 13], "x": 13.5, "y": 2.25, "w": 1.5},
{"matrix": [2, 14], "x": 15.25, "y": 2.25},
{"matrix": [2, 15], "x": 16.25, "y": 2.25},
{"matrix": [2, 16], "x": 17.25, "y": 2.25},
{"matrix": [3, 0], "x": 0, "y": 3.25, "w": 1.75},
{"matrix": [3, 1], "x": 1.75, "y": 3.25},
{"matrix": [3, 2], "x": 2.75, "y": 3.25},
{"matrix": [3, 3], "x": 3.75, "y": 3.25},
{"matrix": [3, 4], "x": 4.75, "y": 3.25},
{"matrix": [3, 5], "x": 5.75, "y": 3.25},
{"matrix": [3, 6], "x": 6.75, "y": 3.25},
{"matrix": [3, 7], "x": 7.75, "y": 3.25},
{"matrix": [3, 8], "x": 8.75, "y": 3.25},
{"matrix": [3, 9], "x": 9.75, "y": 3.25},
{"matrix": [3, 10], "x": 10.75, "y": 3.25},
{"matrix": [3, 11], "x": 11.75, "y": 3.25},
{"matrix": [3, 13], "x": 12.75, "y": 3.25, "w": 2.25},
{"matrix": [4, 0], "x": 0, "y": 4.25, "w": 2.25},
{"matrix": [4, 2], "x": 2.25, "y": 4.25},
{"matrix": [4, 3], "x": 3.25, "y": 4.25},
{"matrix": [4, 4], "x": 4.25, "y": 4.25},
{"matrix": [4, 5], "x": 5.25, "y": 4.25},
{"matrix": [4, 6], "x": 6.25, "y": 4.25},
{"matrix": [4, 7], "x": 7.25, "y": 4.25},
{"matrix": [4, 8], "x": 8.25, "y": 4.25},
{"matrix": [4, 9], "x": 9.25, "y": 4.25},
{"matrix": [4, 10], "x": 10.25, "y": 4.25},
{"matrix": [4, 11], "x": 11.25, "y": 4.25},
{"matrix": [4, 13], "x": 12.25, "y": 4.25, "w": 2.75},
{"matrix": [4, 15], "x": 16.25, "y": 4.25},
{"matrix": [5, 0], "x": 0, "y": 5.25, "w": 1.25},
{"matrix": [5, 1], "x": 1.25, "y": 5.25, "w": 1.25},
{"matrix": [5, 2], "x": 2.5, "y": 5.25, "w": 1.25},
{"matrix": [5, 6], "x": 3.75, "y": 5.25, "w": 6.25},
{"matrix": [5, 10], "x": 10, "y": 5.25, "w": 1.25},
{"matrix": [5, 11], "x": 11.25, "y": 5.25, "w": 1.25},
{"matrix": [5, 12], "x": 12.5, "y": 5.25, "w": 1.25},
{"matrix": [5, 13], "x": 13.75, "y": 5.25, "w": 1.25},
{"matrix": [5, 14], "x": 15.25, "y": 5.25},
{"matrix": [5, 15], "x": 16.25, "y": 5.25},
{"matrix": [5, 16], "x": 17.25, "y": 5.25}
]
},
"LAYOUT_tkl_iso": {
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0},
{"matrix": [0, 1], "x": 2, "y": 0},
{"matrix": [0, 2], "x": 3, "y": 0},
{"matrix": [0, 3], "x": 4, "y": 0},
{"matrix": [0, 4], "x": 5, "y": 0},
{"matrix": [0, 5], "x": 6.5, "y": 0},
{"matrix": [0, 6], "x": 7.5, "y": 0},
{"matrix": [0, 7], "x": 8.5, "y": 0},
{"matrix": [0, 8], "x": 9.5, "y": 0},
{"matrix": [0, 9], "x": 11, "y": 0},
{"matrix": [0, 10], "x": 12, "y": 0},
{"matrix": [0, 11], "x": 13, "y": 0},
{"matrix": [0, 12], "x": 14, "y": 0},
{"matrix": [0, 14], "x": 15.25, "y": 0},
{"matrix": [0, 15], "x": 16.25, "y": 0},
{"matrix": [0, 16], "x": 17.25, "y": 0},
{"matrix": [1, 0], "x": 0, "y": 1.25},
{"matrix": [1, 1], "x": 1, "y": 1.25},
{"matrix": [1, 2], "x": 2, "y": 1.25},
{"matrix": [1, 3], "x": 3, "y": 1.25},
{"matrix": [1, 4], "x": 4, "y": 1.25},
{"matrix": [1, 5], "x": 5, "y": 1.25},
{"matrix": [1, 6], "x": 6, "y": 1.25},
{"matrix": [1, 7], "x": 7, "y": 1.25},
{"matrix": [1, 8], "x": 8, "y": 1.25},
{"matrix": [1, 9], "x": 9, "y": 1.25},
{"matrix": [1, 10], "x": 10, "y": 1.25},
{"matrix": [1, 11], "x": 11, "y": 1.25},
{"matrix": [1, 12], "x": 12, "y": 1.25},
{"matrix": [1, 13], "x": 13, "y": 1.25, "w": 2},
{"matrix": [1, 14], "x": 15.25, "y": 1.25},
{"matrix": [1, 15], "x": 16.25, "y": 1.25},
{"matrix": [1, 16], "x": 17.25, "y": 1.25},
{"matrix": [2, 0], "x": 0, "y": 2.25, "w": 1.5},
{"matrix": [2, 1], "x": 1.5, "y": 2.25},
{"matrix": [2, 2], "x": 2.5, "y": 2.25},
{"matrix": [2, 3], "x": 3.5, "y": 2.25},
{"matrix": [2, 4], "x": 4.5, "y": 2.25},
{"matrix": [2, 5], "x": 5.5, "y": 2.25},
{"matrix": [2, 6], "x": 6.5, "y": 2.25},
{"matrix": [2, 7], "x": 7.5, "y": 2.25},
{"matrix": [2, 8], "x": 8.5, "y": 2.25},
{"matrix": [2, 9], "x": 9.5, "y": 2.25},
{"matrix": [2, 10], "x": 10.5, "y": 2.25},
{"matrix": [2, 11], "x": 11.5, "y": 2.25},
{"matrix": [2, 12], "x": 12.5, "y": 2.25},
{"matrix": [2, 14], "x": 15.25, "y": 2.25},
{"matrix": [2, 15], "x": 16.25, "y": 2.25},
{"matrix": [2, 16], "x": 17.25, "y": 2.25},
{"matrix": [3, 0], "x": 0, "y": 3.25, "w": 1.75},
{"matrix": [3, 1], "x": 1.75, "y": 3.25},
{"matrix": [3, 2], "x": 2.75, "y": 3.25},
{"matrix": [3, 3], "x": 3.75, "y": 3.25},
{"matrix": [3, 4], "x": 4.75, "y": 3.25},
{"matrix": [3, 5], "x": 5.75, "y": 3.25},
{"matrix": [3, 6], "x": 6.75, "y": 3.25},
{"matrix": [3, 7], "x": 7.75, "y": 3.25},
{"matrix": [3, 8], "x": 8.75, "y": 3.25},
{"matrix": [3, 9], "x": 9.75, "y": 3.25},
{"matrix": [3, 10], "x": 10.75, "y": 3.25},
{"matrix": [3, 11], "x": 11.75, "y": 3.25},
{"matrix": [3, 13], "x": 12.75, "y": 3.25},
{"matrix": [2, 13], "x": 13.75, "y": 2.25, "w": 1.25, "h": 2},
{"matrix": [4, 0], "x": 0, "y": 4.25, "w": 1.25},
{"matrix": [4, 1], "x": 1.25, "y": 4.25},
{"matrix": [4, 2], "x": 2.25, "y": 4.25},
{"matrix": [4, 3], "x": 3.25, "y": 4.25},
{"matrix": [4, 4], "x": 4.25, "y": 4.25},
{"matrix": [4, 5], "x": 5.25, "y": 4.25},
{"matrix": [4, 6], "x": 6.25, "y": 4.25},
{"matrix": [4, 7], "x": 7.25, "y": 4.25},
{"matrix": [4, 8], "x": 8.25, "y": 4.25},
{"matrix": [4, 9], "x": 9.25, "y": 4.25},
{"matrix": [4, 10], "x": 10.25, "y": 4.25},
{"matrix": [4, 11], "x": 11.25, "y": 4.25},
{"matrix": [4, 13], "x": 12.25, "y": 4.25, "w": 2.75},
{"matrix": [4, 15], "x": 16.25, "y": 4.25},
{"matrix": [5, 0], "x": 0, "y": 5.25, "w": 1.25},
{"matrix": [5, 1], "x": 1.25, "y": 5.25, "w": 1.25},
{"matrix": [5, 2], "x": 2.5, "y": 5.25, "w": 1.25},
{"matrix": [5, 6], "x": 3.75, "y": 5.25, "w": 6.25},
{"matrix": [5, 10], "x": 10, "y": 5.25, "w": 1.25},
{"matrix": [5, 11], "x": 11.25, "y": 5.25, "w": 1.25},
{"matrix": [5, 12], "x": 12.5, "y": 5.25, "w": 1.25},
{"matrix": [5, 13], "x": 13.75, "y": 5.25, "w": 1.25},
{"matrix": [5, 14], "x": 15.25, "y": 5.25},
{"matrix": [5, 15], "x": 16.25, "y": 5.25},
{"matrix": [5, 16], "x": 17.25, "y": 5.25}
]
}
}
}
13 changes: 13 additions & 0 deletions keyboards/keychron/k1_pro/iso/rgb/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#pragma once

/* Sonix RGB Matrix Driver Configuration */
#define SNLED27351_I2C_ADDRESS_1 SNLED27351_I2C_ADDRESS_VDDIO
#define SNLED27351_I2C_ADDRESS_2 SNLED27351_I2C_ADDRESS_GND

/* Use first 9 channels of LED driver */
#define SNLED27351_PHASE_CHANNEL SNLED27351_SCAN_PHASE_9_CHANNEL

/* Set LED driver current */
#define SNLED27351_CURRENT_TUNE \
{ 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14 }

131 changes: 131 additions & 0 deletions keyboards/keychron/k1_pro/iso/rgb/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
{
"usb": {
"pid": "0x0211",
"device_version": "1.0.2"
},
"features": {
"rgb_matrix": true,
},
"rgb_matrix": {
"driver": "snled27351",
"sleep": true,
"animations": {
"breathing": true,
"band_spiral_val": true,
"cycle_all": true,
"cycle_left_right": true,
"cycle_up_down": true,
"rainbow_moving_chevron": true,
"cycle_out_in": true,
"cycle_out_in_dual": true,
"cycle_pinwheel": true,
"cycle_spiral": true,
"dual_beacon": true,
"rainbow_beacon": true,
"jellybean_raindrops": true,
"pixel_rain": true,
"typing_heatmap": true,
"digital_rain": true,
"solid_reactive_simple": true,
"solid_reactive_multiwide": true,
"solid_reactive_multinexus": true,
"splash": true,
"solid_splash": true
},
"layout": [
{"matrix":[0, 0], "flags":1, "x":0, "y":0},
{"matrix":[0, 1], "flags":1, "x":26, "y":0},
{"matrix":[0, 2], "flags":1, "x":39, "y":0},
{"matrix":[0, 3], "flags":1, "x":52, "y":0},
{"matrix":[0, 4], "flags":1, "x":65, "y":0},
{"matrix":[0, 5], "flags":1, "x":85, "y":0},
{"matrix":[0, 6], "flags":1, "x":98, "y":0},
{"matrix":[0, 7], "flags":1, "x":111, "y":0},
{"matrix":[0, 8], "flags":1, "x":124, "y":0},
{"matrix":[0, 9], "flags":1, "x":144, "y":0},
{"matrix":[0, 10], "flags":1, "x":157, "y":0},
{"matrix":[0, 11], "flags":1, "x":170, "y":0},
{"matrix":[0, 12], "flags":1, "x":183, "y":0},
{"matrix":[0, 14], "flags":1, "x":197, "y":0},
{"matrix":[0, 15], "flags":1, "x":210, "y":0},
{"matrix":[0, 16], "flags":1, "x":224, "y":0},

{"matrix":[1, 0], "flags":1, "x":0, "y":13},
{"matrix":[1, 1], "flags":8, "x":13, "y":13},
{"matrix":[1, 2], "flags":8, "x":26, "y":13},
{"matrix":[1, 3], "flags":8, "x":39, "y":13},
{"matrix":[1, 4], "flags":4, "x":52, "y":13},
{"matrix":[1, 5], "flags":4, "x":65, "y":13},
{"matrix":[1, 6], "flags":4, "x":78, "y":13},
{"matrix":[1, 7], "flags":4, "x":91, "y":13},
{"matrix":[1, 8], "flags":4, "x":104, "y":13},
{"matrix":[1, 9], "flags":4, "x":117, "y":13},
{"matrix":[1, 10], "flags":4, "x":130, "y":13},
{"matrix":[1, 11], "flags":4, "x":144, "y":13},
{"matrix":[1, 12], "flags":4, "x":157, "y":13},
{"matrix":[1, 13], "flags":1, "x":176, "y":13},
{"matrix":[1, 14], "flags":1, "x":197, "y":13},
{"matrix":[1, 15], "flags":1, "x":210, "y":13},
{"matrix":[1, 16], "flags":1, "x":224, "y":13},

{"matrix":[2, 0], "flags":1, "x":3, "y":26},
{"matrix":[2, 1], "flags":4, "x":19, "y":26},
{"matrix":[2, 2], "flags":4, "x":32, "y":26},
{"matrix":[2, 3], "flags":4, "x":45, "y":26},
{"matrix":[2, 4], "flags":4, "x":58, "y":26},
{"matrix":[2, 5], "flags":4, "x":72, "y":26},
{"matrix":[2, 6], "flags":4, "x":85, "y":26},
{"matrix":[2, 7], "flags":4, "x":98, "y":26},
{"matrix":[2, 8], "flags":4, "x":111, "y":26},
{"matrix":[2, 9], "flags":4, "x":124, "y":26},
{"matrix":[2, 10], "flags":4, "x":137, "y":26},
{"matrix":[2, 11], "flags":4, "x":150, "y":26},
{"matrix":[2, 12], "flags":1, "x":163, "y":26},
{"matrix":[2, 14], "flags":1, "x":197, "y":26},
{"matrix":[2, 15], "flags":1, "x":210, "y":26},
{"matrix":[2, 16], "flags":1, "x":224, "y":26},

{"matrix":[3, 0], "flags":8, "x":4, "y":38},
{"matrix":[3, 1], "flags":4, "x":22, "y":38},
{"matrix":[3, 2], "flags":4, "x":36, "y":38},
{"matrix":[3, 3], "flags":4, "x":49, "y":38},
{"matrix":[3, 4], "flags":4, "x":62, "y":38},
{"matrix":[3, 5], "flags":4, "x":75, "y":38},
{"matrix":[3, 6], "flags":4, "x":88, "y":38},
{"matrix":[3, 7], "flags":4, "x":101, "y":38},
{"matrix":[3, 8], "flags":4, "x":114, "y":38},
{"matrix":[3, 9], "flags":4, "x":127, "y":38},
{"matrix":[3, 10], "flags":4, "x":140, "y":38},
{"matrix":[3, 11], "flags":4, "x":153, "y":38},
{"matrix":[3, 13], "flags":1, "x":167, "y":38},
{"matrix":[2, 13], "flags":1, "x":182, "y":33},

{"matrix":[4, 0], "flags":1, "x":8, "y":51},
{"matrix":[4, 1], "flags":1, "x":16, "y":51},
{"matrix":[4, 2], "flags":4, "x":29, "y":51},
{"matrix":[4, 3], "flags":4, "x":42, "y":51},
{"matrix":[4, 4], "flags":4, "x":55, "y":51},
{"matrix":[4, 5], "flags":4, "x":68, "y":51},
{"matrix":[4, 6], "flags":4, "x":81, "y":51},
{"matrix":[4, 7], "flags":4, "x":94, "y":51},
{"matrix":[4, 8], "flags":4, "x":108, "y":51},
{"matrix":[4, 9], "flags":4, "x":121, "y":51},
{"matrix":[4, 10], "flags":4, "x":134, "y":51},
{"matrix":[4, 11], "flags":4, "x":147, "y":51},
{"matrix":[4, 13], "flags":1, "x":171, "y":51},
{"matrix":[4, 15], "flags":1, "x":210, "y":51},

{"matrix":[5, 0], "flags":1, "x":1, "y":64},
{"matrix":[5, 1], "flags":1, "x":18, "y":64},
{"matrix":[5, 2], "flags":1, "x":34, "y":64},
{"matrix":[5, 6], "flags":4, "x":83, "y":64},
{"matrix":[5, 10], "flags":1, "x":132, "y":64},
{"matrix":[5, 11], "flags":1, "x":148, "y":64},
{"matrix":[5, 12], "flags":1, "x":165, "y":64},
{"matrix":[5, 13], "flags":1, "x":181, "y":64},
{"matrix":[5, 14], "flags":1, "x":197, "y":64},
{"matrix":[5, 15], "flags":1, "x":210, "y":64},
{"matrix":[5, 16], "flags":1, "x":224, "y":64}
]
}
}
Loading

0 comments on commit 121f85c

Please sign in to comment.