From 4ebb7e6ee3d1fca1ffe1ef3cfad26f944a48dd52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=B8rch?= Date: Sun, 29 Jan 2023 13:54:25 +0100 Subject: [PATCH] [Keychron K8] Rewriting K8 to use info.json format (#316) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Squashed commit of the following: commit 0533d612940cebf23913dbdf8830e08c8508069b Author: Nick Brassel Date: Thu Jul 7 08:56:39 2022 +1000 Update keyboard.jsonschema Oops. commit 95d6beb514afa60c3833a26e185e9ff58f35a7b7 Merge: ea8b4d861c 744af003be Author: Nick Brassel Date: Thu Jul 7 08:55:27 2022 +1000 Merge branch 'develop' into sonix commit ea8b4d861c33b86a8ab9ffda524c064367e80f1b Author: Dimitris Mantzouranis Date: Sun Feb 13 15:23:10 2022 +0200 update configs for chibios 2.11 commit 45fd6d3762c051f98507423a56486b83d57e838b Author: Dimitris Mantzouranis Date: Thu Mar 3 18:31:14 2022 +0200 use wait function for bootloader_jump commit 3a3b6214f1b68d0f01ce26e8246b6af3a951fec6 Author: Dimitris Mantzouranis Date: Thu Mar 3 17:41:48 2022 +0200 add sonix sn32 in docs commit 4fbcb682fa8e9cdd6efd0099ea3b5e9018efb8cc Author: Dimitris Mantzouranis Date: Thu Mar 3 14:57:18 2022 +0200 sonix sn32f2xx platform support * Update BL * Add OneKey * Fix jsonschema, fix missing mcu_reset * remove old eeprom code * simplify configs based on common ones * 260: add board specific chconf * fall back to periodic tic timers aren't as good as we'd like. The VT in charge of them causes mayhem on double-buffered timers like CT16, resulting in random timekeeping * common chconf.h: allow custom idle hooks * Revert "common chconf.h: allow custom idle hooks" This reverts commit 92d5f9989ad0c0f740d70167966a3d937d272fbb. * apparently you can just cheese the preprocessor nice * move usb specifics out of chibios configs * more config cleanup * 260: cleanup config.h * Wear-Leveling driver for SN32 platform * Fix typo on store_erase * Rename SN32 WL driver, guard the last page * Change page count * Update ChibiOS-Contrib submodule * Revert "fall back to periodic tic" This reverts commit a39707f4746f0635dcad2dc81a84e01dd2d3b394. * Add k8 converted to info.json * Cleanup rules.mk * Move eeprom config to common k8, and verify via setup * Fix via_iso compile error * Sonix SN32 platform support Squashed commit of the following: commit c2a505582c7f2acb70d402a52bd28dc66d1812e4 Merge: 74b1b548a7 0c6e12c491 Author: dexter93 Date: Thu Oct 27 21:21:55 2022 +0300 Merge pull request #12 from dexter93/revert-11-sn32_up_wl Revert "Wear Leveling driver for SN32 platform" commit 0c6e12c4912a0d7479e3d614a86d9dc728247832 Author: dexter93 Date: Thu Oct 27 21:21:35 2022 +0300 Revert "Wear Leveling driver for SN32 platform" commit 74b1b548a7344895eb418fb72597b9fe84c3a439 Merge: 95b9528b25 3f4d1cb504 Author: dexter93 Date: Thu Oct 27 19:35:46 2022 +0300 Merge pull request #11 from Jpe230/sn32_up_wl Wear Leveling driver for SN32 platform commit 3f4d1cb504fa947bac8bd3e6156325c980c50ad5 Author: pablin.123.ra@gmail.com Date: Wed Oct 12 15:42:04 2022 -0500 Change page count commit 77f358d65c6d10ab9886ac72c7569cf161c5b57a Author: pablin.123.ra@gmail.com Date: Wed Oct 12 15:32:43 2022 -0500 Rename SN32 WL driver, guard the last page commit 40a8d85167d98905041d740d2742e4cae1c3b8b8 Author: pablin.123.ra@gmail.com Date: Wed Oct 12 15:14:22 2022 -0500 Fix typo on store_erase commit 95b9528b258df23ad05fbcbb759000a48f802552 Author: Dimitris Mantzouranis Date: Wed Oct 12 23:11:54 2022 +0300 260: cleanup config.h commit 2dc6b43ca20eafb9e75363cf9bde977bd2327761 Author: pablin.123.ra@gmail.com Date: Wed Oct 12 15:05:41 2022 -0500 Wear-Leveling driver for SN32 platform commit b21897a5a751650fe325a64b62c8f169ca79901d Author: Dimitris Mantzouranis Date: Wed Oct 12 22:50:33 2022 +0300 more config cleanup commit 4660b56ffb8da37293b925172e890b984de2f572 Author: Dimitris Mantzouranis Date: Wed Oct 12 22:37:36 2022 +0300 move usb specifics out of chibios configs commit d6c60575b6e74624ec15c05dceec702212f32f35 Author: Dimitris Mantzouranis Date: Wed Oct 12 22:02:43 2022 +0300 apparently you can just cheese the preprocessor nice commit 7c847581c569c689b367d5fec6f41dff55416b50 Author: Dimitris Mantzouranis Date: Wed Oct 12 21:58:44 2022 +0300 Revert "common chconf.h: allow custom idle hooks" This reverts commit 92d5f9989ad0c0f740d70167966a3d937d272fbb. commit 92d5f9989ad0c0f740d70167966a3d937d272fbb Author: Dimitris Mantzouranis Date: Wed Oct 12 21:17:08 2022 +0300 common chconf.h: allow custom idle hooks commit a39707f4746f0635dcad2dc81a84e01dd2d3b394 Author: Dimitris Mantzouranis Date: Wed Oct 12 21:06:45 2022 +0300 fall back to periodic tic timers aren't as good as we'd like. The VT in charge of them causes mayhem on double-buffered timers like CT16, resulting in random timekeeping commit 2e95cef89a68dbcc6788ec9093c89f1d3e8c69b5 Author: Dimitris Mantzouranis Date: Wed Oct 12 21:02:01 2022 +0300 260: add board specific chconf commit 78ee352b1a6520daa408cfbab1d1ff99f41f7b31 Author: Dimitris Mantzouranis Date: Wed Oct 12 20:59:10 2022 +0300 simplify configs based on common ones commit 33a4e823a0f224c4f8bc930ef7e69b071566c24f Author: Dimitris Mantzouranis Date: Wed Oct 12 20:53:20 2022 +0300 remove old eeprom code commit 90d9af272769a99b356c2c8520f03b23a733b20f Author: pablin.123.ra@gmail.com Date: Sat Oct 8 17:15:16 2022 -0500 Fix jsonschema, fix missing mcu_reset commit 14e35416cec31b440c2ae93000ccb5379981241a Author: pablin.123.ra@gmail.com Date: Sat Oct 8 17:10:26 2022 -0500 Add OneKey commit 420b9137036f9de495ec711ed21a9aa106148a70 Author: pablin.123.ra@gmail.com Date: Sat Oct 8 17:04:49 2022 -0500 Update BL commit 4f4408a3285a827d8489d7b6ddb0b85e92ad59da Author: pablin.123.ra@gmail.com Date: Sat Oct 8 17:03:32 2022 -0500 Squashed commit of the following: commit 0533d612940cebf23913dbdf8830e08c8508069b Author: Nick Brassel Date: Thu Jul 7 08:56:39 2022 +1000 Update keyboard.jsonschema Oops. commit 95d6beb514afa60c3833a26e185e9ff58f35a7b7 Merge: ea8b4d861c 744af003be Author: Nick Brassel Date: Thu Jul 7 08:55:27 2022 +1000 Merge branch 'develop' into sonix commit ea8b4d861c33b86a8ab9ffda524c064367e80f1b Author: Dimitris Mantzouranis Date: Sun Feb 13 15:23:10 2022 +0200 update configs for chibios 2.11 commit 45fd6d3762c051f98507423a56486b83d57e838b Author: Dimitris Mantzouranis Date: Thu Mar 3 18:31:14 2022 +0200 use wait function for bootloader_jump commit 3a3b6214f1b68d0f01ce26e8246b6af3a951fec6 Author: Dimitris Mantzouranis Date: Thu Mar 3 17:41:48 2022 +0200 add sonix sn32 in docs commit 4fbcb682fa8e9cdd6efd0099ea3b5e9018efb8cc Author: Dimitris Mantzouranis Date: Thu Mar 3 14:57:18 2022 +0200 sonix sn32f2xx platform support * Move led matrix config to info.json file * removed all keyboard .c / .h files * Remove define for LED_PIN_ON_STATE * Remove rules.mk from ansi keymap * Clean up led count defines * Rework rules.mk * Wear-Leveling driver for SN32 platform Squashed commit of the following: commit 3825989990504208ab3e5479172de2b5a112faeb Author: pablin.123.ra@gmail.com Date: Wed Oct 12 15:42:04 2022 -0500 Change page count commit 5d1aa4b9f580bac0a4e337d403b1038f30ea69d3 Author: pablin.123.ra@gmail.com Date: Wed Oct 12 15:32:43 2022 -0500 Rename SN32 WL driver, guard the last page commit 581986bc92c7f5c21eac3e1177ea8de9ff4b2ee0 Author: pablin.123.ra@gmail.com Date: Wed Oct 12 15:14:22 2022 -0500 Fix typo on store_erase commit e31f2d153a549041dcf6724180e988527632a29d Author: pablin.123.ra@gmail.com Date: Wed Oct 12 15:05:41 2022 -0500 Wear-Leveling driver for SN32 platform * Swap Chibios-Contrib for latest sn32_develop * Missing piece, CUSTOM_MATRIX * Remove custom matrix thing again * Move more to info.json, and fix readme files * missing readme file updates * Update USB settings in info.json files * centralize usb VID setting * Remove unnecessary eeprom setup * Correct info.json * revert gitmodules * chibios-contrib back to origin * simplifying via json files * Updateeeprom settings for ansi via * Updates after review * Remake via ansi to use standard windows ansi layout * Fix missing defines --------- Co-authored-by: pablin.123.ra@gmail.com Co-authored-by: Dimitris Mantzouranis Co-authored-by: Thomas Bowman Mørch --- keyboards/keychron/k8/readme.md | 16 ++ keyboards/keychron/k8/rgb/ansi/config.h | 20 ++ keyboards/keychron/k8/rgb/ansi/info.json | 196 +++++++++++++++++ keyboards/keychron/k8/rgb/ansi/readme.md | 12 ++ keyboards/keychron/k8/rgb/ansi/rules.mk | 2 + keyboards/keychron/k8/rgb/config.h | 82 +++++++ keyboards/keychron/k8/rgb/info.json | 35 +++ keyboards/keychron/k8/rgb/iso/config.h | 20 ++ keyboards/keychron/k8/rgb/iso/info.json | 203 ++++++++++++++++++ keyboards/keychron/k8/rgb/iso/readme.md | 12 ++ keyboards/keychron/k8/rgb/iso/rules.mk | 2 + .../keychron/k8/rgb/keymaps/ansi/keymap.c | 140 ++++++++++++ .../keychron/k8/rgb/keymaps/default/keymap.c | 101 +++++++++ .../keychron/k8/rgb/keymaps/iso/keymap.c | 139 ++++++++++++ .../keychron/k8/rgb/keymaps/via/config.h | 22 ++ .../k8/rgb/keymaps/via/k8_via_ansi.json | 17 ++ .../rgb/keymaps/via/k8_via_ansi_optical.json | 17 ++ .../keychron/k8/rgb/keymaps/via/keymap.c | 105 +++++++++ .../keychron/k8/rgb/keymaps/via/rules.mk | 1 + .../keychron/k8/rgb/keymaps/via_iso/config.h | 22 ++ .../k8/rgb/keymaps/via_iso/k8_via_iso.json | 17 ++ .../keychron/k8/rgb/keymaps/via_iso/keymap.c | 104 +++++++++ .../keychron/k8/rgb/keymaps/via_iso/rules.mk | 1 + .../keychron/k8/rgb/optical_ansi/config.h | 19 ++ .../keychron/k8/rgb/optical_ansi/info.json | 198 +++++++++++++++++ .../keychron/k8/rgb/optical_ansi/readme.md | 12 ++ .../keychron/k8/rgb/optical_ansi/rules.mk | 2 + .../keychron/k8/rgb/optical_iso/config.h | 20 ++ .../keychron/k8/rgb/optical_iso/info.json | 200 +++++++++++++++++ .../keychron/k8/rgb/optical_iso/readme.md | 14 ++ .../keychron/k8/rgb/optical_iso/rules.mk | 2 + keyboards/keychron/k8/rgb/readme.md | 16 ++ 32 files changed, 1769 insertions(+) create mode 100644 keyboards/keychron/k8/readme.md create mode 100644 keyboards/keychron/k8/rgb/ansi/config.h create mode 100644 keyboards/keychron/k8/rgb/ansi/info.json create mode 100644 keyboards/keychron/k8/rgb/ansi/readme.md create mode 100644 keyboards/keychron/k8/rgb/ansi/rules.mk create mode 100644 keyboards/keychron/k8/rgb/config.h create mode 100644 keyboards/keychron/k8/rgb/info.json create mode 100644 keyboards/keychron/k8/rgb/iso/config.h create mode 100644 keyboards/keychron/k8/rgb/iso/info.json create mode 100644 keyboards/keychron/k8/rgb/iso/readme.md create mode 100644 keyboards/keychron/k8/rgb/iso/rules.mk create mode 100644 keyboards/keychron/k8/rgb/keymaps/ansi/keymap.c create mode 100644 keyboards/keychron/k8/rgb/keymaps/default/keymap.c create mode 100644 keyboards/keychron/k8/rgb/keymaps/iso/keymap.c create mode 100644 keyboards/keychron/k8/rgb/keymaps/via/config.h create mode 100644 keyboards/keychron/k8/rgb/keymaps/via/k8_via_ansi.json create mode 100644 keyboards/keychron/k8/rgb/keymaps/via/k8_via_ansi_optical.json create mode 100644 keyboards/keychron/k8/rgb/keymaps/via/keymap.c create mode 100644 keyboards/keychron/k8/rgb/keymaps/via/rules.mk create mode 100644 keyboards/keychron/k8/rgb/keymaps/via_iso/config.h create mode 100644 keyboards/keychron/k8/rgb/keymaps/via_iso/k8_via_iso.json create mode 100644 keyboards/keychron/k8/rgb/keymaps/via_iso/keymap.c create mode 100644 keyboards/keychron/k8/rgb/keymaps/via_iso/rules.mk create mode 100644 keyboards/keychron/k8/rgb/optical_ansi/config.h create mode 100644 keyboards/keychron/k8/rgb/optical_ansi/info.json create mode 100644 keyboards/keychron/k8/rgb/optical_ansi/readme.md create mode 100644 keyboards/keychron/k8/rgb/optical_ansi/rules.mk create mode 100644 keyboards/keychron/k8/rgb/optical_iso/config.h create mode 100644 keyboards/keychron/k8/rgb/optical_iso/info.json create mode 100644 keyboards/keychron/k8/rgb/optical_iso/readme.md create mode 100644 keyboards/keychron/k8/rgb/optical_iso/rules.mk create mode 100644 keyboards/keychron/k8/rgb/readme.md diff --git a/keyboards/keychron/k8/readme.md b/keyboards/keychron/k8/readme.md new file mode 100644 index 000000000000..a5db6fe19086 --- /dev/null +++ b/keyboards/keychron/k8/readme.md @@ -0,0 +1,16 @@ +# Keychron K8 + +K8 Gateron Hotswap RGB + +Make example for this keyboard (after setting up your build environment): + + make keychron/k8/rgb/ansi:ansi + +For default ISO: + + make keychron/k8/rgb/iso:iso + +* * * +For more info and detailed flashing instructions, please visit https://github.com/alex-dinh/keychron-k8 + +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/k8/rgb/ansi/config.h b/keyboards/keychron/k8/rgb/ansi/config.h new file mode 100644 index 000000000000..b92b602a66fc --- /dev/null +++ b/keyboards/keychron/k8/rgb/ansi/config.h @@ -0,0 +1,20 @@ +/* Copyright 2020 Adam Honse + * Copyright 2020 Dimitris Mantzouranis + * Copyright 2022 Harrison Chan (Xelus) + * + * 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 . + */ + +// RGB Matrix Config +#define RGB_MATRIX_LED_COUNT 87 diff --git a/keyboards/keychron/k8/rgb/ansi/info.json b/keyboards/keychron/k8/rgb/ansi/info.json new file mode 100644 index 000000000000..d1152b200ab1 --- /dev/null +++ b/keyboards/keychron/k8/rgb/ansi/info.json @@ -0,0 +1,196 @@ +{ + "keyboard_name": "Keychron K8", + "usb": { + "pid": "0xFE0E" + }, + "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": { + "layout": [ + { "matrix": [ 0, 0 ], "flags": 1, "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": 1, "x": 84, "y": 0 }, + { "matrix": [ 0, 6 ], "flags": 1, "x": 97, "y": 0 }, + { "matrix": [ 0, 7 ], "flags": 1, "x": 110, "y": 0 }, + { "matrix": [ 0, 8 ], "flags": 1, "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, 14 ], "flags": 1, "x": 198, "y": 0 }, + { "matrix": [ 0, 15 ], "flags": 1, "x": 211, "y": 0 }, + { "matrix": [ 0, 16 ], "flags": 1, "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": 1, "x": 175, "y": 17 }, + { "matrix": [ 1, 14 ], "flags": 1, "x": 198, "y": 17 }, + { "matrix": [ 1, 15 ], "flags": 1, "x": 211, "y": 17 }, + { "matrix": [ 1, 16 ], "flags": 1, "x": 224, "y": 17 }, + { "matrix": [ 2, 0 ], "flags": 1, "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": 1, "x": 198, "y": 29 }, + { "matrix": [ 2, 15 ], "flags": 1, "x": 211, "y": 29 }, + { "matrix": [ 2, 16 ], "flags": 1, "x": 224, "y": 29 }, + { "matrix": [ 3, 0 ], "flags": 1, "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": 1, "x": 174, "y": 41 }, + { "matrix": [ 4, 0 ], "flags": 1, "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": 1, "x": 170, "y": 52 }, + { "matrix": [ 4, 15 ], "flags": 1, "x": 211, "y": 52 }, + { "matrix": [ 5, 0 ], "flags": 1, "x": 2, "y": 64 }, + { "matrix": [ 5, 1 ], "flags": 1, "x": 18, "y": 64 }, + { "matrix": [ 5, 2 ], "flags": 1, "x": 34, "y": 64 }, + { "matrix": [ 5, 6 ], "flags": 4, "x": 83, "y": 64 }, + { "matrix": [ 5, 10 ], "flags": 1, "x": 131, "y": 64 }, + { "matrix": [ 5, 11 ], "flags": 1, "x": 148, "y": 64 }, + { "matrix": [ 5, 12 ], "flags": 1, "x": 164, "y": 64 }, + { "matrix": [ 5, 13 ], "flags": 1, "x": 180, "y": 64 }, + { "matrix": [ 5, 14 ], "flags": 1, "x": 198, "y": 64 }, + { "matrix": [ 5, 15 ], "flags": 1, "x": 211, "y": 64 }, + { "matrix": [ 5, 16 ], "flags": 1, "x": 224, "y": 64 } + ] + } + +} diff --git a/keyboards/keychron/k8/rgb/ansi/readme.md b/keyboards/keychron/k8/rgb/ansi/readme.md new file mode 100644 index 000000000000..9c16c7ce316f --- /dev/null +++ b/keyboards/keychron/k8/rgb/ansi/readme.md @@ -0,0 +1,12 @@ +# Keychron K8 + +K8 ANSI RGB + +Make example for this keyboard (after setting up your build environment): + + make keychron/k8/rgb/ansi:ansi + +* * * +For more info and detailed flashing instructions, please visit https://github.com/alex-dinh/keychron-k8 + +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/k8/rgb/ansi/rules.mk b/keyboards/keychron/k8/rgb/ansi/rules.mk new file mode 100644 index 000000000000..047de4137dd5 --- /dev/null +++ b/keyboards/keychron/k8/rgb/ansi/rules.mk @@ -0,0 +1,2 @@ +EEPROM_DRIVER = wear_leveling +WEAR_LEVELING_DRIVER = sn32_flash diff --git a/keyboards/keychron/k8/rgb/config.h b/keyboards/keychron/k8/rgb/config.h new file mode 100644 index 000000000000..c931cbe81b50 --- /dev/null +++ b/keyboards/keychron/k8/rgb/config.h @@ -0,0 +1,82 @@ +/* Copyright 2020 Adam Honse + * Copyright 2020 Dimitris Mantzouranis + * Copyright 2022 Harrison Chan (Xelus) + * + * 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 + +#include "config_common.h" + +// Connects each switch in the dip switch to the GPIO pin of the MCU +#define DIP_SWITCH_PINS { D4, D5 } + +// RGB LED Config +#define LED_MATRIX_ROWS MATRIX_ROWS +#define LED_MATRIX_ROW_CHANNELS 3 +#define LED_MATRIX_ROWS_HW (LED_MATRIX_ROWS * LED_MATRIX_ROW_CHANNELS) +#define LED_MATRIX_ROW_PINS { C3, C1, C0, C6, C5, C4, C9, C8, C7, C12, C11, C10, B13, C14, C13, B14, B15, D3 } + +#define LED_MATRIX_COLS MATRIX_COLS +#define LED_MATRIX_COL_PINS MATRIX_COL_PINS + +// RGB Matrix Effects +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS +#define RGB_MATRIX_KEYPRESSES + +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_PIXEL_RAIN +#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL + +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN + +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define ENABLE_RGB_MATRIX_SPLASH +#define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH diff --git a/keyboards/keychron/k8/rgb/info.json b/keyboards/keychron/k8/rgb/info.json new file mode 100644 index 000000000000..798f0cf1ab6c --- /dev/null +++ b/keyboards/keychron/k8/rgb/info.json @@ -0,0 +1,35 @@ +{ + "keyboard_name": "Keychron K8", + "manufacturer": "Keychron", + "url": "https://www.keychron.com/products/keychron-k8-tenkeyless-wireless-mechanical-keyboard", + "processor": "SN32F248BF", + "maintainer": "tbowmo", + "bootloader": "sn32-dfu", + "debounce": 1, + "diode_direction": "COL2ROW", + "features": { + "rgb_matrix": true, + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": false, + "nkro": true, + "dip_switch": true + }, + "rgb_matrix": { + "driver": "SN32F24xB" + }, + "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"] + }, + "indicators": { + "caps_lock": "B12" + }, + "usb": { + "vid": "0x3434", + "device_version": "1.0.0", + "wait_for": false + } +} diff --git a/keyboards/keychron/k8/rgb/iso/config.h b/keyboards/keychron/k8/rgb/iso/config.h new file mode 100644 index 000000000000..d04c7a9cf816 --- /dev/null +++ b/keyboards/keychron/k8/rgb/iso/config.h @@ -0,0 +1,20 @@ +/* Copyright 2020 Adam Honse + * Copyright 2020 Dimitris Mantzouranis + * Copyright 2022 Harrison Chan (Xelus) + * + * 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 . + */ + +// RGB Matrix Config +#define RGB_MATRIX_LED_COUNT 89 diff --git a/keyboards/keychron/k8/rgb/iso/info.json b/keyboards/keychron/k8/rgb/iso/info.json new file mode 100644 index 000000000000..dfcfd68e12da --- /dev/null +++ b/keyboards/keychron/k8/rgb/iso/info.json @@ -0,0 +1,203 @@ +{ + "keyboard_name": "Keychron K8", + "usb": { + "pid": "0xFE0F" + }, + "layouts": { + "LAYOUT_tkl_iso": { + "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,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,12], "x":12.75, "y":3.25}, + {"matrix":[3,13], "x":13.75, "y":2.25, "w":1.25, "h":2}, + + {"matrix":[4, 0], "x":0, "y":4.25, "w":1.25}, + {"matrix":[4, 1], "x":1.25, "y":4.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": { + "layout": [ + { "matrix": [ 0, 0 ], "flags": 4, "x": 0, "y": 0 }, + { "matrix": [ 0, 1 ], "flags": 4, "x": 12, "y": 0 }, + { "matrix": [ 0, 2 ], "flags": 4, "x": 25, "y": 0 }, + { "matrix": [ 0, 3 ], "flags": 4, "x": 37, "y": 0 }, + { "matrix": [ 0, 4 ], "flags": 4, "x": 50, "y": 0 }, + { "matrix": [ 0, 5 ], "flags": 4, "x": 62, "y": 0 }, + { "matrix": [ 0, 6 ], "flags": 4, "x": 75, "y": 0 }, + { "matrix": [ 0, 7 ], "flags": 4, "x": 87, "y": 0 }, + { "matrix": [ 0, 8 ], "flags": 4, "x": 100, "y": 0 }, + { "matrix": [ 0, 9 ], "flags": 4, "x": 112, "y": 0 }, + { "matrix": [ 0, 10 ], "flags": 4, "x": 124, "y": 0 }, + { "matrix": [ 0, 11 ], "flags": 4, "x": 137, "y": 0 }, + { "matrix": [ 0, 12 ], "flags": 4, "x": 149, "y": 0 }, + { "matrix": [ 0, 14 ], "flags": 4, "x": 174, "y": 0 }, + { "matrix": [ 0, 15 ], "flags": 4, "x": 187, "y": 0 }, + { "matrix": [ 0, 16 ], "flags": 4, "x": 199, "y": 0 }, + + { "matrix": [ 1, 0 ], "flags": 4, "x": 0, "y": 13 }, + { "matrix": [ 1, 1 ], "flags": 4, "x": 12, "y": 13 }, + { "matrix": [ 1, 2 ], "flags": 4, "x": 25, "y": 13 }, + { "matrix": [ 1, 3 ], "flags": 4, "x": 37, "y": 13 }, + { "matrix": [ 1, 4 ], "flags": 4, "x": 50, "y": 13 }, + { "matrix": [ 1, 5 ], "flags": 4, "x": 62, "y": 13 }, + { "matrix": [ 1, 6 ], "flags": 4, "x": 75, "y": 13 }, + { "matrix": [ 1, 7 ], "flags": 4, "x": 87, "y": 13 }, + { "matrix": [ 1, 8 ], "flags": 4, "x": 100, "y": 13 }, + { "matrix": [ 1, 9 ], "flags": 4, "x": 112, "y": 13 }, + { "matrix": [ 1, 10 ], "flags": 4, "x": 124, "y": 13 }, + { "matrix": [ 1, 11 ], "flags": 4, "x": 137, "y": 13 }, + { "matrix": [ 1, 12 ], "flags": 4, "x": 149, "y": 13 }, + { "matrix": [ 1, 13 ], "flags": 4, "x": 168, "y": 13 }, + { "matrix": [ 1, 14 ], "flags": 4, "x": 174, "y": 13 }, + { "matrix": [ 1, 15 ], "flags": 4, "x": 187, "y": 13 }, + { "matrix": [ 1, 16 ], "flags": 4, "x": 199, "y": 13 }, + + { "matrix": [ 2, 0 ], "flags": 4, "x": 3, "y": 26 }, + { "matrix": [ 2, 1 ], "flags": 4, "x": 19, "y": 26 }, + { "matrix": [ 2, 2 ], "flags": 4, "x": 31, "y": 26 }, + { "matrix": [ 2, 3 ], "flags": 4, "x": 44, "y": 26 }, + { "matrix": [ 2, 4 ], "flags": 4, "x": 56, "y": 26 }, + { "matrix": [ 2, 5 ], "flags": 4, "x": 68, "y": 26 }, + { "matrix": [ 2, 6 ], "flags": 4, "x": 81, "y": 26 }, + { "matrix": [ 2, 7 ], "flags": 4, "x": 93, "y": 26 }, + { "matrix": [ 2, 8 ], "flags": 4, "x": 106, "y": 26 }, + { "matrix": [ 2, 9 ], "flags": 4, "x": 118, "y": 26 }, + { "matrix": [ 2, 10 ], "flags": 4, "x": 131, "y": 26 }, + { "matrix": [ 2, 11 ], "flags": 4, "x": 143, "y": 26 }, + { "matrix": [ 2, 12 ], "flags": 4, "x": 156, "y": 26 }, + { "matrix": [ 2, 13 ], "flags": 4, "x": 168, "y": 26 }, + { "matrix": [ 2, 14 ], "flags": 4, "x": 174, "y": 26 }, + { "matrix": [ 2, 15 ], "flags": 4, "x": 187, "y": 26 }, + { "matrix": [ 2, 16 ], "flags": 4, "x": 199, "y": 26 }, + + { "matrix": [ 3, 0 ], "flags": 4, "x": 5, "y": 38 }, + { "matrix": [ 3, 1 ], "flags": 4, "x": 22, "y": 38 }, + { "matrix": [ 3, 2 ], "flags": 4, "x": 34, "y": 38 }, + { "matrix": [ 3, 3 ], "flags": 4, "x": 47, "y": 38 }, + { "matrix": [ 3, 4 ], "flags": 4, "x": 59, "y": 38 }, + { "matrix": [ 3, 5 ], "flags": 4, "x": 72, "y": 38 }, + { "matrix": [ 3, 6 ], "flags": 4, "x": 84, "y": 38 }, + { "matrix": [ 3, 7 ], "flags": 4, "x": 96, "y": 38 }, + { "matrix": [ 3, 8 ], "flags": 4, "x": 109, "y": 38 }, + { "matrix": [ 3, 9 ], "flags": 4, "x": 121, "y": 38 }, + { "matrix": [ 3, 10 ], "flags": 4, "x": 134, "y": 38 }, + { "matrix": [ 3, 11 ], "flags": 4, "x": 146, "y": 38 }, + { "matrix": [ 3, 12 ], "flags": 4, "x": 159, "y": 38 }, + { "matrix": [ 3, 13 ], "flags": 4, "x": 166, "y": 38 }, + + { "matrix": [ 4, 0 ], "flags": 4, "x": 8, "y": 51 }, + { "matrix": [ 4, 1 ], "flags": 4, "x": 18, "y": 51 }, + { "matrix": [ 4, 2 ], "flags": 4, "x": 28, "y": 51 }, + { "matrix": [ 4, 3 ], "flags": 4, "x": 40, "y": 51 }, + { "matrix": [ 4, 4 ], "flags": 4, "x": 53, "y": 51 }, + { "matrix": [ 4, 5 ], "flags": 4, "x": 65, "y": 51 }, + { "matrix": [ 4, 6 ], "flags": 4, "x": 78, "y": 51 }, + { "matrix": [ 4, 7 ], "flags": 4, "x": 90, "y": 51 }, + { "matrix": [ 4, 8 ], "flags": 4, "x": 103, "y": 51 }, + { "matrix": [ 4, 9 ], "flags": 4, "x": 115, "y": 51 }, + { "matrix": [ 4, 10 ], "flags": 4, "x": 128, "y": 51 }, + { "matrix": [ 4, 11 ], "flags": 4, "x": 140, "y": 51 }, + { "matrix": [ 4, 13 ], "flags": 4, "x": 157, "y": 51 }, + { "matrix": [ 4, 15 ], "flags": 4, "x": 187, "y": 51 }, + + { "matrix": [ 5, 0 ], "flags": 4, "x": 2, "y": 64 }, + { "matrix": [ 5, 1 ], "flags": 4, "x": 17, "y": 64 }, + { "matrix": [ 5, 2 ], "flags": 4, "x": 33, "y": 64 }, + { "matrix": [ 5, 6 ], "flags": 4, "x": 79, "y": 64 }, + { "matrix": [ 5, 10 ], "flags": 4, "x": 124, "y": 64 }, + { "matrix": [ 5, 11 ], "flags": 4, "x": 137, "y": 64 }, + { "matrix": [ 5, 12 ], "flags": 4, "x": 149, "y": 64 }, + { "matrix": [ 5, 13 ], "flags": 4, "x": 162, "y": 64 }, + { "matrix": [ 5, 14 ], "flags": 4, "x": 174, "y": 64 }, + { "matrix": [ 5, 15 ], "flags": 4, "x": 187, "y": 64 }, + { "matrix": [ 5, 16 ], "flags": 4, "x": 199, "y": 64 } + ] + } +} diff --git a/keyboards/keychron/k8/rgb/iso/readme.md b/keyboards/keychron/k8/rgb/iso/readme.md new file mode 100644 index 000000000000..ca9ef69d61eb --- /dev/null +++ b/keyboards/keychron/k8/rgb/iso/readme.md @@ -0,0 +1,12 @@ +# Keychron K8 + +K8 ISO RGB + +Make example for this keyboard (after setting up your build environment): + + make keychron/k8/rgb/iso:iso + +* * * +For more info and detailed flashing instructions, please visit https://github.com/alex-dinh/keychron-k8 + +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/k8/rgb/iso/rules.mk b/keyboards/keychron/k8/rgb/iso/rules.mk new file mode 100644 index 000000000000..047de4137dd5 --- /dev/null +++ b/keyboards/keychron/k8/rgb/iso/rules.mk @@ -0,0 +1,2 @@ +EEPROM_DRIVER = wear_leveling +WEAR_LEVELING_DRIVER = sn32_flash diff --git a/keyboards/keychron/k8/rgb/keymaps/ansi/keymap.c b/keyboards/keychron/k8/rgb/keymaps/ansi/keymap.c new file mode 100644 index 000000000000..b08634c14155 --- /dev/null +++ b/keyboards/keychron/k8/rgb/keymaps/ansi/keymap.c @@ -0,0 +1,140 @@ +/* Copyright 2020 Adam Honse + * Copyright 2020 Dimitris Mantzouranis + * Copyright 2022 Harrison Chan (Xelus) + * Copyright 2022 Thomas Bowman Mørch (tbowmo) + * + * 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 = 0, + WIN_FN = 1, + MAC_BASE = 2, + MAC_FN = 3, +}; + +#define KC_TASK LGUI(KC_TAB) // Task viewer +#define KC_FLXP LGUI(KC_E) // Windows file explorer +#define KC_CRTN LGUI(KC_C) // Cortana | Microsoft Teams + +#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_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|????|PAUS| + +--------------------------------------------------------------------------+------|----|----| + | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACKSP | |INS |SCRL|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_CRTN, 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( + QK_BOOT, KC_BRID, KC_BRIU, KC_TASK, KC_FLXP, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, RGB_TOG, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAD, _______, 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( // Mac base 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_MSNP, 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( // Mac Fn overlay + QK_BOOT, KC_BRID, KC_BRIU, KC_MSSN, KC_FIND, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, RGB_TOG, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAD, _______, RGB_SAI + ) +}; + +bool dip_switch_update_user(uint8_t index, bool active){ + switch(index){ + case 0: + if(active) { // Mac mode + layer_move(MAC_BASE); + } else { // Windows mode + layer_move(WIN_BASE); + } + return false; + case 1: + if(active){ //Cable mode + // do stuff + } + else{ //BT mode + // do stuff + } + break; + } + + return true; +} + +void keyboard_post_init_user(void) { + // Customise these values to desired behaviour + //debug_enable=true; + //debug_matrix=true; + //debug_keyboard=true; + //debug_mouse=true; +} diff --git a/keyboards/keychron/k8/rgb/keymaps/default/keymap.c b/keyboards/keychron/k8/rgb/keymaps/default/keymap.c new file mode 100644 index 000000000000..c89dc15a9541 --- /dev/null +++ b/keyboards/keychron/k8/rgb/keymaps/default/keymap.c @@ -0,0 +1,101 @@ +/* Copyright 2020 Adam Honse + * Copyright 2020 Dimitris Mantzouranis + * Copyright 2022 Harrison Chan (Xelus) + * Copyright 2022 Thomas Bowman Mørch (tbowmo) + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + +/* +--------------------------------------------------------------------------+----------------+ + | ESC | | F1 | F2 | F3 | F4 | | F5 | F6 | F7 | F8 | | F9| F10| F11| F12| | |PSCR|????|PAUS| + +--------------------------------------------------------------------------+------|----|----| + | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACKSP | |INS |SCRL|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_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_SLCK, 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, KC_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_tkl_ansi( + QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPI, RGB_SAI, RGB_HUI, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_SAD, RGB_HUD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, + _______, _______, _______, _______, _______, _______, _______, _______, RGB_RMOD,RGB_VAD, RGB_MOD + ), + [2] = LAYOUT_tkl_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_TRNS + ), + [3] = LAYOUT_tkl_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_TRNS + ) +}; + +bool dip_switch_update_user(uint8_t index, bool active){ + switch(index){ + case 0: + if(active){ // Win/Android mode + // do stuff + } + else{ // Mac/iOS mode + // do stuff + } + break; + case 1: + if(active){ //Cable mode + // do stuff + } + else{ //BT mode + // do stuff + } + break; + } + return true; +} + +void keyboard_post_init_user(void) { + // Customise these values to desired behaviour + //debug_enable=true; + //debug_matrix=true; + //debug_keyboard=true; + //debug_mouse=true; +} diff --git a/keyboards/keychron/k8/rgb/keymaps/iso/keymap.c b/keyboards/keychron/k8/rgb/keymaps/iso/keymap.c new file mode 100644 index 000000000000..8472c64da32f --- /dev/null +++ b/keyboards/keychron/k8/rgb/keymaps/iso/keymap.c @@ -0,0 +1,139 @@ +/* Copyright 2020 Adam Honse + * Copyright 2020 Dimitris Mantzouranis + * Copyright 2022 Harrison Chan (Xelus) + * Copyright 2022 Thomas Bowman Mørch (tbowmo) + * + * 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 = 0, + WIN_FN = 1, + MAC_BASE = 2, + MAC_FN = 3, +}; + +#define KC_TASK LGUI(KC_TAB) // Task viewer +#define KC_FLXP LGUI(KC_E) // Windows file explorer +#define KC_CRTN LGUI(KC_C) // Cortana | Microsoft Teams + +#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_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|????|PAUS| + +--------------------------------------------------------------------------+------|----|----| + | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACKSP | |INS |SCRL|PGUP| + +--------------------------------------------------------------------------+------|----|----| + | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | | |DEL |END |PGDN| + +-------------------------------------------------------------------- RET | +--------------+ + | CAPSLCK | A | S | D | F | G | H | J | K | L | ; | ' | # | | | + +--------------------------------------------------------------------------+ |----| | + | 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_iso( + 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_CRTN, 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_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_NUHS, KC_ENT, + KC_LSFT, KC_NUBS, 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_iso( + QK_BOOT, KC_BRID, KC_BRIU, KC_TASK, KC_FLXP, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, RGB_TOG, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAD, _______, 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| + +-------------------------------------------------------------------- RET | +--------------+ + | CAPSLCK | A | S | D | F | G | H | J | K | L | ; | ' | # | | | + +--------------------------------------------------------------------------+ +----+ | + | 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_iso( + 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_MSNP, 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_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_NUHS, KC_ENT, + KC_LSFT, KC_NUBS, 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_iso( + QK_BOOT, KC_BRID, KC_BRIU, KC_MSSN, KC_FIND, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, RGB_TOG, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAD, _______, RGB_SAI + ) +}; + +bool dip_switch_update_user(uint8_t index, bool active){ + switch(index){ + case 0: + if(active) { // Mac mode + layer_move(MAC_BASE); + } else { // Windows mode + layer_move(WIN_BASE); + } + return false; + case 1: + if(active){ //Cable mode + // do stuff + } + else{ //BT mode + // do stuff + } + break; + } + + return true; +} + +void keyboard_post_init_user(void) { + // Customise these values to desired behaviour + //debug_enable=true; + //debug_matrix=true; + //debug_keyboard=true; + //debug_mouse=true; +} diff --git a/keyboards/keychron/k8/rgb/keymaps/via/config.h b/keyboards/keychron/k8/rgb/keymaps/via/config.h new file mode 100644 index 000000000000..8d624f4c473e --- /dev/null +++ b/keyboards/keychron/k8/rgb/keymaps/via/config.h @@ -0,0 +1,22 @@ +/* Copyright 2021 Harrison Chan (Xelus) + * Copyright 2022 Thomas Bowman Mørch (tbowmo) + * + * 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 + +// Enable RGB Matrix +#define VIA_QMK_RGBLIGHT_ENABLE +#define WEAR_LEVELING_SN32_EMULATION_PAGE_COUNT 30 diff --git a/keyboards/keychron/k8/rgb/keymaps/via/k8_via_ansi.json b/keyboards/keychron/k8/rgb/keymaps/via/k8_via_ansi.json new file mode 100644 index 000000000000..c4b3c5d53368 --- /dev/null +++ b/keyboards/keychron/k8/rgb/keymaps/via/k8_via_ansi.json @@ -0,0 +1,17 @@ +{ + "name": "Keychron K8 ANSI", + "vendorId": "0x3434", + "productId": "0xFE0E", + "menus": ["qmk_rgb_matrix"], + "matrix": {"rows": 6, "cols": 17}, + "layouts": { + "keymap": [ + ["0,0", {"x": 1}, "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 }, "3,13"], + [{"w": 2.25 }, "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 }, "4,15"], + [{"w": 1.25 }, "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 }, "5,11", {"w": 1.25 }, "5,12", {"w": 1.25 }, "5,13", {"x": 0.25 }, "5,14", "5,15", "5,16"] + ] + } +} diff --git a/keyboards/keychron/k8/rgb/keymaps/via/k8_via_ansi_optical.json b/keyboards/keychron/k8/rgb/keymaps/via/k8_via_ansi_optical.json new file mode 100644 index 000000000000..429774641d8f --- /dev/null +++ b/keyboards/keychron/k8/rgb/keymaps/via/k8_via_ansi_optical.json @@ -0,0 +1,17 @@ +{ + "name": "Keychron K8 Optical ANSI", + "vendorId": "0x3434", + "productId": "0xFE0E", + "menus": ["qmk_rgb_matrix"], + "matrix": {"rows": 6, "cols": 17}, + "layouts": { + "keymap": [ + ["0,0", {"x": 1}, "0,2", "0,3", "0,4", "0,5", {"x": 0.5}, "0,6", "0,7", "0,8", "0,9", {"x": 0.5}, "0,10", "0,11", "0,12", "0,13", {"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 }, "3,13"], + [{"w": 2.25 }, "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 }, "4,15"], + [{"w": 1.25 }, "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 }, "5,11", {"w": 1.25 }, "5,12", {"w": 1.25 }, "5,13", {"x": 0.25 }, "5,14", "5,15", "5,16"] + ] + } +} diff --git a/keyboards/keychron/k8/rgb/keymaps/via/keymap.c b/keyboards/keychron/k8/rgb/keymaps/via/keymap.c new file mode 100644 index 000000000000..4d5ae0e48b9e --- /dev/null +++ b/keyboards/keychron/k8/rgb/keymaps/via/keymap.c @@ -0,0 +1,105 @@ +/* Copyright 2020 Adam Honse + * Copyright 2020 Dimitris Mantzouranis + * Copyright 2022 Harrison Chan (Xelus) + * Copyright 2022 Thomas Bowman Mørch (tbowmo) + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +#define KC_TASK LGUI(KC_TAB) // Task viewer +#define KC_FLXP LGUI(KC_E) // Windows file explorer +#define KC_CRTN LGUI(KC_C) // Cortana | Microsoft Teams + +/* +--------------------------------------------------------------------------+----------------+ + | ESC | | F1 | F2 | F3 | F4 | | F5 | F6 | F7 | F8 | | F9| F10| F11| F12| | |PSCR|????|PAUS| + +--------------------------------------------------------------------------+------|----|----| + | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACKSP | |INS |SCRL|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_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_CRTN, 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(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_tkl_ansi( + QK_BOOT, KC_BRID, KC_BRIU, KC_TASK, KC_FLXP, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, RGB_TOG, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAD, _______, RGB_SAI + ), + [2] = LAYOUT_tkl_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT_tkl_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +bool dip_switch_update_user(uint8_t index, bool active){ + switch(index){ + case 0: + if(active){ // Win/Android mode + // do stuff + } + else{ // Mac/iOS mode + // do stuff + } + break; + case 1: + if(active){ //Cable mode + // do stuff + } + else{ //BT mode + // do stuff + } + break; + + } + return true; +} + +void keyboard_post_init_user(void) { + // Customise these values to desired behaviour + //debug_enable=true; + //debug_matrix=true; + //debug_keyboard=true; + //debug_mouse=true; +} diff --git a/keyboards/keychron/k8/rgb/keymaps/via/rules.mk b/keyboards/keychron/k8/rgb/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/keychron/k8/rgb/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/keychron/k8/rgb/keymaps/via_iso/config.h b/keyboards/keychron/k8/rgb/keymaps/via_iso/config.h new file mode 100644 index 000000000000..8d624f4c473e --- /dev/null +++ b/keyboards/keychron/k8/rgb/keymaps/via_iso/config.h @@ -0,0 +1,22 @@ +/* Copyright 2021 Harrison Chan (Xelus) + * Copyright 2022 Thomas Bowman Mørch (tbowmo) + * + * 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 + +// Enable RGB Matrix +#define VIA_QMK_RGBLIGHT_ENABLE +#define WEAR_LEVELING_SN32_EMULATION_PAGE_COUNT 30 diff --git a/keyboards/keychron/k8/rgb/keymaps/via_iso/k8_via_iso.json b/keyboards/keychron/k8/rgb/keymaps/via_iso/k8_via_iso.json new file mode 100644 index 000000000000..270ccf4a5ab4 --- /dev/null +++ b/keyboards/keychron/k8/rgb/keymaps/via_iso/k8_via_iso.json @@ -0,0 +1,17 @@ +{ + "name": "Keychron K8 ISO", + "vendorId": "0x3434", + "productId": "0xFE0F", + "menus": ["qmk_rgb_matrix"], + "matrix": {"rows": 6, "cols": 17}, + "layouts": { + "keymap": [ + ["0,0", {"x": 1}, "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.25}, "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", {"x":0.25,"w":1.25,"h":2,"w2":1.5,"h2":1,"x2":-0.25}, "3,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", "3,12"], + [{"w": 1.25 }, "4,0", "4,1", "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 }, "4,15"], + [{"w": 1.25 }, "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 }, "5,11", {"w": 1.25 }, "5,12", {"w": 1.25 }, "5,13", {"x": 0.25 }, "5,14", "5,15", "5,16"] + ] + } +} diff --git a/keyboards/keychron/k8/rgb/keymaps/via_iso/keymap.c b/keyboards/keychron/k8/rgb/keymaps/via_iso/keymap.c new file mode 100644 index 000000000000..ecb921ed44fd --- /dev/null +++ b/keyboards/keychron/k8/rgb/keymaps/via_iso/keymap.c @@ -0,0 +1,104 @@ +/* Copyright 2020 Adam Honse + * Copyright 2020 Dimitris Mantzouranis + * Copyright 2022 Harrison Chan (Xelus) + * Copyright 2022 Thomas Bowman Mørch (tbowmo) + * + * 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 + +#define KC_TASK LGUI(KC_TAB) // Task viewer +#define KC_FLXP LGUI(KC_E) // Windows file explorer +#define KC_CRTN LGUI(KC_C) // Cortana | Microsoft Teams + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* +--------------------------------------------------------------------------+----------------+ + | ESC | | F1 | F2 | F3 | F4 | | F5 | F6 | F7 | F8 | | F9| F10| F11| F12| | |PSCR|????|PAUS| + +--------------------------------------------------------------------------+------|----|----| + | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACKSP | |INS |SCRL|PGUP| + +--------------------------------------------------------------------------+------|----|----| + | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | | |DEL |END |PGDN| + +-------------------------------------------------------------------- RET | +--------------+ + | CAPSLCK | A | S | D | F | G | H | J | K | L | ; | ' | # | | | + +--------------------------------------------------------------------------+ |----| | + | LSHIFT | Z | X | C | V | B | N | M | , | . | / | RSHIFT | | UP | | + +--------------------------------------------------------------------------+------|----|----| + |LCTRL| LGUI| LALT | SPACE | RALT| RGUI | FN | RCTRL | |LFT |DWN |RGT | + +--------------------------------------------------------------------------+----------------+ +*/ + [0] = LAYOUT_tkl_iso( + 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_CRTN, 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_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_NUHS, KC_ENT, + KC_LSFT, KC_NUBS, 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(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_tkl_iso( + QK_BOOT, KC_BRID, KC_BRIU, KC_TASK, KC_FLXP, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, RGB_TOG, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAD, _______, RGB_SAI + ), + [2] = LAYOUT_tkl_iso( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT_tkl_iso( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +bool dip_switch_update_user(uint8_t index, bool active){ + switch(index){ + case 0: + if(active){ // Win/Android mode + // do stuff + } + else{ // Mac/iOS mode + // do stuff + } + break; + case 1: + if(active){ //Cable mode + // do stuff + } + else{ //BT mode + // do stuff + } + break; + + } + return true; +} + +void keyboard_post_init_user(void) { + // Customise these values to desired behaviour + //debug_enable=true; + //debug_matrix=true; + //debug_keyboard=true; + //debug_mouse=true; +} diff --git a/keyboards/keychron/k8/rgb/keymaps/via_iso/rules.mk b/keyboards/keychron/k8/rgb/keymaps/via_iso/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/keychron/k8/rgb/keymaps/via_iso/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/keychron/k8/rgb/optical_ansi/config.h b/keyboards/keychron/k8/rgb/optical_ansi/config.h new file mode 100644 index 000000000000..a39dbe028b17 --- /dev/null +++ b/keyboards/keychron/k8/rgb/optical_ansi/config.h @@ -0,0 +1,19 @@ +/* Copyright 2020 Adam Honse + * Copyright 2020 Dimitris Mantzouranis + * + * 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 . + */ + +// RGB Matrix Config +#define RGB_MATRIX_LED_COUNT 87 diff --git a/keyboards/keychron/k8/rgb/optical_ansi/info.json b/keyboards/keychron/k8/rgb/optical_ansi/info.json new file mode 100644 index 000000000000..14c4d77ceb4c --- /dev/null +++ b/keyboards/keychron/k8/rgb/optical_ansi/info.json @@ -0,0 +1,198 @@ +{ + "keyboard_name": "Keychron K8", + "usb": { + "pid": "0xFE0E" + }, + "layouts": { + "LAYOUT_tkl_ansi": { + "layout": [ + {"matrix":[0, 0], "x":0, "y":0}, + {"matrix":[0, 2], "x":2, "y":0}, + {"matrix":[0, 3], "x":3, "y":0}, + {"matrix":[0, 4], "x":4, "y":0}, + {"matrix":[0, 5], "x":5, "y":0}, + {"matrix":[0, 6], "x":6.5, "y":0}, + {"matrix":[0, 7], "x":7.5, "y":0}, + {"matrix":[0, 8], "x":8.5, "y":0}, + {"matrix":[0, 9], "x":9.5, "y":0}, + {"matrix":[0,10], "x":11, "y":0}, + {"matrix":[0,11], "x":12, "y":0}, + {"matrix":[0,12], "x":13, "y":0}, + {"matrix":[0,13], "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} + ] + } + }, + "matrix_pins": { + "input_pressed_state": 1 + }, + "rgb_matrix": { + "layout": [ + { "matrix": [ 0, 0 ], "flags": 1, "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": 1, "x": 84, "y": 0 }, + { "matrix": [ 0, 6 ], "flags": 1, "x": 97, "y": 0 }, + { "matrix": [ 0, 7 ], "flags": 1, "x": 110, "y": 0 }, + { "matrix": [ 0, 8 ], "flags": 1, "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, 14 ], "flags": 1, "x": 198, "y": 0 }, + { "matrix": [ 0, 15 ], "flags": 1, "x": 211, "y": 0 }, + { "matrix": [ 0, 16 ], "flags": 1, "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": 1, "x": 175, "y": 17 }, + { "matrix": [ 1, 14 ], "flags": 1, "x": 198, "y": 17 }, + { "matrix": [ 1, 15 ], "flags": 1, "x": 211, "y": 17 }, + { "matrix": [ 1, 16 ], "flags": 1, "x": 224, "y": 17 }, + { "matrix": [ 2, 0 ], "flags": 1, "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": 1, "x": 198, "y": 29 }, + { "matrix": [ 2, 15 ], "flags": 1, "x": 211, "y": 29 }, + { "matrix": [ 2, 16 ], "flags": 1, "x": 224, "y": 29 }, + { "matrix": [ 3, 0 ], "flags": 1, "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": 1, "x": 174, "y": 41 }, + { "matrix": [ 4, 0 ], "flags": 1, "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": 1, "x": 170, "y": 52 }, + { "matrix": [ 4, 15 ], "flags": 1, "x": 211, "y": 52 }, + { "matrix": [ 5, 0 ], "flags": 1, "x": 2, "y": 64 }, + { "matrix": [ 5, 1 ], "flags": 1, "x": 18, "y": 64 }, + { "matrix": [ 5, 2 ], "flags": 1, "x": 34, "y": 64 }, + { "matrix": [ 5, 6 ], "flags": 4, "x": 83, "y": 64 }, + { "matrix": [ 5, 10 ], "flags": 1, "x": 131, "y": 64 }, + { "matrix": [ 5, 11 ], "flags": 1, "x": 148, "y": 64 }, + { "matrix": [ 5, 12 ], "flags": 1, "x": 164, "y": 64 }, + { "matrix": [ 5, 13 ], "flags": 1, "x": 180, "y": 64 }, + { "matrix": [ 5, 14 ], "flags": 1, "x": 198, "y": 64 }, + { "matrix": [ 5, 15 ], "flags": 1, "x": 211, "y": 64 }, + { "matrix": [ 5, 16 ], "flags": 1, "x": 224, "y": 64 } + ] + } +} diff --git a/keyboards/keychron/k8/rgb/optical_ansi/readme.md b/keyboards/keychron/k8/rgb/optical_ansi/readme.md new file mode 100644 index 000000000000..0f6ab3fea035 --- /dev/null +++ b/keyboards/keychron/k8/rgb/optical_ansi/readme.md @@ -0,0 +1,12 @@ +# Keychron K8 + +K8 Optical ANSI RGB + +Make example for this keyboard (after setting up your build environment): + + make keychron/k8/rgb/optical_ansi:ansi + +* * * +For more info and detailed flashing instructions, please visit https://github.com/alex-dinh/keychron-k8 + +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/k8/rgb/optical_ansi/rules.mk b/keyboards/keychron/k8/rgb/optical_ansi/rules.mk new file mode 100644 index 000000000000..047de4137dd5 --- /dev/null +++ b/keyboards/keychron/k8/rgb/optical_ansi/rules.mk @@ -0,0 +1,2 @@ +EEPROM_DRIVER = wear_leveling +WEAR_LEVELING_DRIVER = sn32_flash diff --git a/keyboards/keychron/k8/rgb/optical_iso/config.h b/keyboards/keychron/k8/rgb/optical_iso/config.h new file mode 100644 index 000000000000..b73064593e2c --- /dev/null +++ b/keyboards/keychron/k8/rgb/optical_iso/config.h @@ -0,0 +1,20 @@ +/* Copyright 2020 Adam Honse + * Copyright 2020 Dimitris Mantzouranis + * Copyright 2022 Harrison Chan (Xelus) + * + * 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 . + */ + +// RGB Matrix Config +#define RGB_MATRIX_LED_COUNT 88 diff --git a/keyboards/keychron/k8/rgb/optical_iso/info.json b/keyboards/keychron/k8/rgb/optical_iso/info.json new file mode 100644 index 000000000000..ecda6024c8bc --- /dev/null +++ b/keyboards/keychron/k8/rgb/optical_iso/info.json @@ -0,0 +1,200 @@ +{ + "keyboard_name": "Keychron K8", + "usb": { + "pid": "0xFE0F" + }, + "layouts": { + "LAYOUT_tkl_iso": { + "layout": [ + {"matrix":[0, 0], "x":0, "y":0}, + {"matrix":[0, 2], "x":2, "y":0}, + {"matrix":[0, 3], "x":3, "y":0}, + {"matrix":[0, 4], "x":4, "y":0}, + {"matrix":[0, 5], "x":5, "y":0}, + {"matrix":[0, 6], "x":6.5, "y":0}, + {"matrix":[0, 7], "x":7.5, "y":0}, + {"matrix":[0, 8], "x":8.5, "y":0}, + {"matrix":[0, 9], "x":9.5, "y":0}, + {"matrix":[0,10], "x":11, "y":0}, + {"matrix":[0,11], "x":12, "y":0}, + {"matrix":[0,12], "x":13, "y":0}, + {"matrix":[0,13], "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,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,12], "x":12.75, "y":3.25}, + {"matrix":[3,13], "x":13.75, "y":2.25, "w":1.25, "h":2}, + + {"matrix":[4, 0], "x":0, "y":4.25, "w":1.25}, + {"matrix":[4, 1], "x":1.25, "y":4.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} + ] + } + }, + "matrix_pins": { + "input_pressed_state": 1 + }, + "rgb_matrix": { + "layout": [ + { "matrix": [ 0, 0 ], "flags": 1, "x": 0, "y": 0 }, + { "matrix": [ 0, 2 ], "flags": 4, "x": 26, "y": 0 }, + { "matrix": [ 0, 3 ], "flags": 4, "x": 38, "y": 0 }, + { "matrix": [ 0, 4 ], "flags": 4, "x": 51, "y": 0 }, + { "matrix": [ 0, 5 ], "flags": 4, "x": 64, "y": 0 }, + { "matrix": [ 0, 6 ], "flags": 1, "x": 83, "y": 0 }, + { "matrix": [ 0, 7 ], "flags": 1, "x": 96, "y": 0 }, + { "matrix": [ 0, 8 ], "flags": 1, "x": 109, "y": 0 }, + { "matrix": [ 0, 9 ], "flags": 1, "x": 122, "y": 0 }, + { "matrix": [ 0, 10 ], "flags": 4, "x": 141, "y": 0 }, + { "matrix": [ 0, 11 ], "flags": 4, "x": 154, "y": 0 }, + { "matrix": [ 0, 12 ], "flags": 4, "x": 166, "y": 0 }, + { "matrix": [ 0, 13 ], "flags": 4, "x": 179, "y": 0 }, + { "matrix": [ 0, 14 ], "flags": 1, "x": 198, "y": 0 }, + { "matrix": [ 0, 15 ], "flags": 1, "x": 211, "y": 0 }, + { "matrix": [ 0, 16 ], "flags": 1, "x": 224, "y": 0 }, + { "matrix": [ 1, 0 ], "flags": 4, "x": 0, "y": 15 }, + { "matrix": [ 1, 1 ], "flags": 4, "x": 13, "y": 15 }, + { "matrix": [ 1, 2 ], "flags": 4, "x": 26, "y": 15 }, + { "matrix": [ 1, 3 ], "flags": 4, "x": 38, "y": 15 }, + { "matrix": [ 1, 4 ], "flags": 4, "x": 51, "y": 15 }, + { "matrix": [ 1, 5 ], "flags": 4, "x": 64, "y": 15 }, + { "matrix": [ 1, 6 ], "flags": 4, "x": 77, "y": 15 }, + { "matrix": [ 1, 7 ], "flags": 4, "x": 90, "y": 15 }, + { "matrix": [ 1, 8 ], "flags": 4, "x": 102, "y": 15 }, + { "matrix": [ 1, 9 ], "flags": 4, "x": 115, "y": 15 }, + { "matrix": [ 1, 10 ], "flags": 4, "x": 128, "y": 15 }, + { "matrix": [ 1, 11 ], "flags": 4, "x": 141, "y": 15 }, + { "matrix": [ 1, 12 ], "flags": 4, "x": 154, "y": 15 }, + { "matrix": [ 1, 13 ], "flags": 1, "x": 173, "y": 15 }, + { "matrix": [ 1, 14 ], "flags": 1, "x": 198, "y": 15 }, + { "matrix": [ 1, 15 ], "flags": 1, "x": 211, "y": 15 }, + { "matrix": [ 1, 16 ], "flags": 1, "x": 224, "y": 15 }, + { "matrix": [ 2, 0 ], "flags": 1, "x": 3, "y": 27 }, + { "matrix": [ 2, 1 ], "flags": 4, "x": 19, "y": 27 }, + { "matrix": [ 2, 2 ], "flags": 4, "x": 32, "y": 27 }, + { "matrix": [ 2, 3 ], "flags": 4, "x": 45, "y": 27 }, + { "matrix": [ 2, 4 ], "flags": 4, "x": 58, "y": 27 }, + { "matrix": [ 2, 5 ], "flags": 4, "x": 70, "y": 27 }, + { "matrix": [ 2, 6 ], "flags": 4, "x": 83, "y": 27 }, + { "matrix": [ 2, 7 ], "flags": 4, "x": 96, "y": 27 }, + { "matrix": [ 2, 8 ], "flags": 4, "x": 109, "y": 27 }, + { "matrix": [ 2, 9 ], "flags": 4, "x": 122, "y": 27 }, + { "matrix": [ 2, 10 ], "flags": 4, "x": 134, "y": 27 }, + { "matrix": [ 2, 11 ], "flags": 4, "x": 147, "y": 27 }, + { "matrix": [ 2, 12 ], "flags": 4, "x": 160, "y": 27 }, + { "matrix": [ 2, 14 ], "flags": 1, "x": 198, "y": 27 }, + { "matrix": [ 2, 15 ], "flags": 1, "x": 211, "y": 27 }, + { "matrix": [ 2, 16 ], "flags": 1, "x": 224, "y": 27 }, + { "matrix": [ 3, 0 ], "flags": 1, "x": 5, "y": 40 }, + { "matrix": [ 3, 1 ], "flags": 4, "x": 22, "y": 40 }, + { "matrix": [ 3, 2 ], "flags": 4, "x": 35, "y": 40 }, + { "matrix": [ 3, 3 ], "flags": 4, "x": 48, "y": 40 }, + { "matrix": [ 3, 4 ], "flags": 4, "x": 61, "y": 40 }, + { "matrix": [ 3, 5 ], "flags": 4, "x": 74, "y": 40 }, + { "matrix": [ 3, 6 ], "flags": 4, "x": 86, "y": 40 }, + { "matrix": [ 3, 7 ], "flags": 4, "x": 99, "y": 40 }, + { "matrix": [ 3, 8 ], "flags": 4, "x": 112, "y": 40 }, + { "matrix": [ 3, 9 ], "flags": 4, "x": 125, "y": 40 }, + { "matrix": [ 3, 10 ], "flags": 4, "x": 138, "y": 40 }, + { "matrix": [ 3, 11 ], "flags": 4, "x": 150, "y": 40 }, + { "matrix": [ 3, 12 ], "flags": 4, "x": 163, "y": 40 }, + { "matrix": [ 3, 13 ], "flags": 1, "x": 178, "y": 34 }, + { "matrix": [ 4, 0 ], "flags": 1, "x": 2, "y": 52 }, + { "matrix": [ 4, 1 ], "flags": 4, "x": 16, "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": 54, "y": 52 }, + { "matrix": [ 4, 5 ], "flags": 4, "x": 67, "y": 52 }, + { "matrix": [ 4, 6 ], "flags": 4, "x": 80, "y": 52 }, + { "matrix": [ 4, 7 ], "flags": 4, "x": 93, "y": 52 }, + { "matrix": [ 4, 8 ], "flags": 4, "x": 106, "y": 52 }, + { "matrix": [ 4, 9 ], "flags": 4, "x": 118, "y": 52 }, + { "matrix": [ 4, 10 ], "flags": 4, "x": 131, "y": 52 }, + { "matrix": [ 4, 11 ], "flags": 4, "x": 144, "y": 52 }, + { "matrix": [ 4, 13 ], "flags": 1, "x": 168, "y": 52 }, + { "matrix": [ 4, 15 ], "flags": 1, "x": 211, "y": 52 }, + { "matrix": [ 5, 0 ], "flags": 1, "x": 2, "y": 64 }, + { "matrix": [ 5, 1 ], "flags": 1, "x": 18, "y": 64 }, + { "matrix": [ 5, 2 ], "flags": 1, "x": 34, "y": 64 }, + { "matrix": [ 5, 6 ], "flags": 4, "x": 82, "y": 64 }, + { "matrix": [ 5, 10 ], "flags": 1, "x": 130, "y": 64 }, + { "matrix": [ 5, 11 ], "flags": 1, "x": 146, "y": 64 }, + { "matrix": [ 5, 12 ], "flags": 1, "x": 162, "y": 64 }, + { "matrix": [ 5, 13 ], "flags": 1, "x": 178, "y": 64 }, + { "matrix": [ 5, 14 ], "flags": 1, "x": 198, "y": 64 }, + { "matrix": [ 5, 15 ], "flags": 1, "x": 211, "y": 64 }, + { "matrix": [ 5, 16 ], "flags": 1, "x": 224, "y": 64 } + ] + } +} diff --git a/keyboards/keychron/k8/rgb/optical_iso/readme.md b/keyboards/keychron/k8/rgb/optical_iso/readme.md new file mode 100644 index 000000000000..6f3405074e09 --- /dev/null +++ b/keyboards/keychron/k8/rgb/optical_iso/readme.md @@ -0,0 +1,14 @@ +# Keychron K8 + +K8 Optical ISO RGB + +# HAS NOT BEEN TESTED + +Make example for this keyboard (after setting up your build environment): + + make keychron/k8/rgb/optical_iso:iso + +* * * +For more info and detailed flashing instructions, please visit https://github.com/alex-dinh/keychron-k8 + +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/k8/rgb/optical_iso/rules.mk b/keyboards/keychron/k8/rgb/optical_iso/rules.mk new file mode 100644 index 000000000000..047de4137dd5 --- /dev/null +++ b/keyboards/keychron/k8/rgb/optical_iso/rules.mk @@ -0,0 +1,2 @@ +EEPROM_DRIVER = wear_leveling +WEAR_LEVELING_DRIVER = sn32_flash diff --git a/keyboards/keychron/k8/rgb/readme.md b/keyboards/keychron/k8/rgb/readme.md new file mode 100644 index 000000000000..a5db6fe19086 --- /dev/null +++ b/keyboards/keychron/k8/rgb/readme.md @@ -0,0 +1,16 @@ +# Keychron K8 + +K8 Gateron Hotswap RGB + +Make example for this keyboard (after setting up your build environment): + + make keychron/k8/rgb/ansi:ansi + +For default ISO: + + make keychron/k8/rgb/iso:iso + +* * * +For more info and detailed flashing instructions, please visit https://github.com/alex-dinh/keychron-k8 + +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).