mirror of
https://github.com/qmk/qmk_firmware.git
synced 2024-11-21 19:09:25 +00:00
Merge 9c9e3a9d27
into 36b5559b99
This commit is contained in:
commit
8409c0c7ac
374
keyboards/skyloong/gk75/q2/ansi/keyboard.json
Normal file
374
keyboards/skyloong/gk75/q2/ansi/keyboard.json
Normal file
@ -0,0 +1,374 @@
|
||||
{
|
||||
"keyboard_name": "GK75 Q2_ANSI_1.0.0",
|
||||
|
||||
"rgb_matrix": {
|
||||
"layout": [
|
||||
{"matrix": [0, 0], "x": 0, "y": 0, "flags": 4},
|
||||
{"matrix": [0, 1], "x": 29, "y": 0, "flags": 4},
|
||||
{"matrix": [0, 2], "x": 44, "y": 0, "flags": 4},
|
||||
{"matrix": [0, 3], "x": 59, "y": 0, "flags": 4},
|
||||
{"matrix": [0, 4], "x": 74, "y": 0, "flags": 4},
|
||||
{"matrix": [0, 5], "x": 96, "y": 0, "flags": 4},
|
||||
{"matrix": [0, 6], "x": 110, "y": 0, "flags": 4},
|
||||
{"matrix": [0, 7], "x": 125, "y": 0, "flags": 4},
|
||||
{"matrix": [0, 8], "x": 140, "y": 0, "flags": 4},
|
||||
{"matrix": [0, 9], "x": 162, "y": 0, "flags": 4},
|
||||
{"matrix": [0, 10], "x": 176, "y": 0, "flags": 4},
|
||||
{"matrix": [5, 3], "x": 176, "y": 0, "flags": 4},
|
||||
{"matrix": [5, 4], "x": 191, "y": 0, "flags": 4},
|
||||
|
||||
{"matrix": [1, 0], "x": 0, "y": 13, "flags": 4},
|
||||
{"matrix": [1, 1], "x": 15, "y": 13, "flags": 4},
|
||||
{"matrix": [1, 2], "x": 29, "y": 13, "flags": 4},
|
||||
{"matrix": [1, 3], "x": 44, "y": 13, "flags": 4},
|
||||
{"matrix": [1, 4], "x": 59, "y": 13, "flags": 4},
|
||||
{"matrix": [1, 5], "x": 74, "y": 13, "flags": 4},
|
||||
{"matrix": [1, 6], "x": 88, "y": 13, "flags": 4},
|
||||
{"matrix": [1, 7], "x": 103, "y": 13, "flags": 8},
|
||||
{"matrix": [1, 8], "x": 118, "y": 13, "flags": 4},
|
||||
{"matrix": [1, 9], "x": 132, "y": 13, "flags": 4},
|
||||
{"matrix": [1, 10], "x": 147, "y": 13, "flags": 4},
|
||||
{"matrix": [6, 3], "x": 162, "y": 13, "flags": 4},
|
||||
{"matrix": [6, 4], "x": 176, "y": 13, "flags": 4},
|
||||
{"matrix": [1, 11], "x": 191, "y": 13, "flags": 4},
|
||||
{"matrix": [1, 12], "x": 224, "y": 13, "flags": 4},
|
||||
|
||||
{"matrix": [2, 0], "x": 0, "y": 26, "flags": 4},
|
||||
{"matrix": [2, 1], "x": 22, "y": 26, "flags": 4},
|
||||
{"matrix": [2, 2], "x": 37, "y": 26, "flags": 4},
|
||||
{"matrix": [2, 3], "x": 51, "y": 26, "flags": 4},
|
||||
{"matrix": [2, 4], "x": 66, "y": 26, "flags": 4},
|
||||
{"matrix": [2, 5], "x": 81, "y": 26, "flags": 4},
|
||||
{"matrix": [2, 6], "x": 96, "y": 26, "flags": 4},
|
||||
{"matrix": [2, 7], "x": 110, "y": 26, "flags": 4},
|
||||
{"matrix": [2, 8], "x": 125, "y": 26, "flags": 4},
|
||||
{"matrix": [2, 9], "x": 140, "y": 26, "flags": 4},
|
||||
{"matrix": [2, 10], "x": 154, "y": 26, "flags": 4},
|
||||
{"matrix": [6, 5], "x": 169, "y": 26, "flags": 4},
|
||||
{"matrix": [6, 6], "x": 184, "y": 26, "flags": 4},
|
||||
{"matrix": [2, 11], "x": 198, "y": 26, "flags": 4},
|
||||
{"matrix": [2, 12], "x": 224, "y": 26, "flags": 4},
|
||||
|
||||
{"matrix": [3, 0], "x": 0, "y": 38, "flags": 4},
|
||||
{"matrix": [3, 1], "x": 26, "y": 38, "flags": 4},
|
||||
{"matrix": [3, 2], "x": 40, "y": 38, "flags": 4},
|
||||
{"matrix": [3, 3], "x": 55, "y": 38, "flags": 4},
|
||||
{"matrix": [3, 4], "x": 70, "y": 38, "flags": 4},
|
||||
{"matrix": [3, 5], "x": 86, "y": 38, "flags": 4},
|
||||
{"matrix": [3, 6], "x": 99, "y": 38, "flags": 4},
|
||||
{"matrix": [3, 7], "x": 114, "y": 38, "flags": 4},
|
||||
{"matrix": [3, 8], "x": 129, "y": 38, "flags": 4},
|
||||
{"matrix": [3, 9], "x": 143, "y": 38, "flags": 4},
|
||||
{"matrix": [3, 10], "x": 158, "y": 38, "flags": 4},
|
||||
{"matrix": [6, 7], "x": 173, "y": 38, "flags": 4},
|
||||
{"matrix": [3, 11], "x": 209, "y": 26, "flags": 4},
|
||||
{"matrix": [3, 12], "x": 224, "y": 38, "flags": 4},
|
||||
|
||||
{"matrix": [4, 0], "x": 0, "y": 51, "flags": 4},
|
||||
{"matrix": [4, 1], "x": 33, "y": 51, "flags": 4},
|
||||
{"matrix": [4, 2], "x": 48, "y": 51, "flags": 4},
|
||||
{"matrix": [4, 3], "x": 62, "y": 51, "flags": 4},
|
||||
{"matrix": [4, 4], "x": 77, "y": 51, "flags": 4},
|
||||
{"matrix": [4, 5], "x": 92, "y": 51, "flags": 4},
|
||||
{"matrix": [4, 6], "x": 106, "y": 51, "flags": 4},
|
||||
{"matrix": [4, 7], "x": 121, "y": 51, "flags": 4},
|
||||
{"matrix": [4, 8], "x": 136, "y": 51, "flags": 4},
|
||||
{"matrix": [4, 9], "x": 151, "y": 51, "flags": 4},
|
||||
{"matrix": [4, 10], "x": 165, "y": 51, "flags": 4},
|
||||
{"matrix": [6, 8], "x": 180, "y": 51, "flags": 4},
|
||||
{"matrix": [4, 11], "x": 209, "y": 51, "flags": 4},
|
||||
|
||||
{"matrix": [5, 0], "x": 0, "y": 64, "flags": 4},
|
||||
{"matrix": [5, 1], "x": 18, "y": 64, "flags": 4},
|
||||
{"matrix": [6, 1], "x": 37, "y": 64, "flags": 4},
|
||||
{"matrix": [6, 0], "x": 55, "y": 64, "flags": 4},
|
||||
{"matrix": [5, 5], "x": 92, "y": 64, "flags": 4},
|
||||
{"matrix": [5, 6], "x": 103, "y": 64, "flags": 4},
|
||||
{"matrix": [5, 9], "x": 129, "y": 64, "flags": 4},
|
||||
{"matrix": [5, 7], "x": 147, "y": 64, "flags": 4},
|
||||
{"matrix": [5, 10], "x": 162, "y": 64, "flags": 4},
|
||||
{"matrix": [6, 9], "x": 195, "y": 64, "flags": 4},
|
||||
{"matrix": [5, 11], "x": 209, "y": 64, "flags": 4},
|
||||
{"matrix": [6, 11], "x": 224, "y": 64, "flags": 4}
|
||||
]
|
||||
},
|
||||
"usb": {
|
||||
"device_version": "1.0.0",
|
||||
"pid": "0x6077"
|
||||
},
|
||||
"layouts": {
|
||||
"LAYOUT_all": {
|
||||
"layout": [
|
||||
{"label": "ESC", "matrix": [0, 0], "x": 0, "y": 0},
|
||||
{"label": "F1", "matrix": [0, 1], "x": 2, "y": 0},
|
||||
{"label": "F2", "matrix": [0, 2], "x": 3, "y": 0},
|
||||
{"label": "F3", "matrix": [0, 3], "x": 4, "y": 0},
|
||||
{"label": "F4", "matrix": [0, 4], "x": 5, "y": 0},
|
||||
{"label": "F5", "matrix": [0, 5], "x": 6.5, "y": 0},
|
||||
{"label": "F6", "matrix": [0, 6], "x": 7.5, "y": 0},
|
||||
{"label": "F7", "matrix": [0, 7], "x": 8.5, "y": 0},
|
||||
{"label": "F8", "matrix": [0, 8], "x": 9.5, "y": 0},
|
||||
{"label": "F9", "matrix": [0, 9], "x": 11, "y": 0},
|
||||
{"label": "F10", "matrix": [0, 10], "x": 12, "y": 0},
|
||||
{"label": "F11", "matrix": [5, 3], "x": 13, "y": 0},
|
||||
{"label": "F12", "matrix": [5, 4], "x": 14, "y": 0},
|
||||
{"label": "Mute", "matrix": [0, 12], "x": 15.25, "y": 0},
|
||||
|
||||
{"label": "~", "matrix": [1, 0], "x": 0, "y": 1},
|
||||
{"label": "1", "matrix": [1, 1], "x": 1, "y": 1},
|
||||
{"label": "2", "matrix": [1, 2], "x": 2, "y": 1},
|
||||
{"label": "3", "matrix": [1, 3], "x": 3, "y": 1},
|
||||
{"label": "4", "matrix": [1, 4], "x": 4, "y": 1},
|
||||
{"label": "5", "matrix": [1, 5], "x": 5, "y": 1},
|
||||
{"label": "6", "matrix": [1, 6], "x": 6, "y": 1},
|
||||
{"label": "7", "matrix": [1, 7], "x": 7, "y": 1},
|
||||
{"label": "8", "matrix": [1, 8], "x": 8, "y": 1},
|
||||
{"label": "9", "matrix": [1, 9], "x": 9, "y": 1},
|
||||
{"label": "0", "matrix": [1, 10], "x": 10, "y": 1},
|
||||
{"label": "-_", "matrix": [6, 3], "x": 11, "y": 1},
|
||||
{"label": "=+", "matrix": [6, 4], "x": 12, "y": 1},
|
||||
{"label": "BS", "matrix": [1, 11], "x": 13, "y": 1, "w": 2},
|
||||
{"label": "Home", "matrix": [1, 12], "x": 15.25, "y": 1},
|
||||
|
||||
{"label": "Tab", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.5},
|
||||
{"label": "Q", "matrix": [2, 1], "x": 1.5, "y": 2},
|
||||
{"label": "W", "matrix": [2, 2], "x": 2.5, "y": 2},
|
||||
{"label": "E", "matrix": [2, 3], "x": 3.5, "y": 2},
|
||||
{"label": "R", "matrix": [2, 4], "x": 4.5, "y": 2},
|
||||
{"label": "T", "matrix": [2, 5], "x": 5.5, "y": 2},
|
||||
{"label": "Y", "matrix": [2, 6], "x": 6.5, "y": 2},
|
||||
{"label": "U", "matrix": [2, 7], "x": 7.5, "y": 2},
|
||||
{"label": "I", "matrix": [2, 8], "x": 8.5, "y": 2},
|
||||
{"label": "O", "matrix": [2, 9], "x": 9.5, "y": 2},
|
||||
{"label": "P", "matrix": [2, 10], "x": 10.5, "y": 2},
|
||||
{"label": "[", "matrix": [6, 5], "x": 11.5, "y": 2},
|
||||
{"label": "]", "matrix": [6, 6], "x": 12.5, "y": 2},
|
||||
{"label": "|", "matrix": [2, 11], "x": 13.5, "y": 2, "w": 1.5},
|
||||
{"label": "Del", "matrix": [2, 12], "x": 15.25, "y": 2},
|
||||
|
||||
{"label": "Cap", "matrix": [3, 0], "x": 0, "y": 3, "w": 1.75},
|
||||
{"label": "A", "matrix": [3, 1], "x": 1.75, "y": 3},
|
||||
{"label": "S", "matrix": [3, 2], "x": 2.75, "y": 3},
|
||||
{"label": "D", "matrix": [3, 3], "x": 3.75, "y": 3},
|
||||
{"label": "F", "matrix": [3, 4], "x": 4.75, "y": 3},
|
||||
{"label": "G", "matrix": [3, 5], "x": 5.75, "y": 3},
|
||||
{"label": "H", "matrix": [3, 6], "x": 6.75, "y": 3},
|
||||
{"label": "J", "matrix": [3, 7], "x": 7.75, "y": 3},
|
||||
{"label": "K", "matrix": [3, 8], "x": 8.75, "y": 3},
|
||||
{"label": "L", "matrix": [3, 9], "x": 9.75, "y": 3},
|
||||
{"label": ";", "matrix": [3, 10], "x": 10.75, "y": 3},
|
||||
{"label": "'", "matrix": [6, 7], "x": 11.75, "y": 3},
|
||||
{"label": "Ent", "matrix": [3, 11], "x": 12.75, "y": 3, "w": 2.25},
|
||||
{"label": "PgUp", "matrix": [3, 12], "x": 15.25, "y": 3},
|
||||
|
||||
{"label": "Shift", "matrix": [4, 0], "x": 0, "y": 4, "w": 2.25},
|
||||
{"label": "Z", "matrix": [4, 1], "x": 2.25, "y": 4},
|
||||
{"label": "X", "matrix": [4, 2], "x": 3.25, "y": 4},
|
||||
{"label": "C", "matrix": [4, 3], "x": 4.25, "y": 4},
|
||||
{"label": "V", "matrix": [4, 4], "x": 5.25, "y": 4},
|
||||
{"label": "B", "matrix": [4, 5], "x": 6.25, "y": 4},
|
||||
{"label": "N", "matrix": [4, 6], "x": 7.25, "y": 4},
|
||||
{"label": "M", "matrix": [4, 7], "x": 8.25, "y": 4},
|
||||
{"label": ",", "matrix": [4, 8], "x": 9.25, "y": 4},
|
||||
{"label": ".", "matrix": [4, 9], "x": 10.25, "y": 4},
|
||||
{"label": "?", "matrix": [4, 10], "x": 11.25, "y": 4},
|
||||
{"label": "Shift", "matrix": [6, 8], "x": 12.25, "y": 4, "w": 1.75},
|
||||
{"label": "Up", "matrix": [4, 11], "x": 14.25, "y": 4.25},
|
||||
|
||||
{"label": "Ctrl", "matrix": [5, 0], "x": 0, "y": 5, "w": 1.25},
|
||||
{"label": "Com", "matrix": [5, 1], "x": 1.25, "y": 5, "w": 1.25},
|
||||
{"label": "Alt", "matrix": [6, 1], "x": 2.5, "y": 5, "w": 1.25},
|
||||
{"label": "SPAC1", "matrix": [6, 0], "x": 3.75, "y": 5, "w": 3.125,"h":0.5},
|
||||
{"label": "SPAC", "matrix": [5, 5], "x": 3.75, "y": 5.5, "w": 6.25,"h":0.5},
|
||||
{"label": "SPAC2", "matrix": [5, 6], "x":6.875, "y": 5, "w": 3.125,"h":0.5},
|
||||
{"label": "Alt", "matrix": [5, 9], "x": 10, "y": 5},
|
||||
{"label": "Fn", "matrix": [5, 7], "x": 11, "y": 5},
|
||||
{"label": "Menu", "matrix": [5, 10], "x": 12, "y": 5},
|
||||
{"label": "Left", "matrix": [6, 9], "x": 13.25, "y": 5.25},
|
||||
{"label": "Down", "matrix": [5, 11], "x": 14.25, "y": 5.25},
|
||||
{"label": "Right", "matrix": [6, 11], "x": 15.25, "y": 5.25}
|
||||
]
|
||||
},
|
||||
"LAYOUT_ansi_80": {
|
||||
"layout": [
|
||||
{"label": "ESC", "matrix": [0, 0], "x": 0, "y": 0},
|
||||
{"label": "F1", "matrix": [0, 1], "x": 2, "y": 0},
|
||||
{"label": "F2", "matrix": [0, 2], "x": 3, "y": 0},
|
||||
{"label": "F3", "matrix": [0, 3], "x": 4, "y": 0},
|
||||
{"label": "F4", "matrix": [0, 4], "x": 5, "y": 0},
|
||||
{"label": "F5", "matrix": [0, 5], "x": 6.5, "y": 0},
|
||||
{"label": "F6", "matrix": [0, 6], "x": 7.5, "y": 0},
|
||||
{"label": "F7", "matrix": [0, 7], "x": 8.5, "y": 0},
|
||||
{"label": "F8", "matrix": [0, 8], "x": 9.5, "y": 0},
|
||||
{"label": "F9", "matrix": [0, 9], "x": 11, "y": 0},
|
||||
{"label": "F10", "matrix": [0, 10], "x": 12, "y": 0},
|
||||
{"label": "F11", "matrix": [5, 3], "x": 13, "y": 0},
|
||||
{"label": "F12", "matrix": [5, 4], "x": 14, "y": 0},
|
||||
{"label": "Mute", "matrix": [0, 12], "x": 15.25, "y": 0},
|
||||
|
||||
{"label": "~", "matrix": [1, 0], "x": 0, "y": 1},
|
||||
{"label": "1", "matrix": [1, 1], "x": 1, "y": 1},
|
||||
{"label": "2", "matrix": [1, 2], "x": 2, "y": 1},
|
||||
{"label": "3", "matrix": [1, 3], "x": 3, "y": 1},
|
||||
{"label": "4", "matrix": [1, 4], "x": 4, "y": 1},
|
||||
{"label": "5", "matrix": [1, 5], "x": 5, "y": 1},
|
||||
{"label": "6", "matrix": [1, 6], "x": 6, "y": 1},
|
||||
{"label": "7", "matrix": [1, 7], "x": 7, "y": 1},
|
||||
{"label": "8", "matrix": [1, 8], "x": 8, "y": 1},
|
||||
{"label": "9", "matrix": [1, 9], "x": 9, "y": 1},
|
||||
{"label": "0", "matrix": [1, 10], "x": 10, "y": 1},
|
||||
{"label": "-_", "matrix": [6, 3], "x": 11, "y": 1},
|
||||
{"label": "=+", "matrix": [6, 4], "x": 12, "y": 1},
|
||||
{"label": "BS", "matrix": [1, 11], "x": 13, "y": 1, "w": 2},
|
||||
{"label": "Home", "matrix": [1, 12], "x": 15.25, "y": 1},
|
||||
|
||||
{"label": "Tab", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.5},
|
||||
{"label": "Q", "matrix": [2, 1], "x": 1.5, "y": 2},
|
||||
{"label": "W", "matrix": [2, 2], "x": 2.5, "y": 2},
|
||||
{"label": "E", "matrix": [2, 3], "x": 3.5, "y": 2},
|
||||
{"label": "R", "matrix": [2, 4], "x": 4.5, "y": 2},
|
||||
{"label": "T", "matrix": [2, 5], "x": 5.5, "y": 2},
|
||||
{"label": "Y", "matrix": [2, 6], "x": 6.5, "y": 2},
|
||||
{"label": "U", "matrix": [2, 7], "x": 7.5, "y": 2},
|
||||
{"label": "I", "matrix": [2, 8], "x": 8.5, "y": 2},
|
||||
{"label": "O", "matrix": [2, 9], "x": 9.5, "y": 2},
|
||||
{"label": "P", "matrix": [2, 10], "x": 10.5, "y": 2},
|
||||
{"label": "[", "matrix": [6, 5], "x": 11.5, "y": 2},
|
||||
{"label": "]", "matrix": [6, 6], "x": 12.5, "y": 2},
|
||||
{"label": "|", "matrix": [2, 11], "x": 13.5, "y": 2, "w": 1.5},
|
||||
{"label": "Del", "matrix": [2, 12], "x": 15.25, "y": 2},
|
||||
|
||||
{"label": "Cap", "matrix": [3, 0], "x": 0, "y": 3, "w": 1.75},
|
||||
{"label": "A", "matrix": [3, 1], "x": 1.75, "y": 3},
|
||||
{"label": "S", "matrix": [3, 2], "x": 2.75, "y": 3},
|
||||
{"label": "D", "matrix": [3, 3], "x": 3.75, "y": 3},
|
||||
{"label": "F", "matrix": [3, 4], "x": 4.75, "y": 3},
|
||||
{"label": "G", "matrix": [3, 5], "x": 5.75, "y": 3},
|
||||
{"label": "H", "matrix": [3, 6], "x": 6.75, "y": 3},
|
||||
{"label": "J", "matrix": [3, 7], "x": 7.75, "y": 3},
|
||||
{"label": "K", "matrix": [3, 8], "x": 8.75, "y": 3},
|
||||
{"label": "L", "matrix": [3, 9], "x": 9.75, "y": 3},
|
||||
{"label": ";", "matrix": [3, 10], "x": 10.75, "y": 3},
|
||||
{"label": "'", "matrix": [6, 7], "x": 11.75, "y": 3},
|
||||
{"label": "Ent", "matrix": [3, 11], "x": 12.75, "y": 3, "w": 2.25},
|
||||
{"label": "PgUp", "matrix": [3, 12], "x": 15.25, "y": 3},
|
||||
|
||||
{"label": "Shift", "matrix": [4, 0], "x": 0, "y": 4, "w": 2.25},
|
||||
{"label": "Z", "matrix": [4, 1], "x": 2.25, "y": 4},
|
||||
{"label": "X", "matrix": [4, 2], "x": 3.25, "y": 4},
|
||||
{"label": "C", "matrix": [4, 3], "x": 4.25, "y": 4},
|
||||
{"label": "V", "matrix": [4, 4], "x": 5.25, "y": 4},
|
||||
{"label": "B", "matrix": [4, 5], "x": 6.25, "y": 4},
|
||||
{"label": "N", "matrix": [4, 6], "x": 7.25, "y": 4},
|
||||
{"label": "M", "matrix": [4, 7], "x": 8.25, "y": 4},
|
||||
{"label": ",", "matrix": [4, 8], "x": 9.25, "y": 4},
|
||||
{"label": ".", "matrix": [4, 9], "x": 10.25, "y": 4},
|
||||
{"label": "?", "matrix": [4, 10], "x": 11.25, "y": 4},
|
||||
{"label": "Shift", "matrix": [6, 8], "x": 12.25, "y": 4, "w": 1.75},
|
||||
{"label": "Up", "matrix": [4, 11], "x": 14.25, "y": 4.25},
|
||||
|
||||
{"label": "Ctrl", "matrix": [5, 0], "x": 0, "y": 5, "w": 1.25},
|
||||
{"label": "Com", "matrix": [5, 1], "x": 1.25, "y": 5, "w": 1.25},
|
||||
{"label": "Alt", "matrix": [6, 1], "x": 2.5, "y": 5, "w": 1.25},
|
||||
{"label": "SPAC", "matrix": [5, 5], "x": 3.75, "y": 5, "w": 6.25},
|
||||
{"label": "Alt", "matrix": [5, 9], "x": 10, "y": 5},
|
||||
{"label": "Fn", "matrix": [5, 7], "x": 11, "y": 5},
|
||||
{"label": "Menu", "matrix": [5, 10], "x": 12, "y": 5},
|
||||
{"label": "Left", "matrix": [6, 9], "x": 13.25, "y": 5.25},
|
||||
{"label": "Down", "matrix": [5, 11], "x": 14.25, "y": 5.25},
|
||||
{"label": "Right", "matrix": [6, 11], "x": 15.25, "y": 5.25}
|
||||
]
|
||||
},
|
||||
"LAYOUT_ansi_split_space": {
|
||||
"layout":[
|
||||
{"label": "ESC", "matrix": [0, 0], "x": 0, "y": 0},
|
||||
{"label": "F1", "matrix": [0, 1], "x": 2, "y": 0},
|
||||
{"label": "F2", "matrix": [0, 2], "x": 3, "y": 0},
|
||||
{"label": "F3", "matrix": [0, 3], "x": 4, "y": 0},
|
||||
{"label": "F4", "matrix": [0, 4], "x": 5, "y": 0},
|
||||
{"label": "F5", "matrix": [0, 5], "x": 6.5, "y": 0},
|
||||
{"label": "F6", "matrix": [0, 6], "x": 7.5, "y": 0},
|
||||
{"label": "F7", "matrix": [0, 7], "x": 8.5, "y": 0},
|
||||
{"label": "F8", "matrix": [0, 8], "x": 9.5, "y": 0},
|
||||
{"label": "F9", "matrix": [0, 9], "x": 11, "y": 0},
|
||||
{"label": "F10", "matrix": [0, 10], "x": 12, "y": 0},
|
||||
{"label": "F11", "matrix": [5, 3], "x": 13, "y": 0},
|
||||
{"label": "F12", "matrix": [5, 4], "x": 14, "y": 0},
|
||||
{"label": "Mute", "matrix": [0, 12], "x": 15.25, "y": 0},
|
||||
|
||||
{"label": "~", "matrix": [1, 0], "x": 0, "y": 1},
|
||||
{"label": "1", "matrix": [1, 1], "x": 1, "y": 1},
|
||||
{"label": "2", "matrix": [1, 2], "x": 2, "y": 1},
|
||||
{"label": "3", "matrix": [1, 3], "x": 3, "y": 1},
|
||||
{"label": "4", "matrix": [1, 4], "x": 4, "y": 1},
|
||||
{"label": "5", "matrix": [1, 5], "x": 5, "y": 1},
|
||||
{"label": "6", "matrix": [1, 6], "x": 6, "y": 1},
|
||||
{"label": "7", "matrix": [1, 7], "x": 7, "y": 1},
|
||||
{"label": "8", "matrix": [1, 8], "x": 8, "y": 1},
|
||||
{"label": "9", "matrix": [1, 9], "x": 9, "y": 1},
|
||||
{"label": "0", "matrix": [1, 10], "x": 10, "y": 1},
|
||||
{"label": "-_", "matrix": [6, 3], "x": 11, "y": 1},
|
||||
{"label": "=+", "matrix": [6, 4], "x": 12, "y": 1},
|
||||
{"label": "BS", "matrix": [1, 11], "x": 13, "y": 1, "w": 2},
|
||||
{"label": "Home", "matrix": [1, 12], "x": 15.25, "y": 1},
|
||||
|
||||
{"label": "Tab", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.5},
|
||||
{"label": "Q", "matrix": [2, 1], "x": 1.5, "y": 2},
|
||||
{"label": "W", "matrix": [2, 2], "x": 2.5, "y": 2},
|
||||
{"label": "E", "matrix": [2, 3], "x": 3.5, "y": 2},
|
||||
{"label": "R", "matrix": [2, 4], "x": 4.5, "y": 2},
|
||||
{"label": "T", "matrix": [2, 5], "x": 5.5, "y": 2},
|
||||
{"label": "Y", "matrix": [2, 6], "x": 6.5, "y": 2},
|
||||
{"label": "U", "matrix": [2, 7], "x": 7.5, "y": 2},
|
||||
{"label": "I", "matrix": [2, 8], "x": 8.5, "y": 2},
|
||||
{"label": "O", "matrix": [2, 9], "x": 9.5, "y": 2},
|
||||
{"label": "P", "matrix": [2, 10], "x": 10.5, "y": 2},
|
||||
{"label": "[", "matrix": [6, 5], "x": 11.5, "y": 2},
|
||||
{"label": "]", "matrix": [6, 6], "x": 12.5, "y": 2},
|
||||
{"label": "|", "matrix": [2, 11], "x": 13.5, "y": 2, "w": 1.5},
|
||||
{"label": "Del", "matrix": [2, 12], "x": 15.25, "y": 2},
|
||||
|
||||
{"label": "Cap", "matrix": [3, 0], "x": 0, "y": 3, "w": 1.75},
|
||||
{"label": "A", "matrix": [3, 1], "x": 1.75, "y": 3},
|
||||
{"label": "S", "matrix": [3, 2], "x": 2.75, "y": 3},
|
||||
{"label": "D", "matrix": [3, 3], "x": 3.75, "y": 3},
|
||||
{"label": "F", "matrix": [3, 4], "x": 4.75, "y": 3},
|
||||
{"label": "G", "matrix": [3, 5], "x": 5.75, "y": 3},
|
||||
{"label": "H", "matrix": [3, 6], "x": 6.75, "y": 3},
|
||||
{"label": "J", "matrix": [3, 7], "x": 7.75, "y": 3},
|
||||
{"label": "K", "matrix": [3, 8], "x": 8.75, "y": 3},
|
||||
{"label": "L", "matrix": [3, 9], "x": 9.75, "y": 3},
|
||||
{"label": ";", "matrix": [3, 10], "x": 10.75, "y": 3},
|
||||
{"label": "'", "matrix": [6, 7], "x": 11.75, "y": 3},
|
||||
{"label": "Ent", "matrix": [3, 11], "x": 12.75, "y": 3, "w": 2.25},
|
||||
{"label": "PgUp", "matrix": [3, 12], "x": 15.25, "y": 3},
|
||||
|
||||
{"label": "Shift", "matrix": [4, 0], "x": 0, "y": 4, "w": 2.25},
|
||||
{"label": "Z", "matrix": [4, 1], "x": 2.25, "y": 4},
|
||||
{"label": "X", "matrix": [4, 2], "x": 3.25, "y": 4},
|
||||
{"label": "C", "matrix": [4, 3], "x": 4.25, "y": 4},
|
||||
{"label": "V", "matrix": [4, 4], "x": 5.25, "y": 4},
|
||||
{"label": "B", "matrix": [4, 5], "x": 6.25, "y": 4},
|
||||
{"label": "N", "matrix": [4, 6], "x": 7.25, "y": 4},
|
||||
{"label": "M", "matrix": [4, 7], "x": 8.25, "y": 4},
|
||||
{"label": ",", "matrix": [4, 8], "x": 9.25, "y": 4},
|
||||
{"label": ".", "matrix": [4, 9], "x": 10.25, "y": 4},
|
||||
{"label": "?", "matrix": [4, 10], "x": 11.25, "y": 4},
|
||||
{"label": "Shift", "matrix": [6, 8], "x": 12.25, "y": 4, "w": 1.75},
|
||||
{"label": "Up", "matrix": [4, 11], "x": 14.25, "y": 4.25},
|
||||
|
||||
{"label": "Ctrl", "matrix": [5, 0], "x": 0, "y": 5, "w": 1.25},
|
||||
{"label": "Com", "matrix": [5, 1], "x": 1.25, "y": 5, "w": 1.25},
|
||||
{"label": "Alt", "matrix": [6, 1], "x": 2.5, "y": 5, "w": 1.25},
|
||||
{"label": "SPAC1", "matrix": [6, 0], "x": 3.75, "y": 5, "w": 3.125},
|
||||
{"label": "SPAC2", "matrix": [5, 6], "x": 6.875, "y": 5, "w": 3.125},
|
||||
{"label": "Alt", "matrix": [5, 9], "x": 10, "y": 5},
|
||||
{"label": "Fn", "matrix": [5, 7], "x": 11, "y": 5},
|
||||
{"label": "Menu", "matrix": [5, 10], "x": 12, "y": 5},
|
||||
{"label": "Left", "matrix": [6, 9], "x": 13.25, "y": 5.25},
|
||||
{"label": "Down", "matrix": [5, 11], "x": 14.25, "y": 5.25},
|
||||
{"label": "Right", "matrix": [6, 11], "x": 15.25, "y": 5.25}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
33
keyboards/skyloong/gk75/q2/ansi/keymaps/default/keymap.c
Normal file
33
keyboards/skyloong/gk75/q2/ansi/keymaps/default/keymap.c
Normal file
@ -0,0 +1,33 @@
|
||||
// Copyright 2023 NaturalZh (@NaturalZh)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[0] = LAYOUT_all(
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12, KC_MUTE,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_F11, KC_UP,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||
),
|
||||
|
||||
[1] = LAYOUT_all(
|
||||
_______, KC_F14, KC_F15, G(KC_TAB), KC_WSCH, G(C(KC_S)), LSG(KC_S), KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_PAUS,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_RMOD, RGB_MOD, KC_DEL, KC_INS,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_END,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_VAD, RGB_SPI
|
||||
),
|
||||
};
|
||||
|
||||
#if defined(ENCODER_MAP_ENABLE)
|
||||
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
|
||||
[0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(RGB_VAD, RGB_VAI), ENCODER_CCW_CW(C(KC_WH_D), C(KC_WH_U)), ENCODER_CCW_CW(G(C(KC_LEFT)),G(C(KC_RGHT))) },
|
||||
[1] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI), ENCODER_CCW_CW(RGB_HUD, RGB_HUI), ENCODER_CCW_CW(RGB_SPD, RGB_SPI), ENCODER_CCW_CW(RGB_SAD, RGB_SAI) }
|
||||
};
|
||||
#endif
|
||||
|
1
keyboards/skyloong/gk75/q2/ansi/keymaps/default/rules.mk
Normal file
1
keyboards/skyloong/gk75/q2/ansi/keymaps/default/rules.mk
Normal file
@ -0,0 +1 @@
|
||||
ENCODER_MAP_ENABLE = yes
|
33
keyboards/skyloong/gk75/q2/ansi/readme.md
Normal file
33
keyboards/skyloong/gk75/q2/ansi/readme.md
Normal file
@ -0,0 +1,33 @@
|
||||
# The GK75 Q2 ansi is an RGB matrix Keyboard with an encoder.
|
||||
|
||||
![GK75 Q2 ansi](https://i.imgur.com/G9PrQtth.png)
|
||||
|
||||
## The PCB features:
|
||||
* QMK & VIA compatibility
|
||||
* RGB Matrix effect backlight
|
||||
* Mechanical switches Keyboard and supporting up to 4 encoders which are can be replaced with switches.
|
||||
|
||||
|
||||
The following is the QMK Firmware for the Desktop 75% keylayout - designed by Dongguan Jizhi Electronic Technology Co., Ltd
|
||||
|
||||
* Keyboard Maintainer: [NaturalZh](https://github.com/NaturalZh)
|
||||
* Hardware Supported: Desktop PCB for Skyloong key layout 75%, STM32F103C8T6
|
||||
* Hardware Availability:[Skyloong_CN]( http://www.skyloong.com.cn) OR [Skyloong_HK](https://skyloongtech.com)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make skyloong/gk75/q2/ansi:default
|
||||
|
||||
Flashing example for this keyboard:
|
||||
|
||||
make skyloong/gk75/q2/ansi:default:flash
|
||||
|
||||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||
|
||||
## Bootloader
|
||||
|
||||
Enter the bootloader in 3 ways:
|
||||
|
||||
* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard
|
||||
* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead
|
||||
* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available
|
2
keyboards/skyloong/gk75/q2/ansi/rules.mk
Normal file
2
keyboards/skyloong/gk75/q2/ansi/rules.mk
Normal file
@ -0,0 +1,2 @@
|
||||
CUSTOM_MATRIX = lite
|
||||
SRC += matrix.c
|
16
keyboards/skyloong/gk75/q2/config.h
Normal file
16
keyboards/skyloong/gk75/q2/config.h
Normal file
@ -0,0 +1,16 @@
|
||||
// Copyright 2023 JZ-Skyloong (@JZ-Skyloong)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#define ENCODER_MAP_KEY_DELAY 10
|
||||
|
||||
#define AW20216S_CS_PIN_1 B12
|
||||
#define AW20216S_CS_PIN_2 B11
|
||||
// Hardware enable lines may be connected to the same pin
|
||||
#define AW20216S_EN_PIN B5
|
||||
#define CAPS_LOCK_INDEX 43
|
||||
|
||||
#define MATRIX_ROWS 7
|
||||
#define MATRIX_COLS 13
|
||||
#define MATRIX_ROW_PINS {A8, A9, A10, A15, B6, B7,B9}
|
9
keyboards/skyloong/gk75/q2/halconf.h
Normal file
9
keyboards/skyloong/gk75/q2/halconf.h
Normal file
@ -0,0 +1,9 @@
|
||||
// Copyright 2023 JZ-Skyloong (@JZ-Skyloong)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#pragma once
|
||||
|
||||
#define HAL_USE_SPI TRUE
|
||||
#define SPI_USE_WAIT TRUE
|
||||
#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
|
||||
|
||||
#include_next <halconf.h>
|
74
keyboards/skyloong/gk75/q2/info.json
Normal file
74
keyboards/skyloong/gk75/q2/info.json
Normal file
@ -0,0 +1,74 @@
|
||||
{
|
||||
"manufacturer": "skyloong",
|
||||
"maintainer": "NaturalZh",
|
||||
"bootloader": "stm32duino",
|
||||
"debounce": 10,
|
||||
"build": {
|
||||
"debounce_type": "asym_eager_defer_pk"
|
||||
},
|
||||
"eeprom": {
|
||||
"wear_leveling": {
|
||||
"backing_size": 4096
|
||||
}
|
||||
},
|
||||
"encoder": {
|
||||
"rotary": [
|
||||
{"pin_a": "A1", "pin_b": "A0"},
|
||||
{"pin_a": "A3", "pin_b": "A2", "resolution": 2},
|
||||
{"pin_a": "A4", "pin_b": "B0", "resolution": 2},
|
||||
{"pin_a": "B3", "pin_b": "B1", "resolution": 2}
|
||||
]
|
||||
},
|
||||
"features": {
|
||||
"bootmagic": true,
|
||||
"command": true,
|
||||
"encoder": true,
|
||||
"extrakey": true,
|
||||
"mousekey": true,
|
||||
"nkro": true,
|
||||
"rgb_matrix": true
|
||||
},
|
||||
"indicators": {
|
||||
"on_state": 0,
|
||||
"caps_lock": "C15"
|
||||
},
|
||||
"processor": "STM32F103",
|
||||
"rgb_matrix": {
|
||||
"animations": {
|
||||
"band_spiral_val": true,
|
||||
"breathing": true,
|
||||
"cycle_all": true,
|
||||
"cycle_left_right": true,
|
||||
"cycle_out_in": true,
|
||||
"cycle_out_in_dual": true,
|
||||
"cycle_pinwheel": true,
|
||||
"cycle_spiral": true,
|
||||
"cycle_up_down": true,
|
||||
"digital_rain": true,
|
||||
"dual_beacon": true,
|
||||
"jellybean_raindrops": true,
|
||||
"pixel_rain": true,
|
||||
"rainbow_moving_chevron": true,
|
||||
"raindrops": true,
|
||||
"solid_reactive_multinexus": true,
|
||||
"solid_reactive_multiwide": true,
|
||||
"solid_reactive_simple": true,
|
||||
"solid_splash": true,
|
||||
"splash": true,
|
||||
"typing_heatmap": true
|
||||
},
|
||||
"driver": "aw20216s",
|
||||
"hue_steps": 20,
|
||||
"max_brightness": 200,
|
||||
"sat_steps": 20,
|
||||
"speed_steps": 20,
|
||||
"val_steps": 20,
|
||||
"sleep": true
|
||||
},
|
||||
"url": "https://www.skyloong.vip",
|
||||
"usb": {
|
||||
"max_power": 380,
|
||||
"vid": "0x1EA7"
|
||||
}
|
||||
|
||||
}
|
153
keyboards/skyloong/gk75/q2/matrix.c
Normal file
153
keyboards/skyloong/gk75/q2/matrix.c
Normal file
@ -0,0 +1,153 @@
|
||||
// Copyright 2023 NaturaZh (@NaturalZh)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
//Matrix read rows set col:DIODE_DIRECTION == ROW2COL
|
||||
|
||||
#include "matrix.h"
|
||||
#include <string.h>
|
||||
#include "atomic_util.h"
|
||||
|
||||
#define CLOCK_TIME 15
|
||||
#define MATRIX_INPUT_PRESSED_STATE 0
|
||||
|
||||
#define HC595_ST_PIN A6
|
||||
#define HC595_SH_PIN A5
|
||||
#define HC595_DS_PIN A7 //定义74HC595的串口数据输入端
|
||||
|
||||
/* matrix state(1:on, 0:off) */
|
||||
extern matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values
|
||||
extern matrix_row_t matrix[MATRIX_ROWS]; // debounced values
|
||||
|
||||
pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
|
||||
|
||||
// user-defined overridable functions
|
||||
__attribute__((weak)) void matrix_read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col, matrix_row_t row_shifter);
|
||||
|
||||
static inline void select_delay(uint16_t n) {
|
||||
while (n-- > 0) {
|
||||
asm volatile("nop" ::: "memory");
|
||||
};
|
||||
}
|
||||
|
||||
static inline void gpio_atomic_set_pin_output_low(pin_t pin) {
|
||||
ATOMIC_BLOCK_FORCEON {
|
||||
gpio_set_pin_output(pin);
|
||||
gpio_write_pin_low(pin);
|
||||
}
|
||||
}
|
||||
|
||||
static inline void gpio_atomic_set_pin_output_high(pin_t pin) {
|
||||
ATOMIC_BLOCK_FORCEON {
|
||||
gpio_set_pin_output(pin);
|
||||
gpio_write_pin_high(pin);
|
||||
}
|
||||
}
|
||||
|
||||
static inline void gpio_atomic_set_pin_input_high(pin_t pin) {
|
||||
ATOMIC_BLOCK_FORCEON {
|
||||
gpio_set_pin_input_high(pin);
|
||||
}
|
||||
}
|
||||
|
||||
static inline uint8_t readMatrixPin(pin_t pin) {
|
||||
if (pin != NO_PIN) {
|
||||
return (gpio_read_pin(pin) == MATRIX_INPUT_PRESSED_STATE) ? 0 : 1;
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
static inline void clockPulse(uint16_t n) {
|
||||
gpio_write_pin_high(HC595_SH_PIN);
|
||||
gpio_write_pin_high(HC595_ST_PIN);
|
||||
select_delay(n);
|
||||
gpio_write_pin_low(HC595_SH_PIN);
|
||||
gpio_write_pin_low(HC595_ST_PIN);
|
||||
}
|
||||
|
||||
// matrix code
|
||||
|
||||
static bool select_col(uint8_t col) {
|
||||
gpio_atomic_set_pin_output_high(HC595_DS_PIN);
|
||||
for (uint8_t m = 0; m <= col; m++) {
|
||||
if(m == 0){
|
||||
gpio_write_pin_low(HC595_DS_PIN);
|
||||
}else{
|
||||
gpio_write_pin_high(HC595_DS_PIN);
|
||||
}
|
||||
clockPulse(CLOCK_TIME);
|
||||
}
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
static void unselect_col(uint8_t col) {
|
||||
uint8_t x = (MATRIX_COLS - col);
|
||||
gpio_atomic_set_pin_output_high(HC595_DS_PIN);
|
||||
for (uint8_t y = 0; y < x ; y++) {
|
||||
clockPulse(CLOCK_TIME);
|
||||
}
|
||||
}
|
||||
|
||||
static void unselect_cols(void) {
|
||||
gpio_atomic_set_pin_output_low(HC595_SH_PIN);
|
||||
gpio_atomic_set_pin_output_low(HC595_ST_PIN);
|
||||
gpio_atomic_set_pin_output_high(HC595_DS_PIN);
|
||||
for (uint8_t x = 0; x < MATRIX_COLS; x++) {
|
||||
clockPulse(CLOCK_TIME);
|
||||
}
|
||||
}
|
||||
|
||||
__attribute__((weak)) void matrix_init_pins(void) {
|
||||
unselect_cols();
|
||||
for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
|
||||
if (row_pins[x] != NO_PIN) {
|
||||
gpio_atomic_set_pin_input_high(row_pins[x]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
__attribute__((weak)) 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
|
||||
}
|
||||
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] |= row_shifter;
|
||||
key_pressed = true;
|
||||
} else {
|
||||
// Pin HI, clear col bit
|
||||
current_matrix[row_index] &= ~row_shifter;
|
||||
}
|
||||
}
|
||||
|
||||
// Unselect col
|
||||
unselect_col(current_col);
|
||||
matrix_output_unselect_delay(current_col, key_pressed); // wait for all Row signals to go HIGH
|
||||
}
|
||||
|
||||
void matrix_init_custom(void) {
|
||||
matrix_init_pins();
|
||||
}
|
||||
|
||||
bool matrix_scan_custom(matrix_row_t current_matrix[]) {
|
||||
matrix_row_t temp_matrix[MATRIX_ROWS] = {0};
|
||||
|
||||
// Set col, read rows
|
||||
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(temp_matrix, current_col, row_shifter);
|
||||
}
|
||||
|
||||
bool changed = memcmp(raw_matrix, temp_matrix, sizeof(temp_matrix)) != 0;
|
||||
if (changed) memcpy(raw_matrix, temp_matrix, sizeof(temp_matrix));
|
||||
|
||||
return changed;
|
||||
}
|
8
keyboards/skyloong/gk75/q2/mcuconf.h
Normal file
8
keyboards/skyloong/gk75/q2/mcuconf.h
Normal file
@ -0,0 +1,8 @@
|
||||
// Copyright 2023 JZ-Skyloong (@JZ-Skyloong)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#pragma once
|
||||
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef STM32_SPI_USE_SPI2
|
||||
#define STM32_SPI_USE_SPI2 TRUE
|
133
keyboards/skyloong/gk75/q2/q2.c
Normal file
133
keyboards/skyloong/gk75/q2/q2.c
Normal file
@ -0,0 +1,133 @@
|
||||
// Copyright 2023 NaturalZh (@NaturalZh)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#include "quantum.h"
|
||||
|
||||
const aw20216s_led_t PROGMEM g_aw20216s_leds[AW20216S_LED_COUNT] = {
|
||||
/* Each AW20216 channel is controlled by a register at some offset between 0x00
|
||||
* and 0xD7 inclusive.
|
||||
* See drivers/awinic/aw20216.h for the mapping between register offsets and
|
||||
* driver pin locations.
|
||||
* driver
|
||||
* | R location
|
||||
* | | G location
|
||||
* | | | B location
|
||||
* | | | | */
|
||||
{0, SW1_CS1, SW1_CS2, SW1_CS3}, //ESC
|
||||
{0, SW3_CS1, SW3_CS2, SW3_CS3}, //F1
|
||||
{0, SW4_CS1, SW4_CS2, SW4_CS3},
|
||||
{0, SW5_CS1, SW5_CS2, SW5_CS3}, //F3
|
||||
{0, SW6_CS1, SW6_CS2, SW6_CS3},
|
||||
{0, SW7_CS1, SW7_CS2, SW7_CS3}, //F5
|
||||
{0, SW8_CS1, SW8_CS2, SW8_CS3},
|
||||
{0, SW9_CS1, SW9_CS2, SW9_CS3}, //F7
|
||||
{0, SW10_CS1, SW10_CS2, SW10_CS3},
|
||||
{0, SW11_CS1, SW11_CS2, SW11_CS3}, //F9
|
||||
{0, SW12_CS1, SW12_CS2, SW12_CS3}, //F10
|
||||
{0, SW2_CS10, SW2_CS11, SW2_CS12},
|
||||
{0, SW3_CS10, SW3_CS11, SW3_CS12}, //F12
|
||||
//encoder no led
|
||||
|
||||
{0, SW1_CS4, SW1_CS5, SW1_CS6}, //`~
|
||||
{0, SW2_CS4, SW2_CS5, SW2_CS6}, //1
|
||||
{0, SW3_CS4, SW3_CS5, SW3_CS6}, //2
|
||||
{0, SW4_CS4, SW4_CS5, SW4_CS6},
|
||||
{0, SW5_CS4, SW5_CS5, SW5_CS6}, //4
|
||||
{0, SW6_CS4, SW6_CS5, SW6_CS6},
|
||||
{0, SW7_CS4, SW7_CS5, SW7_CS6}, //6
|
||||
{0, SW8_CS4, SW8_CS5, SW8_CS6},
|
||||
{0, SW9_CS4, SW9_CS5, SW9_CS6}, //8
|
||||
{0, SW10_CS4, SW10_CS5, SW10_CS6},
|
||||
{0, SW11_CS4, SW11_CS5, SW11_CS6}, //0
|
||||
{0, SW12_CS4, SW12_CS5, SW12_CS6}, //-_
|
||||
{0, SW2_CS13, SW2_CS14, SW2_CS15}, //=+
|
||||
{0, SW3_CS13, SW3_CS14, SW3_CS15}, //BS
|
||||
{0, SW4_CS13, SW4_CS14, SW4_CS15}, //Home
|
||||
|
||||
{0, SW1_CS7, SW1_CS8, SW1_CS9}, //Tab
|
||||
{0, SW2_CS7, SW2_CS8, SW2_CS9}, //Q
|
||||
{0, SW3_CS7, SW3_CS8, SW3_CS9}, //W
|
||||
{0, SW4_CS7, SW4_CS8, SW4_CS9}, //E
|
||||
{0, SW5_CS7, SW5_CS8, SW5_CS9}, //R
|
||||
{0, SW6_CS7, SW6_CS8, SW6_CS9}, //T
|
||||
{0, SW7_CS7, SW7_CS8, SW7_CS9}, //Y
|
||||
{0, SW8_CS7, SW8_CS8, SW8_CS9}, //U
|
||||
{0, SW9_CS7, SW9_CS8, SW9_CS9}, //I
|
||||
{0, SW10_CS7, SW10_CS8, SW10_CS9}, //O
|
||||
{0, SW11_CS7, SW11_CS8, SW11_CS9}, //P
|
||||
{0, SW12_CS7, SW12_CS8, SW12_CS9}, //[
|
||||
{0, SW2_CS16, SW2_CS17, SW2_CS18}, //]
|
||||
{0, SW3_CS16, SW3_CS17, SW3_CS18}, //|
|
||||
{0, SW4_CS16, SW4_CS17, SW4_CS18}, //DEL
|
||||
|
||||
{1, SW1_CS1, SW1_CS2, SW1_CS3}, //Cap
|
||||
{1, SW2_CS1, SW2_CS2, SW2_CS3}, //A
|
||||
{1, SW3_CS1, SW3_CS2, SW3_CS3}, //S
|
||||
{1, SW4_CS1, SW4_CS2, SW4_CS3}, //D
|
||||
{1, SW5_CS1, SW5_CS2, SW5_CS3}, //F
|
||||
{1, SW6_CS1, SW6_CS2, SW6_CS3}, //G
|
||||
{1, SW7_CS1, SW7_CS2, SW7_CS3}, //H
|
||||
{1, SW8_CS1, SW8_CS2, SW8_CS3}, //J
|
||||
{1, SW9_CS1, SW9_CS2, SW9_CS3}, //K
|
||||
{1, SW10_CS1, SW10_CS2, SW10_CS3}, //L
|
||||
{1, SW11_CS1, SW11_CS2, SW11_CS3}, //;
|
||||
{1, SW12_CS1, SW12_CS2, SW12_CS3}, //.
|
||||
{1, SW3_CS10, SW3_CS11, SW3_CS12}, //Ent
|
||||
{1, SW4_CS10, SW4_CS11, SW4_CS12}, //PgUp
|
||||
|
||||
{1, SW1_CS4, SW1_CS5, SW1_CS6}, //Shift
|
||||
{1, SW2_CS4, SW2_CS5, SW2_CS6}, //Z
|
||||
{1, SW3_CS4, SW3_CS5, SW3_CS6}, //X
|
||||
{1, SW4_CS4, SW4_CS5, SW4_CS6}, //C
|
||||
{1, SW5_CS4, SW5_CS5, SW5_CS6}, //V
|
||||
{1, SW6_CS4, SW6_CS5, SW6_CS6}, //B
|
||||
{1, SW7_CS4, SW7_CS5, SW7_CS6}, //N
|
||||
{1, SW8_CS4, SW8_CS5, SW8_CS6}, //M
|
||||
{1, SW9_CS4, SW9_CS5, SW9_CS6}, //,
|
||||
{1, SW10_CS4, SW10_CS5, SW10_CS6}, //.
|
||||
{1, SW11_CS4, SW11_CS5, SW11_CS6}, //?
|
||||
{1, SW2_CS13, SW2_CS14, SW2_CS15}, //Shift
|
||||
{1, SW3_CS13, SW3_CS14, SW3_CS15}, //Up
|
||||
|
||||
{1, SW1_CS7, SW1_CS8, SW1_CS9}, //Ctrl
|
||||
{1, SW2_CS7, SW2_CS8, SW2_CS9}, //Com
|
||||
{1, SW3_CS7, SW3_CS8, SW3_CS9}, //Alt
|
||||
{1, SW5_CS7, SW5_CS8, SW5_CS9}, //SPAC1
|
||||
{1, SW6_CS7, SW6_CS8, SW6_CS9}, //SPAC
|
||||
{1, SW8_CS7, SW8_CS8, SW8_CS9}, //SPAC2
|
||||
{1, SW10_CS7, SW10_CS8, SW10_CS9}, //Alt
|
||||
{1, SW11_CS7, SW11_CS8, SW11_CS9}, //Fn
|
||||
{1, SW12_CS7, SW12_CS8, SW12_CS9}, //Menu
|
||||
{1, SW2_CS16, SW2_CS17, SW2_CS18}, //Left
|
||||
{1, SW3_CS16, SW3_CS17, SW3_CS18}, //Down
|
||||
{1, SW4_CS16, SW4_CS17, SW4_CS18}, //Right
|
||||
};
|
||||
|
||||
void suspend_power_down_kb() {
|
||||
gpio_write_pin_low(AW20216S_EN_PIN);
|
||||
suspend_power_down_user();
|
||||
}
|
||||
|
||||
void suspend_wakeup_init_kb() {
|
||||
gpio_write_pin_high(AW20216S_EN_PIN);
|
||||
suspend_wakeup_init_user();
|
||||
}
|
||||
void board_init(void) {
|
||||
// JTAG-DP Disabled and SW-DP Disabled
|
||||
AFIO->MAPR = (AFIO->MAPR & ~AFIO_MAPR_SWJ_CFG_Msk) | AFIO_MAPR_SWJ_CFG_DISABLE;
|
||||
}
|
||||
|
||||
#if defined(RGB_MATRIX_ENABLE) /*&& defined(CAPS_LOCK_INDEX)*/
|
||||
bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {
|
||||
if (!rgb_matrix_indicators_advanced_user(led_min, led_max)) {
|
||||
return false;
|
||||
}
|
||||
if (host_keyboard_led_state().caps_lock) {
|
||||
RGB_MATRIX_INDICATOR_SET_COLOR(CAPS_LOCK_INDEX, 255, 255, 255);
|
||||
} else {
|
||||
if (!rgb_matrix_get_flags()) {
|
||||
RGB_MATRIX_INDICATOR_SET_COLOR(CAPS_LOCK_INDEX, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user