From a55b7bf7b7bb5bfcd95c3323a622ceb114ac1fbe Mon Sep 17 00:00:00 2001
From: NetUserGet <22157020+NetUserGet@users.noreply.github.com>
Date: Fri, 5 Jul 2024 03:05:22 -0400
Subject: [PATCH] Add Keychron C1 RGB support. (#386)
* Keychron C1 RGB: Inital
* Keychron C1 RGB: Mac and Windows Indicator lights
* Keychron C1 RGB: OpenRGB Support, and changed rgb matrix center to the Y key.
* Keychron C1 RGB: Fix file structure, Remove Rules.mk, fix RGB flags and postions.
* Keychron C1 RGB: Oops, sorry put my custom keymap in there.
* Keychron C1 RGB: Remove dead code.
* Keychron C1 RGB: Ommit Userspace customizations
* Keychron C1 RGB: Fix minor LED postioning error.
* Keychron C1 RGB: Remove custom keycodes for rebooting the keyboard in favor for the built-in reboot keycode, and rename c1.c to rgb.c
* Keychron C1 RGB: Make rgb.c more readable
* Keychron C1 RGB: Added VIA support, updated keymap.c, keyboard.json, and readme.md.
* Keychron C1 RGB: Add c1_rgb_via.json
* Keychron C1 RGB: Patch timetravel.
* Keychron C1 RGB: Wrap suppend_power_down_kb and suppend_wakeup_init_kb with an RGB_MATRIX_ENABLE ifdef.
* Keychron C1 RGB: Remove Keychron and append RGB in keyboard.json under keyboard_name and swap RGB_MATRIX_ENABLE with RGB_MATRIX_SLEEP in rgb.c
* Keychron C1 RGB: Move some funtions into their respective ifdef statements.
* Keychron C1 RGB: change the VID and PID because defaults are owned by apple.
---
keyboards/keychron/c1/rgb/c1_rgb_via.json | 228 ++++++++++++++++
keyboards/keychron/c1/rgb/config.h | 20 ++
keyboards/keychron/c1/rgb/keyboard.json | 257 ++++++++++++++++++
.../keychron/c1/rgb/keymaps/default/keymap.c | 106 ++++++++
.../keychron/c1/rgb/keymaps/via/keymap.c | 106 ++++++++
.../keychron/c1/rgb/keymaps/via/rules.mk | 1 +
keyboards/keychron/c1/rgb/readme.md | 95 +++++++
keyboards/keychron/c1/rgb/rgb.c | 72 +++++
8 files changed, 885 insertions(+)
create mode 100644 keyboards/keychron/c1/rgb/c1_rgb_via.json
create mode 100644 keyboards/keychron/c1/rgb/config.h
create mode 100644 keyboards/keychron/c1/rgb/keyboard.json
create mode 100644 keyboards/keychron/c1/rgb/keymaps/default/keymap.c
create mode 100644 keyboards/keychron/c1/rgb/keymaps/via/keymap.c
create mode 100644 keyboards/keychron/c1/rgb/keymaps/via/rules.mk
create mode 100644 keyboards/keychron/c1/rgb/readme.md
create mode 100644 keyboards/keychron/c1/rgb/rgb.c
diff --git a/keyboards/keychron/c1/rgb/c1_rgb_via.json b/keyboards/keychron/c1/rgb/c1_rgb_via.json
new file mode 100644
index 000000000000..ff8f0c79e897
--- /dev/null
+++ b/keyboards/keychron/c1/rgb/c1_rgb_via.json
@@ -0,0 +1,228 @@
+{
+ "name": "Keychron C1 RGB",
+ "vendorId": "0x3434",
+ "productId": "0xFE20",
+ "matrix": {
+ "rows": 6,
+ "cols": 17
+ },
+ "layouts": {
+ "keymap": [
+ [
+ {
+ "c": "#de6423"
+ },
+ "0,0",
+ {
+ "x": 1,
+ "c": "#cccccc"
+ },
+ "0,1",
+ "0,2",
+ "0,3",
+ "0,4",
+ {
+ "x": 0.5,
+ "c": "#454242",
+ "t": "#ffffff"
+ },
+ "0,5",
+ "0,6",
+ "0,7",
+ "0,8",
+ {
+ "x": 0.5,
+ "c": "#cccccc",
+ "t": "#000000"
+ },
+ "0,9",
+ "0,10",
+ "0,11",
+ "0,12",
+ {
+ "x": 0.25,
+ "c": "#454242",
+ "t": "#ffffff"
+ },
+ "0,14",
+ "0,15",
+ "0,16"
+ ],
+ [
+ {
+ "y": 0.5
+ },
+ "1,0",
+ {
+ "c": "#cccccc",
+ "t": "#000000"
+ },
+ "1,1",
+ "1,2",
+ "1,3",
+ "1,4",
+ "1,5",
+ "1,6",
+ "1,7",
+ "1,8",
+ "1,9",
+ "1,10",
+ "1,11",
+ "1,12",
+ {
+ "c": "#454242",
+ "t": "#ffffff",
+ "w": 2
+ },
+ "1,13",
+ {
+ "x": 0.25
+ },
+ "1,14",
+ "1,15",
+ "1,16"
+ ],
+ [
+ {
+ "w": 1.5
+ },
+ "2,0",
+ {
+ "c": "#cccccc",
+ "t": "#000000"
+ },
+ "2,1",
+ "2,2",
+ "2,3",
+ "2,4",
+ "2,5",
+ "2,6",
+ "2,7",
+ "2,8",
+ "2,9",
+ "2,10",
+ "2,11",
+ "2,12",
+ {
+ "c": "#454242",
+ "t": "#ffffff",
+ "w": 1.5
+ },
+ "2,13",
+ {
+ "x": 0.25
+ },
+ "2,14",
+ "2,15",
+ "2,16"
+ ],
+ [
+ {
+ "w": 1.75
+ },
+ "3,0",
+ {
+ "c": "#cccccc",
+ "t": "#000000"
+ },
+ "3,1",
+ "3,2",
+ "3,3",
+ "3,4",
+ "3,5",
+ "3,6",
+ "3,7",
+ "3,8",
+ "3,9",
+ "3,10",
+ "3,11",
+ {
+ "c": "#454242",
+ "t": "#ffffff",
+ "w": 2.25
+ },
+ "3,13"
+ ],
+ [
+ {
+ "w": 2.25
+ },
+ "4,0",
+ {
+ "c": "#cccccc",
+ "t": "#000000"
+ },
+ "4,2",
+ "4,3",
+ "4,4",
+ "4,5",
+ "4,6",
+ "4,7",
+ "4,8",
+ "4,9",
+ "4,10",
+ "4,11",
+ {
+ "c": "#454242",
+ "t": "#ffffff",
+ "w": 2.75
+ },
+ "4,13",
+ {
+ "x": 1.25,
+ "c": "#cccccc",
+ "t": "#000000"
+ },
+ "4,15"
+ ],
+ [
+ {
+ "c": "#454242",
+ "t": "#ffffff",
+ "w": 1.25
+ },
+ "5,0",
+ {
+ "w": 1.25
+ },
+ "5,1",
+ {
+ "w": 1.25
+ },
+ "5,2",
+ {
+ "c": "#cccccc",
+ "t": "#000000",
+ "w": 6.25
+ },
+ "5,6",
+ {
+ "c": "#454242",
+ "t": "#ffffff",
+ "w": 1.25
+ },
+ "5,10",
+ {
+ "w": 1.25
+ },
+ "5,11",
+ {
+ "w": 1.25
+ },
+ "5,12",
+ {
+ "w": 1.25
+ },
+ "5,13",
+ {
+ "x": 0.25,
+ "c": "#cccccc",
+ "t": "#000000"
+ },
+ "5,14",
+ "5,15",
+ "5,16"
+ ]
+ ]
+ }
+}
diff --git a/keyboards/keychron/c1/rgb/config.h b/keyboards/keychron/c1/rgb/config.h
new file mode 100644
index 000000000000..39cc3cd7dc54
--- /dev/null
+++ b/keyboards/keychron/c1/rgb/config.h
@@ -0,0 +1,20 @@
+/*
+Copyright 2024 NetUserGet
+
+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 .
+*/
+#define SN32_RGB_MATRIX_ROW_PINS { C0, C1, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, B13, D3, B15, B14 }
+
+#define LED_MAC_PIN B11 // Labeled Mac on KB since no Scroll Lock
+#define LED_WIN_PIN B12 // Labeled Windows on KB since no Numpad
diff --git a/keyboards/keychron/c1/rgb/keyboard.json b/keyboards/keychron/c1/rgb/keyboard.json
new file mode 100644
index 000000000000..26d544d4f063
--- /dev/null
+++ b/keyboards/keychron/c1/rgb/keyboard.json
@@ -0,0 +1,257 @@
+{
+ "manufacturer": "Keychron",
+ "keyboard_name": "Keychron C1",
+ "maintainer": "NetUserGet",
+ "bootloader": "sn32-dfu",
+ "diode_direction": "COL2ROW",
+ "features": {
+ "bootmagic": true,
+ "command": false,
+ "console": false,
+ "extrakey": true,
+ "mousekey": true,
+ "nkro": true,
+ "rgb_matrix": true,
+ "dip_switch": true
+ },
+ "bootmagic": {
+ "matrix": [0, 0]
+ },
+ "indicators": {
+ "caps_lock": "B10"
+ },
+ "dip_switch": {
+ "pins": ["D4"]
+ },
+ "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"]
+ },
+ "debounce": 0,
+ "processor": "SN32F248BF",
+ "url": "https://www.keychron.com/products/keychron-c1-wired-mechanical-keyboard?variant=32321247182937",
+ "usb": {
+ "device_version": "1.0.0",
+ "pid": "0xFE20",
+ "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}
+ ]
+ }
+ },
+ "rgb_matrix": {
+ "driver": "sn32f24xb",
+ "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":4, "x":14, "y":0},
+ {"matrix":[0, 2], "flags":4, "x":28, "y":0},
+ {"matrix":[0, 3], "flags":4, "x":42, "y":0},
+ {"matrix":[0, 4], "flags":4, "x":56, "y":0},
+ {"matrix":[0, 5], "flags":4, "x":70, "y":0},
+ {"matrix":[0, 6], "flags":4, "x":84, "y":0},
+ {"matrix":[0, 7], "flags":4, "x":98, "y":0},
+ {"matrix":[0, 8], "flags":4, "x":112, "y":0},
+ {"matrix":[0, 9], "flags":4, "x":126, "y":0},
+ {"matrix":[0, 10], "flags":4, "x":140, "y":0},
+ {"matrix":[0, 11], "flags":4, "x":154, "y":0},
+ {"matrix":[0, 12], "flags":4, "x":168, "y":0},
+ {"matrix":[0, 14], "flags":4, "x":196, "y":0},
+ {"matrix":[0, 15], "flags":4, "x":210, "y":0},
+ {"matrix":[0, 16], "flags":4, "x":224, "y":0},
+
+ {"matrix":[1, 0], "flags":1, "x":0, "y":13},
+ {"matrix":[1, 1], "flags":4, "x":14, "y":13},
+ {"matrix":[1, 2], "flags":4, "x":28, "y":13},
+ {"matrix":[1, 3], "flags":4, "x":42, "y":13},
+ {"matrix":[1, 4], "flags":4, "x":56, "y":13},
+ {"matrix":[1, 5], "flags":4, "x":70, "y":13},
+ {"matrix":[1, 6], "flags":4, "x":84, "y":13},
+ {"matrix":[1, 7], "flags":4, "x":98, "y":13},
+ {"matrix":[1, 8], "flags":4, "x":112, "y":13},
+ {"matrix":[1, 9], "flags":4, "x":126, "y":13},
+ {"matrix":[1, 10], "flags":4, "x":140, "y":13},
+ {"matrix":[1, 11], "flags":4, "x":154, "y":13},
+ {"matrix":[1, 12], "flags":1, "x":168, "y":13},
+ {"matrix":[1, 13], "flags":4, "x":182, "y":13},
+ {"matrix":[1, 14], "flags":4, "x":196, "y":13},
+ {"matrix":[1, 15], "flags":4, "x":210, "y":13},
+ {"matrix":[1, 16], "flags":4, "x":224, "y":13},
+
+ {"matrix":[2, 0], "flags":1, "x":0, "y":26},
+ {"matrix":[2, 1], "flags":4, "x":14, "y":26},
+ {"matrix":[2, 2], "flags":4, "x":28, "y":26},
+ {"matrix":[2, 3], "flags":4, "x":42, "y":26},
+ {"matrix":[2, 4], "flags":4, "x":56, "y":26},
+ {"matrix":[2, 5], "flags":4, "x":70, "y":26},
+ {"matrix":[2, 6], "flags":4, "x":84, "y":26},
+ {"matrix":[2, 7], "flags":4, "x":98, "y":26},
+ {"matrix":[2, 8], "flags":4, "x":112, "y":26},
+ {"matrix":[2, 9], "flags":4, "x":118, "y":26},
+ {"matrix":[2, 10], "flags":4, "x":140, "y":26},
+ {"matrix":[2, 11], "flags":4, "x":154, "y":26},
+ {"matrix":[2, 12], "flags":4, "x":168, "y":26},
+ {"matrix":[2, 13], "flags":4, "x":182, "y":26},
+ {"matrix":[2, 14], "flags":4, "x":196, "y":26},
+ {"matrix":[2, 15], "flags":4, "x":210, "y":26},
+ {"matrix":[2, 16], "flags":4, "x":224, "y":26},
+
+ {"matrix":[3, 0], "flags":1, "x":0, "y":38},
+ {"matrix":[3, 1], "flags":4, "x":14, "y":38},
+ {"matrix":[3, 2], "flags":4, "x":28, "y":38},
+ {"matrix":[3, 3], "flags":4, "x":42, "y":38},
+ {"matrix":[3, 4], "flags":4, "x":56, "y":38},
+ {"matrix":[3, 5], "flags":4, "x":70, "y":38},
+ {"matrix":[3, 6], "flags":4, "x":84, "y":38},
+ {"matrix":[3, 7], "flags":4, "x":98, "y":38},
+ {"matrix":[3, 8], "flags":4, "x":112, "y":38},
+ {"matrix":[3, 9], "flags":4, "x":126, "y":38},
+ {"matrix":[3, 10], "flags":4, "x":140, "y":38},
+ {"matrix":[3, 11], "flags":4, "x":154, "y":38},
+ {"matrix":[3, 13], "flags":1, "x":182, "y":38},
+
+ {"matrix":[4, 0], "flags":1, "x":8, "y":51},
+ {"matrix":[4, 2], "flags":4, "x":28, "y":51},
+ {"matrix":[4, 3], "flags":4, "x":42, "y":51},
+ {"matrix":[4, 4], "flags":4, "x":56, "y":51},
+ {"matrix":[4, 5], "flags":4, "x":70, "y":51},
+ {"matrix":[4, 6], "flags":4, "x":84, "y":51},
+ {"matrix":[4, 7], "flags":4, "x":98, "y":51},
+ {"matrix":[4, 8], "flags":4, "x":112, "y":51},
+ {"matrix":[4, 9], "flags":4, "x":126, "y":51},
+ {"matrix":[4, 10], "flags":4, "x":140, "y":51},
+ {"matrix":[4, 11], "flags":4, "x":154, "y":51},
+ {"matrix":[4, 13], "flags":1, "x":182, "y":51},
+ {"matrix":[4, 15], "flags":4, "x":210, "y":51},
+
+ {"matrix":[5, 0], "flags":1, "x":0, "y":64},
+ {"matrix":[5, 1], "flags":1, "x":14, "y":64},
+ {"matrix":[5, 2], "flags":1, "x":28, "y":64},
+ {"matrix":[5, 6], "flags":4, "x":84, "y":64},
+ {"matrix":[5, 10], "flags":1, "x":140, "y":64},
+ {"matrix":[5, 11], "flags":1, "x":154, "y":64},
+ {"matrix":[5, 12], "flags":1, "x":168, "y":64},
+ {"matrix":[5, 13], "flags":1, "x":182, "y":64},
+ {"matrix":[5, 14], "flags":4, "x":196, "y":64},
+ {"matrix":[5, 15], "flags":4, "x":210, "y":64},
+ {"matrix":[5, 16], "flags":4, "x":224, "y":64}
+ ],
+ "sleep": true
+ }
+}
diff --git a/keyboards/keychron/c1/rgb/keymaps/default/keymap.c b/keyboards/keychron/c1/rgb/keymaps/default/keymap.c
new file mode 100644
index 000000000000..df7350dcbce6
--- /dev/null
+++ b/keyboards/keychron/c1/rgb/keymaps/default/keymap.c
@@ -0,0 +1,106 @@
+/*
+Copyright 2024 NetUserGet
+
+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 .
+*/
+#include QMK_KEYBOARD_H
+
+// 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.
+
+enum layer_names {
+ WIN_BASE,
+ WIN_FN,
+ MAC_BASE,
+ MAC_FN,
+};
+
+#define KC_TASK LGUI(KC_TAB) // Task viewer
+#define KC_FLXP LGUI(KC_E) // Windows file explorer
+#define KC_SNIP LGUI(LSFT(KC_S)) // Windows snip tool
+
+#define KC_MSSN LGUI(KC_F3) // Mission Control
+#define KC_FIND LALT(LGUI(KC_SPC)) // Finder
+#define KC_SIRI LGUI(KC_SPC) // Siri
+#define KC_MSCR LSFT(LGUI(KC_3)) // Mac screenshot
+#define KC_MSNP LSFT(LGUI(KC_4)) // Mac snip tool
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* Windows layout
+ +-------------------------------------------------------------------------------------------+
+ | ESC | | F1 | F2 | F3 | F4 | | F5 | F6 | F7 | F8 | | F9| F10| F11| F12| | |PSCR|CORT|RGB |
+ +--------------------------------------------------------------------------+ +--------------+
+ | ~ | 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 |
+ +-------------------------------------------------------------------------------------------+
+ */
+ [WIN_BASE] = LAYOUT_tkl_ansi(
+ 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_NO , RGB_MOD,
+ 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, KC_RGUI, MO(WIN_FN),KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ),
+
+ [WIN_FN] = LAYOUT_tkl_ansi(
+ Q_RESET, KC_BRID, KC_BRIU, KC_TASK, KC_FLXP, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_SNIP, _______, RGB_TOG,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, QK_RBT, _______, _______, _______, _______, _______, _______, RGB_HUI,
+ _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAD, RGB_HUD, RGB_SAI ),
+
+ /* Mac layout
+ +-------------------------------------------------------------------------------------------+
+ | ESC | | F1 | F2 | F3 | F4 | | F5 | F6 | F7 | F8 | | F9| F10| F11| F12| | |PSCR|SIRI|RGB |
+ +--------------------------------------------------------------------------+ +--------------+
+ | ~ | 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| LALT| LGUI | SPACE | RGUI| RALT | FN | RCTRL | |LFT |DWN |RGT |
+ +-------------------------------------------------------------------------------------------+
+ */
+ [MAC_BASE] = LAYOUT_tkl_ansi(
+ 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_MSCR, KC_SIRI, RGB_MOD,
+ 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_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, MO(MAC_FN),KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ),
+
+ [MAC_FN] = LAYOUT_tkl_ansi(
+ Q_RESET, KC_BRID, KC_BRIU, KC_MSSN, KC_FIND, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_MSNP, _______, RGB_TOG,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, QK_RBT, _______, _______, _______, _______, _______, _______, RGB_HUI,
+ _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAD, RGB_HUD, RGB_SAI ),
+
+};
+
+
diff --git a/keyboards/keychron/c1/rgb/keymaps/via/keymap.c b/keyboards/keychron/c1/rgb/keymaps/via/keymap.c
new file mode 100644
index 000000000000..df7350dcbce6
--- /dev/null
+++ b/keyboards/keychron/c1/rgb/keymaps/via/keymap.c
@@ -0,0 +1,106 @@
+/*
+Copyright 2024 NetUserGet
+
+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 .
+*/
+#include QMK_KEYBOARD_H
+
+// 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.
+
+enum layer_names {
+ WIN_BASE,
+ WIN_FN,
+ MAC_BASE,
+ MAC_FN,
+};
+
+#define KC_TASK LGUI(KC_TAB) // Task viewer
+#define KC_FLXP LGUI(KC_E) // Windows file explorer
+#define KC_SNIP LGUI(LSFT(KC_S)) // Windows snip tool
+
+#define KC_MSSN LGUI(KC_F3) // Mission Control
+#define KC_FIND LALT(LGUI(KC_SPC)) // Finder
+#define KC_SIRI LGUI(KC_SPC) // Siri
+#define KC_MSCR LSFT(LGUI(KC_3)) // Mac screenshot
+#define KC_MSNP LSFT(LGUI(KC_4)) // Mac snip tool
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* Windows layout
+ +-------------------------------------------------------------------------------------------+
+ | ESC | | F1 | F2 | F3 | F4 | | F5 | F6 | F7 | F8 | | F9| F10| F11| F12| | |PSCR|CORT|RGB |
+ +--------------------------------------------------------------------------+ +--------------+
+ | ~ | 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 |
+ +-------------------------------------------------------------------------------------------+
+ */
+ [WIN_BASE] = LAYOUT_tkl_ansi(
+ 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_NO , RGB_MOD,
+ 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, KC_RGUI, MO(WIN_FN),KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ),
+
+ [WIN_FN] = LAYOUT_tkl_ansi(
+ Q_RESET, KC_BRID, KC_BRIU, KC_TASK, KC_FLXP, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_SNIP, _______, RGB_TOG,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, QK_RBT, _______, _______, _______, _______, _______, _______, RGB_HUI,
+ _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAD, RGB_HUD, RGB_SAI ),
+
+ /* Mac layout
+ +-------------------------------------------------------------------------------------------+
+ | ESC | | F1 | F2 | F3 | F4 | | F5 | F6 | F7 | F8 | | F9| F10| F11| F12| | |PSCR|SIRI|RGB |
+ +--------------------------------------------------------------------------+ +--------------+
+ | ~ | 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| LALT| LGUI | SPACE | RGUI| RALT | FN | RCTRL | |LFT |DWN |RGT |
+ +-------------------------------------------------------------------------------------------+
+ */
+ [MAC_BASE] = LAYOUT_tkl_ansi(
+ 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_MSCR, KC_SIRI, RGB_MOD,
+ 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_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, MO(MAC_FN),KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ),
+
+ [MAC_FN] = LAYOUT_tkl_ansi(
+ Q_RESET, KC_BRID, KC_BRIU, KC_MSSN, KC_FIND, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_MSNP, _______, RGB_TOG,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, QK_RBT, _______, _______, _______, _______, _______, _______, RGB_HUI,
+ _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAD, RGB_HUD, RGB_SAI ),
+
+};
+
+
diff --git a/keyboards/keychron/c1/rgb/keymaps/via/rules.mk b/keyboards/keychron/c1/rgb/keymaps/via/rules.mk
new file mode 100644
index 000000000000..1e5b99807cb7
--- /dev/null
+++ b/keyboards/keychron/c1/rgb/keymaps/via/rules.mk
@@ -0,0 +1 @@
+VIA_ENABLE = yes
diff --git a/keyboards/keychron/c1/rgb/readme.md b/keyboards/keychron/c1/rgb/readme.md
new file mode 100644
index 000000000000..edfe86a6c478
--- /dev/null
+++ b/keyboards/keychron/c1/rgb/readme.md
@@ -0,0 +1,95 @@
+# Keychron C1 RGB Hot-swappable
+
+![Keychron C1](https://i.imgur.com/oB9h56v.png)
+
+A customizable TKL keyboard.
+
+* Keyboard Maintainer(s): [SonixQMK](https://github.com/SonixQMK), [IsaacDynamo](https://github.com/IsaacDynamo), [noldevin](https://github.com/noldevin), [vjdato21](https://github.com/vjdato21) [NetUserGet](https://github.com/NetUserGet)
+* Hardware Supported: Keychron C1 RGB Hot-swappable
+* Hardware Availability: [Keychron](https://www.keychron.com/products/keychron-c1-wired-mechanical-keyboard?variant=32321246986329)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make keychron/c1/rgb:default
+Flashing example for this keyboard:
+1. If your keyboard currently has stock firmware installed, put your keyboard first into bootloader by shorting the boot pins found under the spacebar before plugging in your keyboard to the PC. Otherwise, press `Fn + Esc` to put your keyboard into bootloader.
+1. Download and run [Sonix Flasher](https://github.com/SonixQMK/sonix-flasher/releases).
+1. In Sonix Flasher, select `SN32F24X` under 'Device'. And select `0x00` as the qmk offset.
+1. Lastly, click 'Flash QMK...' and find the compiled firmware.
+
+* * *
+# Firmware Details
+### Firmware Version:
+* Default - 0.7.101
+* VIA - Supported
+* * *
+# Keymapping
+### Windows Mode
+
+
+Without Fn | With Fn
+---------- | -------
+F1 | Decrease PC Brightness
+F2 | Increase PC Brightness
+F3 | Task View
+F4 | File Explorer
+F5 | Decrease KB Brightness
+F6 | Increase KB Brightness
+F7 | Previous Track
+F8 | Play/Pause Track
+F9 | Next Track
+F10 | Mute
+F11 | Decrease Volume
+F12 | Increase Volume
+Print Screen | Snip & Sketch
+Change RGB | Toggle RGB
+Home | Increase RGB Saturation
+End | Decrease RGB Saturation
+Page Up | Increase RGB Hue
+Page Down | Decrease RGB Hue
+↑ | Increase RGB Hue
+← | Decrease RGB Saturation
+↓ | Decrease RGB Hue
+→ | Increase RGB Saturation
+
+
+
+### Mac Mode
+
+
+Without Fn | With Fn
+---------- | -------
+F1 | Decrease PC Brightness
+F2 | Increase PC Brightness
+F3 | Mission Control
+F4 | Finder
+F5 | Decrease KB Brightness
+F6 | Increase KB Brightness
+F7 | Previous Track
+F8 | Play/Pause Track
+F9 | Next Track
+F10 | Mute
+F11 | Decrease Volume
+F12 | Increase Volume
+Take a screenshot (whole screen) | Take a screenshot (specific area)
+Siri (hold down) | None
+Change RGB | Toggle RGB
+Home | Increase RGB Saturation
+End | Decrease RGB Saturation
+Page Up | Increase RGB Hue
+Page Down | Decrease RGB Hue
+↑ | Increase RGB Hue
+← | Decrease RGB Saturation
+↓ | Decrease RGB Hue
+→ | Increase RGB Saturation
+
+
+
+In an occassion that the keyboard does not send keystrokes to your PC, press `Fn + B`. This will restart your keyboard and should resolve the problem.
+* * *
+
+In an occassion that the keyboard does not send keystrokes to your PC, press `Fn + B`. This will restart your keyboard and should resolve the problem.
+
+For more information and more detailed flashing instructions, please visit https://github.com/CanUnesi/QMK-on-K6#readme
+
+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).
diff --git a/keyboards/keychron/c1/rgb/rgb.c b/keyboards/keychron/c1/rgb/rgb.c
new file mode 100644
index 000000000000..64e285c6f9cc
--- /dev/null
+++ b/keyboards/keychron/c1/rgb/rgb.c
@@ -0,0 +1,72 @@
+/* Copyright 2024 NetUserGet
+ *
+ * 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 .
+ */
+
+#include "quantum.h"
+
+bool mode_leds_show = true;
+
+enum layer_names {
+ WIN_BASE,
+ WIN_FN,
+ MAC_BASE,
+ MAC_FN,
+}; /* Taken from the default keymap for readability */
+
+#ifdef DIP_SWITCH_ENABLE
+ static void mode_leds_update(void){
+ if (mode_leds_show && layer_state_is(WIN_BASE)) {
+ gpio_write_pin_high(LED_WIN_PIN);
+ } else if (mode_leds_show && layer_state_is(MAC_BASE)) {
+ gpio_write_pin_high(LED_MAC_PIN);
+ }
+ }
+
+ bool dip_switch_update_kb(uint8_t index, bool active) {
+ if (!dip_switch_update_user(index, active)) {
+ return false;
+ }
+ if (index == 0) {
+ default_layer_set(active ? MAC_BASE : WIN_BASE);
+ }
+
+ mode_leds_update();
+ return true;
+ }
+
+ void keyboard_pre_init_kb(void) {
+ // Setup Win & Mac LED Pins as output
+ gpio_set_pin_output(LED_WIN_PIN);
+ gpio_set_pin_output(LED_MAC_PIN);
+ }
+#endif // DIP_SWITCH_ENABLE
+
+
+#ifdef RGB_MATRIX_SLEEP
+ void suspend_power_down_kb(void) {
+ // Turn leds off
+ mode_leds_show = false;
+ mode_leds_update();
+
+ rgb_matrix_set_suspend_state(true);
+ }
+
+ void suspend_wakeup_init_kb(void) {
+ mode_leds_show = true;
+ mode_leds_update();
+
+ rgb_matrix_set_suspend_state(false);
+ }
+#endif // RGB_MATRIX_SLEEP