Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add HATOR Gravity X TKL keyboard support #403

Merged
merged 7 commits into from
Sep 22, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions keyboards/hator/gravity/xtkl/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
Copyright 2024 AlexHtr
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#pragma once

#define MATRIX_UNSELECT_DRIVE_HIGH

#define SN32_RGB_MATRIX_ROW_PINS { C3,C1,C0, C6,C5,C4, C9,C8,C7, C12,C11,C10, B13,C14,C13, B14,B15,D3, A2,A4,A3 }
#define SN32_RGB_OUTPUT_ACTIVE_LEVEL SN32_RGB_OUTPUT_ACTIVE_HIGH
#define RGB_MATRIX_LED_COUNT 104
263 changes: 263 additions & 0 deletions keyboards/hator/gravity/xtkl/keyboard.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,263 @@
{
"manufacturer": "HATOR",
"keyboard_name": "HATOR Gravity X TKL",
"url": "https://hator.com",
"maintainer": "AlexHtr",
"bootloader": "sn32-dfu",
"usb": {
"device_version": "1.0.0",
"pid": "0x0608",
"vid": "0x379A"
},
"processor": "SN32F248BF",
"diode_direction": "COL2ROW",
"features": {
"bootmagic": true,
"command": false,
"console": false,
"extrakey": true,
"mousekey": false,
"encoder": false,
"nkro": true,
"rgb_matrix": true
},
"debounce": 8,
"matrix_pins": {
"cols": ["A8", "A9", "A10", "A11", "A12", "A13", "A14", "A15", "B0", "B1", "B2", "B3", "B4", "B5", "B6", "B7", "B8"],
"rows": ["C15", "D11", "D10", "D9", "D8", "D7", "A5"]
},
"rgb_matrix": {
"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,
"rainbow_beacon": true,
"pixel_rain": true,
"typing_heatmap": true,
"reactive_simple": true,
"splash": true,
"solid_splash": true
},
"driver": "sn32f2xx",
"layout": [
{ "matrix": [ 0, 0 ], "flags": 4, "x": 0, "y": 0 },
{ "matrix": [ 0, 1 ], "flags": 4, "x": 26, "y": 0 },
{ "matrix": [ 0, 2 ], "flags": 4, "x": 39, "y": 0 },
{ "matrix": [ 0, 3 ], "flags": 4, "x": 52, "y": 0 },
{ "matrix": [ 0, 4 ], "flags": 4, "x": 65, "y": 0 },
{ "matrix": [ 0, 5 ], "flags": 4, "x": 84, "y": 0 },
{ "matrix": [ 0, 6 ], "flags": 4, "x": 97, "y": 0 },
{ "matrix": [ 0, 7 ], "flags": 4, "x": 110, "y": 0 },
{ "matrix": [ 0, 8 ], "flags": 4, "x": 123, "y": 0 },
{ "matrix": [ 0, 9 ], "flags": 4, "x": 143, "y": 0 },
{ "matrix": [ 0, 10 ], "flags": 4, "x": 156, "y": 0 },
{ "matrix": [ 0, 11 ], "flags": 4, "x": 169, "y": 0 },
{ "matrix": [ 0, 12 ], "flags": 4, "x": 182, "y": 0 },
{ "matrix": [ 0, 13 ], "flags": 2, "x": 12, "y": 0 },
{ "matrix": [ 0, 14 ], "flags": 4, "x": 198, "y": 0 },
{ "matrix": [ 0, 15 ], "flags": 4, "x": 211, "y": 0 },
{ "matrix": [ 0, 16 ], "flags": 4, "x": 224, "y": 0 },

{ "matrix": [ 1, 0 ], "flags": 4, "x": 0, "y": 17 },
{ "matrix": [ 1, 1 ], "flags": 4, "x": 13, "y": 17 },
{ "matrix": [ 1, 2 ], "flags": 4, "x": 26, "y": 17 },
{ "matrix": [ 1, 3 ], "flags": 4, "x": 39, "y": 17 },
{ "matrix": [ 1, 4 ], "flags": 4, "x": 52, "y": 17 },
{ "matrix": [ 1, 5 ], "flags": 4, "x": 65, "y": 17 },
{ "matrix": [ 1, 6 ], "flags": 4, "x": 78, "y": 17 },
{ "matrix": [ 1, 7 ], "flags": 4, "x": 91, "y": 17 },
{ "matrix": [ 1, 8 ], "flags": 4, "x": 104, "y": 17 },
{ "matrix": [ 1, 9 ], "flags": 4, "x": 117, "y": 17 },
{ "matrix": [ 1, 10 ], "flags": 4, "x": 130, "y": 17 },
{ "matrix": [ 1, 11 ], "flags": 4, "x": 143, "y": 17 },
{ "matrix": [ 1, 12 ], "flags": 4, "x": 156, "y": 17 },
{ "matrix": [ 1, 13 ], "flags": 4, "x": 175, "y": 17 },
{ "matrix": [ 1, 14 ], "flags": 4, "x": 198, "y": 17 },
{ "matrix": [ 1, 15 ], "flags": 4, "x": 211, "y": 17 },
{ "matrix": [ 1, 16 ], "flags": 4, "x": 224, "y": 17 },

{ "matrix": [ 2, 0 ], "flags": 4, "x": 3, "y": 29 },
{ "matrix": [ 2, 1 ], "flags": 4, "x": 19, "y": 29 },
{ "matrix": [ 2, 2 ], "flags": 4, "x": 32, "y": 29 },
{ "matrix": [ 2, 3 ], "flags": 4, "x": 45, "y": 29 },
{ "matrix": [ 2, 4 ], "flags": 4, "x": 58, "y": 29 },
{ "matrix": [ 2, 5 ], "flags": 4, "x": 71, "y": 29 },
{ "matrix": [ 2, 6 ], "flags": 4, "x": 84, "y": 29 },
{ "matrix": [ 2, 7 ], "flags": 4, "x": 97, "y": 29 },
{ "matrix": [ 2, 8 ], "flags": 4, "x": 110, "y": 29 },
{ "matrix": [ 2, 9 ], "flags": 4, "x": 123, "y": 29 },
{ "matrix": [ 2, 10 ], "flags": 4, "x": 136, "y": 29 },
{ "matrix": [ 2, 11 ], "flags": 4, "x": 149, "y": 29 },
{ "matrix": [ 2, 12 ], "flags": 4, "x": 162, "y": 29 },
{ "matrix": [ 2, 13 ], "flags": 4, "x": 179, "y": 29 },
{ "matrix": [ 2, 14 ], "flags": 4, "x": 198, "y": 29 },
{ "matrix": [ 2, 15 ], "flags": 4, "x": 211, "y": 29 },
{ "matrix": [ 2, 16 ], "flags": 4, "x": 224, "y": 29 },

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

{ "matrix": [ 4, 0 ], "flags": 4, "x": 8, "y": 52 },
{ "matrix": [ 4, 2 ], "flags": 4, "x": 29, "y": 52 },
{ "matrix": [ 4, 3 ], "flags": 4, "x": 42, "y": 52 },
{ "matrix": [ 4, 4 ], "flags": 4, "x": 55, "y": 52 },
{ "matrix": [ 4, 5 ], "flags": 4, "x": 68, "y": 52 },
{ "matrix": [ 4, 6 ], "flags": 4, "x": 81, "y": 52 },
{ "matrix": [ 4, 7 ], "flags": 4, "x": 94, "y": 52 },
{ "matrix": [ 4, 8 ], "flags": 4, "x": 107, "y": 52 },
{ "matrix": [ 4, 9 ], "flags": 4, "x": 120, "y": 52 },
{ "matrix": [ 4, 10 ], "flags": 4, "x": 133, "y": 52 },
{ "matrix": [ 4, 11 ], "flags": 4, "x": 146, "y": 52 },
{ "matrix": [ 4, 13 ], "flags": 4, "x": 170, "y": 52 },
{ "matrix": [ 4, 15 ], "flags": 4, "x": 211, "y": 52 },

{ "matrix": [ 5, 0 ], "flags": 4, "x": 2, "y": 64 },
{ "matrix": [ 5, 1 ], "flags": 4, "x": 18, "y": 64 },
{ "matrix": [ 5, 2 ], "flags": 4, "x": 34, "y": 64 },
{ "matrix": [ 5, 6 ], "flags": 4, "x": 83, "y": 64 },
{ "matrix": [ 5, 10 ], "flags": 4, "x": 131, "y": 64 },
{ "matrix": [ 5, 11 ], "flags": 4, "x": 148, "y": 64 },
{ "matrix": [ 5, 12 ], "flags": 4, "x": 164, "y": 64 },
{ "matrix": [ 5, 13 ], "flags": 4, "x": 180, "y": 64 },
{ "matrix": [ 5, 14 ], "flags": 4, "x": 198, "y": 64 },
{ "matrix": [ 5, 15 ], "flags": 4, "x": 211, "y": 64 },
{ "matrix": [ 5, 16 ], "flags": 4, "x": 224, "y": 64 },

{ "matrix": [ 6, 0 ], "flags": 2, "x": 0, "y": 0 },
{ "matrix": [ 6, 1 ], "flags": 2, "x": 0, "y": 8 },
{ "matrix": [ 6, 2 ], "flags": 2, "x": 0, "y": 16 },
{ "matrix": [ 6, 3 ], "flags": 2, "x": 0, "y": 24 },
{ "matrix": [ 6, 4 ], "flags": 2, "x": 0, "y": 32 },
{ "matrix": [ 6, 5 ], "flags": 2, "x": 0, "y": 40 },
{ "matrix": [ 6, 6 ], "flags": 2, "x": 0, "y": 48 },
{ "matrix": [ 6, 7 ], "flags": 2, "x": 0, "y": 56 },
{ "matrix": [ 6, 8 ], "flags": 2, "x": 216, "y": 0 },
{ "matrix": [ 6, 9 ], "flags": 2, "x": 217, "y": 8 },
{ "matrix": [ 6, 10 ], "flags": 2, "x": 218, "y": 16 },
{ "matrix": [ 6, 11 ], "flags": 2, "x": 219, "y": 24 },
{ "matrix": [ 6, 12 ], "flags": 2, "x": 220, "y": 32 },
{ "matrix": [ 6, 13 ], "flags": 2, "x": 221, "y": 40 },
{ "matrix": [ 6, 14 ], "flags": 2, "x": 222, "y": 48 },
{ "matrix": [ 6, 15 ], "flags": 2, "x": 223, "y": 56 }
],
"react_on_keyup": true,
"sleep": true
},
"layouts": {
"LAYOUT": {
"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": [0, 11], "x": 13, "y": 0 },
{ "label": "F12", "matrix": [0, 12], "x": 14, "y": 0 },
{ "label": "PrtSc", "matrix": [0, 14], "x": 15.25, "y": 0 },
{ "label": "ScrLk", "matrix": [0, 15], "x": 16.25, "y": 0 },
{ "label": "Pause", "matrix": [0, 16], "x": 17.25, "y": 0 },

{ "label": "~", "matrix": [1, 0], "x": 0, "y": 1.25 },
{ "label": "!", "matrix": [1, 1], "x": 1, "y": 1.25 },
{ "label": "@", "matrix": [1, 2], "x": 2, "y": 1.25 },
{ "label": "#", "matrix": [1, 3], "x": 3, "y": 1.25 },
{ "label": "$", "matrix": [1, 4], "x": 4, "y": 1.25 },
{ "label": "%", "matrix": [1, 5], "x": 5, "y": 1.25 },
{ "label": "^", "matrix": [1, 6], "x": 6, "y": 1.25 },
{ "label": "&", "matrix": [1, 7], "x": 7, "y": 1.25 },
{ "label": "*", "matrix": [1, 8], "x": 8, "y": 1.25 },
{ "label": "(", "matrix": [1, 9], "x": 9, "y": 1.25 },
{ "label": ")", "matrix": [1, 10], "x": 10, "y": 1.25 },
{ "label": "_", "matrix": [1, 11], "x": 11, "y": 1.25 },
{ "label": "+", "matrix": [1, 12], "x": 12, "y": 1.25 },
{ "label": "Backspace", "matrix": [1, 13], "x": 13, "y": 1.25, "w": 2 },
{ "label": "Ins", "matrix": [1, 14], "x": 15.25, "y": 1.25 },
{ "label": "Home", "matrix": [1, 15], "x": 16.25, "y": 1.25 },
{ "label": "PgUp", "matrix": [1, 16], "x": 17.25, "y": 1.25 },

{ "label": "Tab", "matrix": [2, 0], "x": 0, "y": 2.25, "w": 1.5 },
{ "label": "Q", "matrix": [2, 1], "x": 1.5, "y": 2.25 },
{ "label": "W", "matrix": [2, 2], "x": 2.5, "y": 2.25 },
{ "label": "E", "matrix": [2, 3], "x": 3.5, "y": 2.25 },
{ "label": "R", "matrix": [2, 4], "x": 4.5, "y": 2.25 },
{ "label": "T", "matrix": [2, 5], "x": 5.5, "y": 2.25 },
{ "label": "Y", "matrix": [2, 6], "x": 6.5, "y": 2.25 },
{ "label": "U", "matrix": [2, 7], "x": 7.5, "y": 2.25 },
{ "label": "I", "matrix": [2, 8], "x": 8.5, "y": 2.25 },
{ "label": "O", "matrix": [2, 9], "x": 9.5, "y": 2.25 },
{ "label": "P", "matrix": [2, 10], "x": 10.5, "y": 2.25 },
{ "label": "{", "matrix": [2, 11], "x": 11.5, "y": 2.25 },
{ "label": "}", "matrix": [2, 12], "x": 12.5, "y": 2.25 },
{ "label": "|", "matrix": [2, 13], "x": 13.5, "y": 2.25, "w": 1.5 },
{ "label": "Del", "matrix": [2, 14], "x": 15.25, "y": 2.25 },
{ "label": "End", "matrix": [2, 15], "x": 16.25, "y": 2.25 },
{ "label": "PgDn", "matrix": [2, 16], "x": 17.25, "y": 2.25 },

{ "label": "Caps Lock", "matrix": [3, 0], "x": 0, "y": 3.25, "w": 1.75 },
{ "label": "A", "matrix": [3, 1], "x": 1.75, "y": 3.25 },
{ "label": "S", "matrix": [3, 2], "x": 2.75, "y": 3.25 },
{ "label": "D", "matrix": [3, 3], "x": 3.75, "y": 3.25 },
{ "label": "F", "matrix": [3, 4], "x": 4.75, "y": 3.25 },
{ "label": "G", "matrix": [3, 5], "x": 5.75, "y": 3.25 },
{ "label": "H", "matrix": [3, 6], "x": 6.75, "y": 3.25 },
{ "label": "J", "matrix": [3, 7], "x": 7.75, "y": 3.25 },
{ "label": "K", "matrix": [3, 8], "x": 8.75, "y": 3.25 },
{ "label": "L", "matrix": [3, 9], "x": 9.75, "y": 3.25 },
{ "label": ":", "matrix": [3, 10], "x": 10.75, "y": 3.25 },
{ "label": "'", "matrix": [3, 11], "x": 11.75, "y": 3.25 },
{ "label": "Enter", "matrix": [3, 13], "x": 12.75, "y": 3.25, "w": 2.25 },

{ "label": "Shift", "matrix": [4, 0], "x": 0, "y": 4.25, "w": 2.25 },
{ "label": "Z", "matrix": [4, 2], "x": 2.25, "y": 4.25 },
{ "label": "X", "matrix": [4, 3], "x": 3.25, "y": 4.25 },
{ "label": "C", "matrix": [4, 4], "x": 4.25, "y": 4.25 },
{ "label": "V", "matrix": [4, 5], "x": 5.25, "y": 4.25 },
{ "label": "B", "matrix": [4, 6], "x": 6.25, "y": 4.25 },
{ "label": "N", "matrix": [4, 7], "x": 7.25, "y": 4.25 },
{ "label": "M", "matrix": [4, 8], "x": 8.25, "y": 4.25 },
{ "label": "<", "matrix": [4, 9], "x": 9.25, "y": 4.25 },
{ "label": ">", "matrix": [4, 10], "x": 10.25, "y": 4.25 },
{ "label": "?", "matrix": [4, 11], "x": 11.25, "y": 4.25 },
{ "label": "Shift", "matrix": [4, 13], "x": 12.25, "y": 4.25, "w": 2.75 },
{ "label": "Up", "matrix": [4, 15], "x": 16.25, "y": 4.25 },

{ "label": "Ctrl", "matrix": [5, 0], "x": 0, "y": 5.25, "w": 1.25 },
{ "label": "Win", "matrix": [5, 1], "x": 1.25, "y": 5.25, "w": 1.25 },
{ "label": "Alt", "matrix": [5, 2], "x": 2.5, "y": 5.25, "w": 1.25 },
{ "label": "Space", "matrix": [5, 6], "x": 3.75, "y": 5.25, "w": 6.25 },
{ "label": "Alt", "matrix": [5, 10], "x": 10, "y": 5.25, "w": 1.25 },
{ "label": "Win", "matrix": [5, 11], "x": 11.25, "y": 5.25, "w": 1.25 },
{ "label": "Fn", "matrix": [5, 12], "x": 12.5, "y": 5.25, "w": 1.25 },
{ "label": "Ctrl", "matrix": [5, 13], "x": 13.75, "y": 5.25, "w": 1.25 },
{ "label": "Left", "matrix": [5, 14], "x": 15.25, "y": 5.25 },
{ "label": "Down", "matrix": [5, 15], "x": 16.25, "y": 5.25 },
{ "label": "Right", "matrix": [5, 16], "x": 17.25, "y": 5.25 }
]
}
}

}
Loading
Loading