From 28e91dd3e02687de1a11310721c382d7b23ae5c1 Mon Sep 17 00:00:00 2001
From: Alex <142793347+AlexHtr@users.noreply.github.com>
Date: Thu, 19 Sep 2024 23:03:23 +0300
Subject: [PATCH 1/5] Add HATOR Gravity X TKL keyboard support
---
keyboards/hator/gravity/xtkl/config.h | 28 ++
keyboards/hator/gravity/xtkl/keyboard.json | 263 ++++++++++++++++++
.../gravity/xtkl/keymaps/default/keymap.c | 63 +++++
.../hator/gravity/xtkl/keymaps/via/config.h | 19 ++
.../xtkl/keymaps/via/gravityx_via.json | 149 ++++++++++
.../hator/gravity/xtkl/keymaps/via/keymap.c | 64 +++++
.../hator/gravity/xtkl/keymaps/via/rules.mk | 1 +
keyboards/hator/gravity/xtkl/readme.md | 27 ++
8 files changed, 614 insertions(+)
create mode 100644 keyboards/hator/gravity/xtkl/config.h
create mode 100644 keyboards/hator/gravity/xtkl/keyboard.json
create mode 100644 keyboards/hator/gravity/xtkl/keymaps/default/keymap.c
create mode 100644 keyboards/hator/gravity/xtkl/keymaps/via/config.h
create mode 100644 keyboards/hator/gravity/xtkl/keymaps/via/gravityx_via.json
create mode 100644 keyboards/hator/gravity/xtkl/keymaps/via/keymap.c
create mode 100644 keyboards/hator/gravity/xtkl/keymaps/via/rules.mk
create mode 100644 keyboards/hator/gravity/xtkl/readme.md
diff --git a/keyboards/hator/gravity/xtkl/config.h b/keyboards/hator/gravity/xtkl/config.h
new file mode 100644
index 000000000000..df1d1a92b71e
--- /dev/null
+++ b/keyboards/hator/gravity/xtkl/config.h
@@ -0,0 +1,28 @@
+/*
+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 .
+*/
+
+#pragma once
+
+#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_MATRIX_COL_PINS {A8, A9, A10, A11, A12, A13, A14, A15, B0, B1, B2, B3, B4, B5, B6, B7, B8}
+
+#define RGB_MATRIX_LED_COUNT 104
+#define MATRIX_UNSELECT_DRIVE_HIGH
+//#define SN32_PWM_OUTPUT_ACTIVE_LEVEL SN32_PWM_OUTPUT_ACTIVE_HIGH
+#define SN32_RGB_OUTPUT_ACTIVE_LEVEL SN32_RGB_OUTPUT_ACTIVE_HIGH
+//#define USB_MAX_POWER_CONSUMPTION 500
+#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 240
\ No newline at end of file
diff --git a/keyboards/hator/gravity/xtkl/keyboard.json b/keyboards/hator/gravity/xtkl/keyboard.json
new file mode 100644
index 000000000000..e4470b26f5df
--- /dev/null
+++ b/keyboards/hator/gravity/xtkl/keyboard.json
@@ -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 }
+ ]
+ }
+ }
+
+}
diff --git a/keyboards/hator/gravity/xtkl/keymaps/default/keymap.c b/keyboards/hator/gravity/xtkl/keymaps/default/keymap.c
new file mode 100644
index 000000000000..640c87544c36
--- /dev/null
+++ b/keyboards/hator/gravity/xtkl/keymaps/default/keymap.c
@@ -0,0 +1,63 @@
+/*
+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 .
+*/
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+
+#include QMK_KEYBOARD_H
+
+bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
+ if (host_keyboard_led_state().caps_lock) {
+ RGB_MATRIX_INDICATOR_SET_COLOR(13, 255, 255, 255); // assuming caps lock is at led #13 (rbg)
+ } else {
+ RGB_MATRIX_INDICATOR_SET_COLOR(13, 0, 0, 0);
+ }
+ return false;
+}
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+/* +--------------------------------------------------------------------------+----------------+
+ | ESC | | F1 | F2 | F3 | F4 | | F5 | F6 | F7 | F8 | | F9| F10| F11| F12| | |PSCR|SCLK|PAUS|
+ +--------------------------------------------------------------------------+------|----|----|
+ | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACKSP | |INS |HOME|PGUP|
+ +--------------------------------------------------------------------------+------|----|----|
+ | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | |DEL |END |PGDN|
+ +--------------------------------------------------------------------------+------|----|----|
+ | CAPSLCK | A | S | D | F | G | H | J | K | L | ; | ' | RETURN | |
+ +--------------------------------------------------------------------------+ |----| |
+ | LSHIFT | Z | X | C | V | B | N | M | , | . | / | RSHIFT | | UP | |
+ +--------------------------------------------------------------------------+------|----|----|
+ |LCTRL| LGUI| LALT | SPACE | RALT| FN | MENU | RCTRL | |LFT |DWN |RGT |
+ +--------------------------------------------------------------------------+----------------+
+*/
+ [0] = LAYOUT(
+ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SCRL, KC_PAUS,
+
+ 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_INS, KC_HOME, KC_PGUP,
+ 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_DEL, KC_END, KC_PGDN,
+ 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
+ ),
+ [1] = LAYOUT(
+ QK_BOOT, KC_VOLD, KC_VOLU, KC_MUTE, KC_MPLY, KC_MYCM, KC_WHOM, KC_WFAV, KC_CPNL, KC_CALC, KC_MAIL, KC_BRID, KC_BRIU, RGB_HUD, RGB_TOG, RGB_HUI,
+ NK_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_BSLS, RGB_M_T, RGB_M_SN, RGB_M_X,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI,
+ _______, AG_LSWP, AG_LNRM, _______, _______, _______, _______, _______, RGB_SPD, RGB_VAD, RGB_SPI
+ )
+};
diff --git a/keyboards/hator/gravity/xtkl/keymaps/via/config.h b/keyboards/hator/gravity/xtkl/keymaps/via/config.h
new file mode 100644
index 000000000000..69b9fa49f759
--- /dev/null
+++ b/keyboards/hator/gravity/xtkl/keymaps/via/config.h
@@ -0,0 +1,19 @@
+/*
+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 .
+*/
+
+#pragma once
+
+#define DYNAMIC_KEYMAP_LAYER_COUNT 2
diff --git a/keyboards/hator/gravity/xtkl/keymaps/via/gravityx_via.json b/keyboards/hator/gravity/xtkl/keymaps/via/gravityx_via.json
new file mode 100644
index 000000000000..5f77432d0b93
--- /dev/null
+++ b/keyboards/hator/gravity/xtkl/keymaps/via/gravityx_via.json
@@ -0,0 +1,149 @@
+{
+ "name": "HATOR Gravity X TKL",
+ "vendorId": "0x379A",
+ "productId": "0x0608",
+ "keycodes": ["qmk_lighting"],
+ "menus": [
+ {
+ "label": "Lighting",
+ "content": [
+ {
+ "label": "Backlight",
+ "content": [
+ {
+ "label": "Brightness",
+ "type": "range",
+ "options": [
+ 0,
+ 255
+ ],
+ "content": [
+ "id_qmk_rgb_matrix_brightness",
+ 3,
+ 1
+ ]
+ },
+ {
+ "label": "Effect",
+ "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. CYCLE_SPIRAL",
+ 11
+ ],
+ [
+ "12. RAINBOW_BEACON",
+ 12
+ ],
+ [
+ "13. PIXEL_RAIN",
+ 13
+ ],
+ [
+ "14. TYPING_HEATMAP",
+ 14
+ ],
+ [
+ "15. REACTIVE_SIMPLE",
+ 15
+ ],
+ [
+ "16. SPLASH",
+ 16
+ ],
+ [
+ "17. SOLID_SPLASH",
+ 17
+ ]
+ ]
+ },
+ {
+ "showIf": "{id_qmk_rgb_matrix_effect} > 1",
+ "label": "Effect Speed",
+ "type": "range",
+ "options": [
+ 0,
+ 255
+ ],
+ "content": [
+ "id_qmk_rgb_matrix_effect_speed",
+ 3,
+ 3
+ ]
+ },
+ {
+ "showIf": "{id_qmk_rgb_matrix_effect} != 0",
+ "label": "Color",
+ "type": "color",
+ "content": [
+ "id_qmk_rgb_matrix_color",
+ 3,
+ 4
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ],
+ "matrix": {"rows": 7, "cols": 17},
+ "layouts": {
+ "keymap": [
+ [{"c": "#777777" }, "0,0", {"x": 1, "c": "#cccccc" }, "0,1", "0,2", "0,3", "0,4", {"x": 0.5}, "0,5", "0,6", "0,7", "0,8", {"x": 0.5}, "0,9", "0,10", "0,11", "0,12", {"x": 0.25}, "0,14", "0,15", "0,16"],
+ [{"y": 0.5}, "1,0", "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": 2}, "1,13", {"x": 0.25 }, "1,14", "1,15", "1,16"],
+ [{"w": 1.5 }, "2,0", "2,1", "2,2", "2,3", "2,4", "2,5", "2,6", "2,7", "2,8", "2,9", "2,10", "2,11", "2,12", {"w": 1.5}, "2,13", { "x": 0.25 }, "2,14", "2,15", "2,16"],
+ [{"w": 1.75 }, "3,0", "3,1", "3,2", "3,3", "3,4", "3,5", "3,6", "3,7", "3,8", "3,9", "3,10", "3,11", {"w": 2.25, "c": "#777777"}, "3,13"],
+ [{"w": 2.25, "c": "#cccccc"}, "4,0", "4,2", "4,3", "4,4", "4,5", "4,6", "4,7", "4,8", "4,9", "4,10", "4,11", {"w": 2.75 }, "4,13", {"x": 1.25, "c": "#777777" }, "4,15"],
+ [{"w": 1.25, "c": "#cccccc"}, "5,0", {"w": 1.25 }, "5,1", {"w": 1.25 }, "5,2", {"w": 6.25 }, "5,6", {"w": 1.25 }, "5,10", {"w": 1.25, "c": "#aaaaaa" }, "5,11", {"w": 1.25 }, {"c": "#cccccc" }, "5,12", {"w": 1.25 }, "5,13", {"x": 0.25, "c": "#777777" }, "5,14", "5,15", "5,16"]
+ ]
+ }
+}
diff --git a/keyboards/hator/gravity/xtkl/keymaps/via/keymap.c b/keyboards/hator/gravity/xtkl/keymaps/via/keymap.c
new file mode 100644
index 000000000000..3f95300411f0
--- /dev/null
+++ b/keyboards/hator/gravity/xtkl/keymaps/via/keymap.c
@@ -0,0 +1,64 @@
+/*
+
+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 .
+*/
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+
+#include QMK_KEYBOARD_H
+
+bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
+ if (host_keyboard_led_state().caps_lock) {
+ RGB_MATRIX_INDICATOR_SET_COLOR(13, 255, 255, 255); // assuming caps lock is at led #13 (rbg)
+ } else {
+ RGB_MATRIX_INDICATOR_SET_COLOR(13, 0, 0, 0);
+ }
+ return false;
+}
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+/* +--------------------------------------------------------------------------+----------------+
+ | ESC | | F1 | F2 | F3 | F4 | | F5 | F6 | F7 | F8 | | F9| F10| F11| F12| | |PSCR|SCLK|PAUS|
+ +--------------------------------------------------------------------------+------|----|----|
+ | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACKSP | |INS |HOME|PGUP|
+ +--------------------------------------------------------------------------+------|----|----|
+ | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | |DEL |END |PGDN|
+ +--------------------------------------------------------------------------+------|----|----|
+ | CAPSLCK | A | S | D | F | G | H | J | K | L | ; | ' | RETURN | |
+ +--------------------------------------------------------------------------+ |----| |
+ | LSHIFT | Z | X | C | V | B | N | M | , | . | / | RSHIFT | | UP | |
+ +--------------------------------------------------------------------------+------|----|----|
+ |LCTRL| LGUI| LALT | SPACE | RALT| RGUI | FN | RCTRL | |LFT |DWN |RGT |
+ +--------------------------------------------------------------------------+----------------+
+*/
+ [0] = LAYOUT(
+ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SCRL, KC_PAUS,
+
+ 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_INS, KC_HOME, KC_PGUP,
+ 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_DEL, KC_END, KC_PGDN,
+ 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
+ ),
+ [1] = LAYOUT(
+ QK_BOOT, KC_VOLD, KC_VOLU, KC_MUTE, KC_MPLY, KC_MYCM, KC_WHOM, KC_WFAV, KC_CPNL, KC_CALC, KC_MAIL, KC_BRID, KC_BRIU, RGB_HUD, RGB_TOG, RGB_HUI,
+ NK_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_BSLS, RGB_M_T, RGB_M_SN, RGB_M_X,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI,
+ _______, AG_LSWP, AG_LNRM, _______, _______, _______, _______, _______, RGB_SPD, RGB_VAD, RGB_SPI
+ )
+};
diff --git a/keyboards/hator/gravity/xtkl/keymaps/via/rules.mk b/keyboards/hator/gravity/xtkl/keymaps/via/rules.mk
new file mode 100644
index 000000000000..036bd6d1c3ec
--- /dev/null
+++ b/keyboards/hator/gravity/xtkl/keymaps/via/rules.mk
@@ -0,0 +1 @@
+VIA_ENABLE = yes
\ No newline at end of file
diff --git a/keyboards/hator/gravity/xtkl/readme.md b/keyboards/hator/gravity/xtkl/readme.md
new file mode 100644
index 000000000000..829d3846410c
--- /dev/null
+++ b/keyboards/hator/gravity/xtkl/readme.md
@@ -0,0 +1,27 @@
+# gravity
+
+![gravity x tkl](https://i.imgur.com/WKBMvUh.png)
+
+*A short description of the keyboard/project*
+
+* Keyboard Maintainer: [Alex](https://github.com/AlexHtr)
+* Hardware Supported: Wired mode, side led enabled
+* Hardware Availability: https://hator.com/keyboards/gravity-x-tkl/
+
+Make firmware for this keyboard (after setting up your build environment, 2 types of layouts available):
+
+ qmk compile -kb hator/gravity/xtkl -km via
+or
+ qmk compile -kb hator/gravity/xtkl -km default
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [SonixQMK instructions](https://sonixqmk.github.io//SonixDocs/install/) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
+
+Use [Sonix Keyboard Flasher] (https://github.com/SonixQMK/sonix-flasher/) to flash your firmware. Offset is 0x00.
+
+## Bootloader
+
+Enter the bootloader in 3 ways:
+
+* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (Escape) and plug in the keyboard
+* **Physical reset button**: You can locate the boot pins under the Spacebar.
+* **Keycode in layout**: Press Fn1+ESC to enter the bootloader mode.
From a371cba87a9de95a890a080fcbaa351da46f1156 Mon Sep 17 00:00:00 2001
From: Alex <142793347+AlexHtr@users.noreply.github.com>
Date: Fri, 20 Sep 2024 15:17:08 +0300
Subject: [PATCH 2/5] fixes
copyright holder fix, config.h edited
---
keyboards/hator/gravity/xtkl/config.h | 11 +++--------
keyboards/hator/gravity/xtkl/keymaps/default/keymap.c | 3 ++-
keyboards/hator/gravity/xtkl/keymaps/via/keymap.c | 2 +-
3 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/keyboards/hator/gravity/xtkl/config.h b/keyboards/hator/gravity/xtkl/config.h
index df1d1a92b71e..c2058e53e751 100644
--- a/keyboards/hator/gravity/xtkl/config.h
+++ b/keyboards/hator/gravity/xtkl/config.h
@@ -16,13 +16,8 @@ along with this program. If not, see .
#pragma once
-#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_MATRIX_COL_PINS {A8, A9, A10, A11, A12, A13, A14, A15, B0, B1, B2, B3, B4, B5, B6, B7, B8}
-
-#define RGB_MATRIX_LED_COUNT 104
#define MATRIX_UNSELECT_DRIVE_HIGH
-//#define SN32_PWM_OUTPUT_ACTIVE_LEVEL SN32_PWM_OUTPUT_ACTIVE_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 USB_MAX_POWER_CONSUMPTION 500
-#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 240
\ No newline at end of file
+#define RGB_MATRIX_LED_COUNT 104
diff --git a/keyboards/hator/gravity/xtkl/keymaps/default/keymap.c b/keyboards/hator/gravity/xtkl/keymaps/default/keymap.c
index 640c87544c36..a7fe5f522308 100644
--- a/keyboards/hator/gravity/xtkl/keymaps/default/keymap.c
+++ b/keyboards/hator/gravity/xtkl/keymaps/default/keymap.c
@@ -1,4 +1,5 @@
-/*
+/* Copyright 2024 @ HATOR (https://www.hator.com)
+
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
diff --git a/keyboards/hator/gravity/xtkl/keymaps/via/keymap.c b/keyboards/hator/gravity/xtkl/keymaps/via/keymap.c
index 3f95300411f0..1f2b0f42ee1b 100644
--- a/keyboards/hator/gravity/xtkl/keymaps/via/keymap.c
+++ b/keyboards/hator/gravity/xtkl/keymaps/via/keymap.c
@@ -1,4 +1,4 @@
-/*
+/* Copyright 2024 @ HATOR (https://www.hator.com)
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
From 8e35c3a84b632169df4b5b1b96c6867a15c908c7 Mon Sep 17 00:00:00 2001
From: Alex <142793347+AlexHtr@users.noreply.github.com>
Date: Fri, 20 Sep 2024 15:38:07 +0300
Subject: [PATCH 3/5] via and default keymap.c updates
---
keyboards/hator/gravity/xtkl/keymaps/default/keymap.c | 8 ++++----
keyboards/hator/gravity/xtkl/keymaps/via/keymap.c | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/keyboards/hator/gravity/xtkl/keymaps/default/keymap.c b/keyboards/hator/gravity/xtkl/keymaps/default/keymap.c
index a7fe5f522308..e1096b029233 100644
--- a/keyboards/hator/gravity/xtkl/keymaps/default/keymap.c
+++ b/keyboards/hator/gravity/xtkl/keymaps/default/keymap.c
@@ -1,15 +1,15 @@
-/* Copyright 2024 @ HATOR (https://www.hator.com)
-
+/* Copyright 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 .
*/
diff --git a/keyboards/hator/gravity/xtkl/keymaps/via/keymap.c b/keyboards/hator/gravity/xtkl/keymaps/via/keymap.c
index 1f2b0f42ee1b..b23577bca2a0 100644
--- a/keyboards/hator/gravity/xtkl/keymaps/via/keymap.c
+++ b/keyboards/hator/gravity/xtkl/keymaps/via/keymap.c
@@ -1,15 +1,15 @@
-/* Copyright 2024 @ HATOR (https://www.hator.com)
-
+/* Copyright 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 .
*/
From 3cb912f05d56cb2a993e4770e32077ba685ee039 Mon Sep 17 00:00:00 2001
From: Alex <142793347+AlexHtr@users.noreply.github.com>
Date: Fri, 20 Sep 2024 16:34:28 +0300
Subject: [PATCH 4/5] whitespace removed (readme.md)
---
keyboards/hator/gravity/xtkl/readme.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/keyboards/hator/gravity/xtkl/readme.md b/keyboards/hator/gravity/xtkl/readme.md
index 829d3846410c..78eb57696ba4 100644
--- a/keyboards/hator/gravity/xtkl/readme.md
+++ b/keyboards/hator/gravity/xtkl/readme.md
@@ -12,7 +12,7 @@ Make firmware for this keyboard (after setting up your build environment, 2 type
qmk compile -kb hator/gravity/xtkl -km via
or
- qmk compile -kb hator/gravity/xtkl -km default
+ qmk compile -kb hator/gravity/xtkl -km default
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [SonixQMK instructions](https://sonixqmk.github.io//SonixDocs/install/) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
From 308b5bdbded8c42949e0af0ddfcb35e742350fa8 Mon Sep 17 00:00:00 2001
From: Alex <142793347+AlexHtr@users.noreply.github.com>
Date: Fri, 20 Sep 2024 17:07:24 +0300
Subject: [PATCH 5/5] Maximum brightness returned (config.h)
---
keyboards/hator/gravity/xtkl/config.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/keyboards/hator/gravity/xtkl/config.h b/keyboards/hator/gravity/xtkl/config.h
index c2058e53e751..625ba5bd85f7 100644
--- a/keyboards/hator/gravity/xtkl/config.h
+++ b/keyboards/hator/gravity/xtkl/config.h
@@ -21,3 +21,4 @@ along with this program. If not, see .
#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
+#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 240