Skip to content

Commit

Permalink
Add Keychron C1 RGB support. (#386)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
NetUserGet authored Jul 5, 2024
1 parent 2883cd8 commit a55b7bf
Show file tree
Hide file tree
Showing 8 changed files with 885 additions and 0 deletions.
228 changes: 228 additions & 0 deletions keyboards/keychron/c1/rgb/c1_rgb_via.json
Original file line number Diff line number Diff line change
@@ -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"
]
]
}
}
20 changes: 20 additions & 0 deletions keyboards/keychron/c1/rgb/config.h
Original file line number Diff line number Diff line change
@@ -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 <http://www.gnu.org/licenses/>.
*/
#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
Loading

0 comments on commit a55b7bf

Please sign in to comment.