From 594c3eeef28fe0e0b7d090e3e487cf3406ed6b13 Mon Sep 17 00:00:00 2001 From: Patrick Muldoon Date: Tue, 28 Mar 2023 18:47:12 -0700 Subject: [PATCH 01/18] add vial support for mode 80 (2020 edition) Solder (#418) --- .../mode/m80v1/m80s/keymaps/vial/config.h | 8 + .../mode/m80v1/m80s/keymaps/vial/keymap.c | 42 +++ .../mode/m80v1/m80s/keymaps/vial/rules.mk | 2 + .../mode/m80v1/m80s/keymaps/vial/vial.json | 257 ++++++++++++++++++ 4 files changed, 309 insertions(+) create mode 100644 keyboards/mode/m80v1/m80s/keymaps/vial/config.h create mode 100644 keyboards/mode/m80v1/m80s/keymaps/vial/keymap.c create mode 100644 keyboards/mode/m80v1/m80s/keymaps/vial/rules.mk create mode 100644 keyboards/mode/m80v1/m80s/keymaps/vial/vial.json diff --git a/keyboards/mode/m80v1/m80s/keymaps/vial/config.h b/keyboards/mode/m80v1/m80s/keymaps/vial/config.h new file mode 100644 index 0000000000..f3a0d8c320 --- /dev/null +++ b/keyboards/mode/m80v1/m80s/keymaps/vial/config.h @@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#pragma once + +#define VIAL_KEYBOARD_UID {0xB5, 0x6B, 0xC8, 0x13, 0xD3, 0xF2, 0x3E, 0x53} +/* enter key as unlock */ +#define VIAL_UNLOCK_COMBO_ROWS { 0, 3 } +#define VIAL_UNLOCK_COMBO_COLS { 0, 12 } diff --git a/keyboards/mode/m80v1/m80s/keymaps/vial/keymap.c b/keyboards/mode/m80v1/m80s/keymaps/vial/keymap.c new file mode 100644 index 0000000000..6712f9e1c6 --- /dev/null +++ b/keyboards/mode/m80v1/m80s/keymaps/vial/keymap.c @@ -0,0 +1,42 @@ + /* +Copyright 2012,2013 Jun Wako + +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 +enum layer_names { + _BASE, + _FN1 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT_eighty_m80s( + 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_BSPC, KC_MUTE, KC_VOLD, KC_VOLU, + 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, MO(1), KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [_FN1] = LAYOUT_eighty_m80s( + QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +}; diff --git a/keyboards/mode/m80v1/m80s/keymaps/vial/rules.mk b/keyboards/mode/m80v1/m80s/keymaps/vial/rules.mk new file mode 100644 index 0000000000..b60410dc1a --- /dev/null +++ b/keyboards/mode/m80v1/m80s/keymaps/vial/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +VIAL_ENABLE = yes diff --git a/keyboards/mode/m80v1/m80s/keymaps/vial/vial.json b/keyboards/mode/m80v1/m80s/keymaps/vial/vial.json new file mode 100644 index 0000000000..d2442e9cc8 --- /dev/null +++ b/keyboards/mode/m80v1/m80s/keymaps/vial/vial.json @@ -0,0 +1,257 @@ +{ + "name": "Mode Eighty M80S", + "vendorId": "0x00DE", + "productId": "0x0080", + "lighting": "none", + "matrix": { + "rows": 6, + "cols": 16 + }, + "layouts": { + "labels": ["Split backspace", "Split Right Shift", "7U bottom row"], + "keymap": [ + [ + { + "c": "#777777" + }, + "0,0", + { + "x": 1, + "c": "#cccccc" + }, + "0,1", + "0,2", + "0,3", + "0,4", + { + "x": 0.5, + "c": "#aaaaaa" + }, + "0,5", + "0,6", + "0,7", + "0,8", + { + "x": 0.5, + "c": "#cccccc" + }, + "0,9", + "0,10", + "0,11", + "0,12", + { + "x": 0.25 + }, + "0,13", + "0,14", + "0,15" + ], + [ + { + "y": 0.5, + "c": "#777777" + }, + "1,0\n`", + { + "c": "#cccccc" + }, + "1,1", + "1,2", + "1,3", + "1,4", + "1,5", + "1,6", + "1,7", + "1,8", + "1,9", + "1,10", + "1,11", + "1,12", + { + "c": "#aaaaaa", + "w": 2 + }, + "3,13\n\n\n0,0", + { + "x": 0.25, + "c": "#cccccc" + }, + "1,13", + "1,14", + "1,15", + { + "x": 1.25 + }, + "3,13\n\n\n0,1", + "3,14\n\n\n0,1" + ], + [ + { + "c": "#aaaaaa", + "w": 1.5 + }, + "2,0", + { + "c": "#cccccc" + }, + "2,1", + "2,2", + "2,3", + "2,4", + "2,5", + "2,6", + "2,7", + "2,8", + "2,9", + "2,10", + "2,11", + "2,12", + { + "c": "#aaaaaa", + "w": 1.5 + }, + "4,13", + { + "x": 0.25, + "c": "#cccccc" + }, + "2,13", + "2,14", + "2,15" + ], + [ + { + "c": "#aaaaaa", + "w": 1.75 + }, + "3,0", + { + "c": "#cccccc" + }, + "3,1", + "3,2", + "3,3", + "3,4", + "3,5", + "3,6", + "3,7", + "3,8", + "3,9", + "3,10", + "3,11", + { + "c": "#777777", + "w": 2.25 + }, + "3,12" + ], + [ + { + "c": "#aaaaaa", + "w": 2.25 + }, + "4,0", + { + "c": "#cccccc" + }, + "4,1", + "4,2", + "4,3", + "4,4", + "4,5", + "4,6", + "4,7", + "4,8", + "4,9", + "4,10", + { + "c": "#aaaaaa", + "w": 2.75 + }, + "4,11\n\n\n1,0", + { + "x": 1.25, + "c": "#777777" + }, + "4,14", + { + "x": 2.25, + "c": "#cccccc", + "w": 1.75 + }, + "4,11\n\n\n1,1", + "4,12\n\n\n1,1" + ], + [ + { + "c": "#aaaaaa", + "w": 1.25 + }, + "5,0\n\n\n2,0", + { + "w": 1.25 + }, + "5,1\n\n\n2,0", + { + "w": 1.25 + }, + "5,2\n\n\n2,0", + { + "c": "#cccccc", + "w": 6.25 + }, + "5,6\n\n\n2,0", + { + "c": "#aaaaaa", + "w": 1.25 + }, + "5,9\n\n\n2,0", + { + "w": 1.25 + }, + "5,10\n\n\n2,0", + { + "w": 1.25 + }, + "5,11\n\n\n2,0", + { + "w": 1.25 + }, + "5,12\n\n\n2,0", + { + "x": 0.25, + "c": "#777777" + }, + "5,13", + "5,14", + "5,15" + ], + [ + { + "y": 0.25, + "c": "#cccccc", + "w": 1.5 + }, + "5,0\n\n\n2,1", + "5,1\n\n\n2,1", + { + "w": 1.5 + }, + "5,2\n\n\n2,1", + { + "w": 7 + }, + "5,6\n\n\n2,1", + { + "w": 1.5 + }, + "5,10\n\n\n2,1", + "5,11\n\n\n2,1", + { + "w": 1.5 + }, + "5,12\n\n\n2,1" + ] + ] + } +} From b291cd25862f69c13468e6744d0cb86caf153601 Mon Sep 17 00:00:00 2001 From: Andrew Litt Date: Tue, 28 Mar 2023 20:48:18 -0500 Subject: [PATCH 02/18] Add Koolertron AMAG09 9 key macropad (#421) * Add Koolertron AMAG09 9 key macropad * Fix default keymap for koolertron/amag09 * Move as much as possible from C into info.json, fix layout name, and remove unnecessary LOCKING_ flags --- keyboards/koolertron/amag09/info.json | 48 ++++++++++++++++++ .../amag09/keymaps/default/keymap.c | 49 +++++++++++++++++++ .../koolertron/amag09/keymaps/vial/config.h | 9 ++++ .../koolertron/amag09/keymaps/vial/keymap.c | 49 +++++++++++++++++++ .../koolertron/amag09/keymaps/vial/rules.mk | 3 ++ .../koolertron/amag09/keymaps/vial/vial.json | 29 +++++++++++ keyboards/koolertron/amag09/readme.md | 29 +++++++++++ keyboards/koolertron/amag09/rules.mk | 1 + 8 files changed, 217 insertions(+) create mode 100644 keyboards/koolertron/amag09/info.json create mode 100644 keyboards/koolertron/amag09/keymaps/default/keymap.c create mode 100644 keyboards/koolertron/amag09/keymaps/vial/config.h create mode 100644 keyboards/koolertron/amag09/keymaps/vial/keymap.c create mode 100644 keyboards/koolertron/amag09/keymaps/vial/rules.mk create mode 100644 keyboards/koolertron/amag09/keymaps/vial/vial.json create mode 100644 keyboards/koolertron/amag09/readme.md create mode 100644 keyboards/koolertron/amag09/rules.mk diff --git a/keyboards/koolertron/amag09/info.json b/keyboards/koolertron/amag09/info.json new file mode 100644 index 0000000000..68d62403b9 --- /dev/null +++ b/keyboards/koolertron/amag09/info.json @@ -0,0 +1,48 @@ +{ + "keyboard_name": "AMAG09", + "manufacturer": "Koolertron", + "url": "http://www.koolertron.com/koolertron-one-handed-macro-mechanical-keyboard-rgb-led-backlit-portable-mini-onehanded-mechanical-gaming-keypad-23-fully-programmable-keys-blue-switches-p-874.html", + "maintainer": "al177", + "usb": { + "vid": "0x4B54", + "pid": "0x2323", + "device_version": "0.0.1" + }, + "bootloader": "bootloadhid", + "processor": "atmega32a", + "features": { + "backlight": true, + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true + }, + "diode_direction": "ROW2COL", + "matrix_size": { + "cols": 3, + "rows": 3 + }, + "matrix_pins": { + "cols": ["B0", "B1", "B2"], + "rows": ["A0", "A1", "A2"] + }, + "backlight": { + "pin": "D4" + }, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"K00", "matrix": [0, 0], "x":0, "y":0}, + {"label":"K01", "matrix": [0, 1], "x":1, "y":0}, + {"label":"K02", "matrix": [0, 2], "x":2, "y":0}, + {"label":"K10", "matrix": [1, 0], "x":0, "y":1}, + {"label":"K11", "matrix": [1, 1], "x":1, "y":1}, + {"label":"K12", "matrix": [1, 2], "x":2, "y":1}, + {"label":"K20", "matrix": [2, 0], "x":0, "y":2}, + {"label":"K21", "matrix": [2, 1], "x":1, "y":2}, + {"label":"K22", "matrix": [2, 2], "x":2, "y":2} + ] + } + } +} diff --git a/keyboards/koolertron/amag09/keymaps/default/keymap.c b/keyboards/koolertron/amag09/keymaps/default/keymap.c new file mode 100644 index 0000000000..4dcdf5cf8a --- /dev/null +++ b/keyboards/koolertron/amag09/keymaps/default/keymap.c @@ -0,0 +1,49 @@ +/* Copyright 2023 + * + * 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 + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + BASE, + FN1, + FN2, + FN3 +}; + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = LAYOUT( + KC_KP_7, KC_KP_8, KC_KP_9, + KC_KP_4, KC_KP_5, KC_KP_6, + KC_KP_1, KC_KP_2, KC_KP_3 + ), + [FN1] = LAYOUT( + _______, _______, _______, + _______, _______, _______, + _______, _______, _______ + ), + [FN2] = LAYOUT( + _______, _______, _______, + _______, _______, _______, + _______, _______, _______ + ), + [FN3] = LAYOUT( + _______, _______, _______, + _______, _______, _______, + _______, _______, _______ + ), +}; +// clang-format on diff --git a/keyboards/koolertron/amag09/keymaps/vial/config.h b/keyboards/koolertron/amag09/keymaps/vial/config.h new file mode 100644 index 0000000000..cdd63d48e4 --- /dev/null +++ b/keyboards/koolertron/amag09/keymaps/vial/config.h @@ -0,0 +1,9 @@ +/* Vial configuration */ + +#pragma once + +#define VIAL_KEYBOARD_UID {0x1C, 0xA6, 0x8B, 0xCD, 0xCB, 0x42, 0x5C, 0x6F} + + +#define VIAL_UNLOCK_COMBO_ROWS { 0, 2 } +#define VIAL_UNLOCK_COMBO_COLS { 2, 0 } diff --git a/keyboards/koolertron/amag09/keymaps/vial/keymap.c b/keyboards/koolertron/amag09/keymaps/vial/keymap.c new file mode 100644 index 0000000000..e96512ae23 --- /dev/null +++ b/keyboards/koolertron/amag09/keymaps/vial/keymap.c @@ -0,0 +1,49 @@ +/* Copyright 2023 + * + * 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 + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + BASE, + FN1, + FN2, + FN3 +}; + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = LAYOUT( + KC_KP_7, KC_KP_8, KC_KP_9, + KC_KP_4, KC_KP_5, KC_KP_6, + MO(FN1), KC_KP_2, KC_KP_3 + ), + [FN1] = LAYOUT( + BL_TOGG, _______, _______, + _______, _______, _______, + _______, _______, _______ + ), + [FN2] = LAYOUT( + _______, _______, _______, + _______, _______, _______, + _______, _______, _______ + ), + [FN3] = LAYOUT( + _______, _______, _______, + _______, _______, _______, + _______, _______, _______ + ), +}; +// clang-format on diff --git a/keyboards/koolertron/amag09/keymaps/vial/rules.mk b/keyboards/koolertron/amag09/keymaps/vial/rules.mk new file mode 100644 index 0000000000..46f9f1360f --- /dev/null +++ b/keyboards/koolertron/amag09/keymaps/vial/rules.mk @@ -0,0 +1,3 @@ +VIA_ENABLE = yes +VIAL_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/koolertron/amag09/keymaps/vial/vial.json b/keyboards/koolertron/amag09/keymaps/vial/vial.json new file mode 100644 index 0000000000..31f380ce89 --- /dev/null +++ b/keyboards/koolertron/amag09/keymaps/vial/vial.json @@ -0,0 +1,29 @@ +{ + "name": "Koolertron AMAG09", + "vendorId": "0x4B54", + "productId": "0x2323", + "lighting": "qmk_backlight", + "matrix" : { + "rows": 3, + "cols": 3 + }, + "layouts" : { + "keymap" : [ + [ + "0,0", + "0,1", + "0,2" + ], + [ + "1,0", + "1,1", + "1,2" + ], + [ + "2,0", + "2,1", + "2,2" + ] + ] + } +} diff --git a/keyboards/koolertron/amag09/readme.md b/keyboards/koolertron/amag09/readme.md new file mode 100644 index 0000000000..07782c496c --- /dev/null +++ b/keyboards/koolertron/amag09/readme.md @@ -0,0 +1,29 @@ +# AMAG09 (Koolertron) + +![Koolertron AMAG09](https://i.imgur.com/mepvkTe.jpg) + +One Handed Macro Mechanical Keyboard, 9 Key with optional RGB backlighting. + +- Keyboard Maintainer: [al177](https://github.com/al177) +- Hardware Supported: AMAG09 (ATmega32A) +- Hardware Availability: + - [Amazon](https://www.amazon.com/Koolertron-Mechanical-Keyboard-One-Handed-Programmable/dp/B0998QM9L2) + +Make example for this keyboard (after setting up your build environment): + + make koolertron/amag09:default + +Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) + + make amag09:default:flash + make amag09:vial:flash + +**Reset Key**: Hold down the *upper left* key while plugging in the keyboard. + +**Tips**: +- The keyboard comes with bootloadHID installed from factory. +- The configuration here is for the single color LED keyboard. RGB versions are presumed to be i2c like the amag23 + +Based on keyboards/amag23 by ianmclinden + +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/koolertron/amag09/rules.mk b/keyboards/koolertron/amag09/rules.mk new file mode 100644 index 0000000000..ad892c12c4 --- /dev/null +++ b/keyboards/koolertron/amag09/rules.mk @@ -0,0 +1 @@ +# Placeholder so this board is recognized as a target From 91795779a63cf48c7c549e21943829b50ffa6276 Mon Sep 17 00:00:00 2001 From: blindassassin111 <38090555+blindassassin111@users.noreply.github.com> Date: Tue, 28 Mar 2023 20:48:54 -0500 Subject: [PATCH 03/18] Update viktus/minne info.JSON (#422) * Update info.JSON to match QMK repo modification * Disabling extrakeys and mousekeys in vial rules.mk --- keyboards/viktus/minne/info.json | 4 +- keyboards/viktus/minne/keymaps/via/minne.json | 37 ++++++++++++++++--- keyboards/viktus/minne/keymaps/vial/rules.mk | 2 + 3 files changed, 36 insertions(+), 7 deletions(-) diff --git a/keyboards/viktus/minne/info.json b/keyboards/viktus/minne/info.json index a3c2d64511..396aca8bcd 100644 --- a/keyboards/viktus/minne/info.json +++ b/keyboards/viktus/minne/info.json @@ -15,8 +15,8 @@ "bootmagic": true, "command": false, "console": false, - "extrakey": false, - "mousekey": false, + "extrakey": true, + "mousekey": true, "nkro": true }, "bootmagic": { diff --git a/keyboards/viktus/minne/keymaps/via/minne.json b/keyboards/viktus/minne/keymaps/via/minne.json index 8df39108cc..e715a8a452 100644 --- a/keyboards/viktus/minne/keymaps/via/minne.json +++ b/keyboards/viktus/minne/keymaps/via/minne.json @@ -14,8 +14,17 @@ ], "keymap": [ [ + { + "c":"#777777" + }, "1,0", + { + "c":"#aaaaaa" + }, "1,1", + { + "c":"#cccccc" + }, "0,1", "0,2", "1,2", @@ -26,6 +35,7 @@ "1,5", "0,5", { + "c":"#aaaaaa", "w":1.75 }, "0,6" @@ -35,6 +45,9 @@ "w":1.25 }, "3,0", + { + "c":"#cccccc" + }, "3,1", "2,1", "2,2", @@ -46,15 +59,20 @@ "3,5", "2,5", { + "c":"#777777", "w":1.5 }, "2,6" ], [ { + "c":"#aaaaaa", "w":1.75 }, "5,0", + { + "c":"#cccccc" + }, "5,1", "4,1", "4,2", @@ -65,6 +83,9 @@ "5,4", "5,5", "4,5", + { + "c":"#aaaaaa" + }, "4,6" ], [ @@ -78,6 +99,7 @@ }, "6,2\n\n\n0,0", { + "c":"#cccccc", "w":1.75 }, "7,2\n\n\n0,0", @@ -86,7 +108,7 @@ }, "6,3\n\n\n0,0", { - "x":0, + "c":"#aaaaaa", "w":1.25 }, "6,4\n\n\n0,0", @@ -103,6 +125,7 @@ }, "6,1\n\n\n0,1", { + "c":"#cccccc", "w":2.75 }, "7,2\n\n\n0,1", @@ -111,7 +134,7 @@ }, "6,3\n\n\n0,1", { - "x":0, + "c":"#aaaaaa", "w":1.5 }, "7,4\n\n\n0,1", @@ -124,6 +147,7 @@ "7,1\n\n\n0,2", "6,1\n\n\n0,2", { + "c":"#cccccc", "w":3 }, "7,2\n\n\n0,2", @@ -132,7 +156,7 @@ }, "6,3\n\n\n0,2", { - "x":0 + "c":"#aaaaaa" }, "7,4\n\n\n0,2", "7,5\n\n\n0,2" @@ -144,11 +168,12 @@ "7,1\n\n\n0,3", "6,1\n\n\n0,3", { + "c":"#cccccc", "w":6 }, "7,3\n\n\n0,3", { - "x":0 + "c":"#aaaaaa" }, "7,4\n\n\n0,3", "7,5\n\n\n0,3" @@ -160,11 +185,12 @@ }, "7,1\n\n\n0,4", { + "c":"#cccccc", "w":7 }, "7,3\n\n\n0,4", { - "x":0, + "c":"#aaaaaa", "w":1.5 }, "7,5\n\n\n0,4" @@ -172,6 +198,7 @@ [ { "x":1.38, + "c":"#cccccc", "w":10 }, "7,3\n\n\n0,5" diff --git a/keyboards/viktus/minne/keymaps/vial/rules.mk b/keyboards/viktus/minne/keymaps/vial/rules.mk index b1f3ec8e4d..b993c43f1c 100644 --- a/keyboards/viktus/minne/keymaps/vial/rules.mk +++ b/keyboards/viktus/minne/keymaps/vial/rules.mk @@ -2,3 +2,5 @@ VIA_ENABLE = yes VIAL_ENABLE = yes LTO_ENABLE = yes KEY_OVERRIDE_ENABLE = no +EXTRAKEY_ENABLE = no +MOUSEKEY_ENABLE = no From 8015280c80c6f50aadf8d8f4203f75bf4f497cc2 Mon Sep 17 00:00:00 2001 From: rachmansyahbs Date: Wed, 29 Mar 2023 09:49:19 +0800 Subject: [PATCH 04/18] Add vial keymap for Pearlboards Pandora with encoder support (#423) --- .../pearlboards/pandora/keymaps/vial/config.h | 14 ++ .../pearlboards/pandora/keymaps/vial/keymap.c | 82 +++++++++++ .../pearlboards/pandora/keymaps/vial/rules.mk | 8 + .../pandora/keymaps/vial/vial.json | 137 ++++++++++++++++++ 4 files changed, 241 insertions(+) create mode 100644 keyboards/pearlboards/pandora/keymaps/vial/config.h create mode 100644 keyboards/pearlboards/pandora/keymaps/vial/keymap.c create mode 100644 keyboards/pearlboards/pandora/keymaps/vial/rules.mk create mode 100644 keyboards/pearlboards/pandora/keymaps/vial/vial.json diff --git a/keyboards/pearlboards/pandora/keymaps/vial/config.h b/keyboards/pearlboards/pandora/keymaps/vial/config.h new file mode 100644 index 0000000000..f3c405bcb2 --- /dev/null +++ b/keyboards/pearlboards/pandora/keymaps/vial/config.h @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#pragma once + +#define VIAL_KEYBOARD_UID {0x96, 0xA0, 0x33, 0x0C, 0x28, 0x21, 0x96, 0x63} + +#define VIAL_UNLOCK_COMBO_ROWS { 0, 2 } +#define VIAL_UNLOCK_COMBO_COLS { 0, 13 } + +#undef ENCODER_RESOLUTION +#define ENCODER_RESOLUTION 4 + +// space saving measures +#define VIAL_COMBO_ENTRIES 2 diff --git a/keyboards/pearlboards/pandora/keymaps/vial/keymap.c b/keyboards/pearlboards/pandora/keymaps/vial/keymap.c new file mode 100644 index 0000000000..fb766287a9 --- /dev/null +++ b/keyboards/pearlboards/pandora/keymaps/vial/keymap.c @@ -0,0 +1,82 @@ +/* +Copyright 2021 Koobaczech + +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 + +enum custom_keycodes { + RGBWINGS = SAFE_RANGE, +}; + +/* Function to only light up winglets RGB. Must be done in static RGB mode */ +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case RGBWINGS: + if (record->event.pressed) { + /* Blackout these RGB components */ + tap_code16(RGB_MODE_PLAIN); + rgblight_setrgb_at(0, 0, 0, 0); + rgblight_setrgb_at(0, 0, 0, 1); + rgblight_setrgb_at(0, 0, 0, 4); + rgblight_setrgb_at(0, 0, 0, 5); + rgblight_setrgb_at(0, 0, 0, 6); + rgblight_setrgb_at(0, 0, 0, 7); + rgblight_setrgb_at(0, 0, 0, 10); + rgblight_setrgb_at(0, 0, 0, 11); + } + break; + } + return true; +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_GESC, 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_DEL, KC_BSPC, + 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_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, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL), + + [1] = LAYOUT_all( + QK_BOOT, 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_TRNS, KC_DEL, + KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, RGBWINGS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT), + + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [1] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, + [2] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, + [3] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, +}; +#endif diff --git a/keyboards/pearlboards/pandora/keymaps/vial/rules.mk b/keyboards/pearlboards/pandora/keymaps/vial/rules.mk new file mode 100644 index 0000000000..acd7bd5f3f --- /dev/null +++ b/keyboards/pearlboards/pandora/keymaps/vial/rules.mk @@ -0,0 +1,8 @@ +VIA_ENABLE = yes +VIAL_ENABLE = yes +ENCODER_MAP_ENABLE = yes +# space saving measures +LTO_ENABLE = yes +TAP_DANCE_ENABLE = no +KEY_OVERRIDE_ENABLE = no +QMK_SETTINGS = no diff --git a/keyboards/pearlboards/pandora/keymaps/vial/vial.json b/keyboards/pearlboards/pandora/keymaps/vial/vial.json new file mode 100644 index 0000000000..3811c4bc7a --- /dev/null +++ b/keyboards/pearlboards/pandora/keymaps/vial/vial.json @@ -0,0 +1,137 @@ +{ + "name": "Pandora - By Koobaczech", + "vendorId": "0x6963", + "productId": "0x6963", + "lighting": "qmk_rgblight", + "matrix": {"rows": 5, "cols": 15}, + "layouts": { + "labels": [ + ["Backspace", "Split", "Full"], + ["Enter", "ISO", "ANSI"], + ["Left Shift", "Split", "Full"], + ["Right Shift", "Split", "Full"], + ["Bottom Row", "ANSI", "Tsangan"] + ], + "keymap": [ + [ {"x":8.75}, "0,1\n\n\n\n\n\n\n\n\ne", {"x": 1}, "0,0\n\n\n\n\n\n\n\n\ne" ], + [ + { "c": "#777777", "x": 2.75 }, + "0,0", + { "c": "#cccccc" }, + "0,1", + "0,2", + "0,3", + "0,4", + "0,5", + "0,6", + "0,7", + "0,8", + "0,9", + "0,10", + "0,11", + "0,12", + "0,13\n\n\n0,0", + { "c": "#aaaaaa" }, + "0,14\n\n\n0,0", + { "x": 1.25, "w": 2 }, + "0,14\n\n\n0,1" + ], + [ + { "w": 1.5, "x": 2.75 }, + "1,0", + { "c": "#cccccc" }, + "1,1", + "1,2", + "1,3", + "1,4", + "1,5", + "1,6", + "1,7", + "1,8", + "1,9", + "1,10", + "1,11", + "1,12", + { "c": "#aaaaaa", "w": 1.5, "x": 3.25 }, + "1,13\n\n\n1,1" + ], + [ + { "c": "#aaaaaa", "w": 1.75, "x": 2.75 }, + "2,0", + { "c": "#cccccc" }, + "2,1", + "2,2", + "2,3", + "2,4", + "2,5", + "2,6", + "2,7", + "2,8", + "2,9", + "2,10", + "2,11", + { "c": "#cccccc" }, + "2,12\n\n\n1,0", + { "c": "#777777", "y": -1, "w": 1.25, "h": 2, "w2": 1.5, "h2": 1, "x2": -0.25 }, + "2,13\n\n\n1,0", + { "c": "#777777", "w": 2.25, "x": 1, "y": 1 }, + "2,13\n\n\n1,1" + ], + [ + { "c": "#aaaaaa", "w": 2.25 }, + "3,0\n\n\n2,1", + { "c": "#aaaaaa", "w": 1.25, "x": 0.5 }, + "3,0\n\n\n2,0", + { "c": "#cccccc" }, + "3,1\n\n\n2,0", + "3,2", + "3,3", + "3,4", + "3,5", + "3,6", + "3,7", + "3,8", + "3,9", + "3,10", + "3,11", + { "c": "#aaaaaa", "w": 1.75 }, + "3,12\n\n\n3,0", + "3,13\n\n\n3,0", + { "c": "#aaaaaa", "w": 2.75, "x": 0.5 }, + "3,12\n\n\n3,1" + ], + [ + { "w": 1.25, "x": 2.75 }, + "4,0\n\n\n4,0", + { "w": 1.25 }, + "4,1\n\n\n4,0", + { "w": 1.25 }, + "4,2\n\n\n4,0", + { "c": "#cccccc", "w": 6.25 }, + "4,6\n\n\n4,0", + { "c": "#aaaaaa", "w": 1.25 }, + "4,10\n\n\n4,0", + { "w": 1.25 }, + "4,11\n\n\n4,0", + { "w": 1.25 }, + "4,12\n\n\n4,0", + { "w": 1.25 }, + "4,13\n\n\n4,0" + ], + [ + { "w": 1.5, "x": 2.75, "y": 0.5 }, + "4,0\n\n\n4,1", + "4,1\n\n\n4,1", + { "w": 1.5 }, + "4,2\n\n\n4,1", + { "c": "#cccccc", "w": 7 }, + "4,6\n\n\n4,1", + { "w": 1.5 }, + "4,11\n\n\n4,1", + "4,12\n\n\n4,1", + { "w": 1.5 }, + "4,13\n\n\n4,1" + ] + ] + } +} From 21969eda47f4dfcfa761f411a4bad549401d3ee2 Mon Sep 17 00:00:00 2001 From: blindassassin111 <38090555+blindassassin111@users.noreply.github.com> Date: Tue, 28 Mar 2023 20:49:45 -0500 Subject: [PATCH 05/18] Adding Viktus Minne - Topre (#424) --- keyboards/viktus/minne_topre/ec.c | 179 ++++++++++++ keyboards/viktus/minne_topre/ec.h | 31 +++ keyboards/viktus/minne_topre/info.json | 256 ++++++++++++++++++ .../minne_topre/keymaps/default/keymap.c | 26 ++ .../viktus/minne_topre/keymaps/via/keymap.c | 26 ++ .../minne_topre/keymaps/via/minne_topre.json | 151 +++++++++++ .../viktus/minne_topre/keymaps/via/rules.mk | 1 + .../viktus/minne_topre/keymaps/vial/config.h | 6 + .../viktus/minne_topre/keymaps/vial/keymap.c | 26 ++ .../viktus/minne_topre/keymaps/vial/rules.mk | 6 + .../viktus/minne_topre/keymaps/vial/vial.json | 127 +++++++++ keyboards/viktus/minne_topre/minne_topre.c | 49 ++++ keyboards/viktus/minne_topre/readme.md | 27 ++ keyboards/viktus/minne_topre/rules.mk | 3 + 14 files changed, 914 insertions(+) create mode 100644 keyboards/viktus/minne_topre/ec.c create mode 100644 keyboards/viktus/minne_topre/ec.h create mode 100644 keyboards/viktus/minne_topre/info.json create mode 100644 keyboards/viktus/minne_topre/keymaps/default/keymap.c create mode 100644 keyboards/viktus/minne_topre/keymaps/via/keymap.c create mode 100644 keyboards/viktus/minne_topre/keymaps/via/minne_topre.json create mode 100644 keyboards/viktus/minne_topre/keymaps/via/rules.mk create mode 100644 keyboards/viktus/minne_topre/keymaps/vial/config.h create mode 100644 keyboards/viktus/minne_topre/keymaps/vial/keymap.c create mode 100644 keyboards/viktus/minne_topre/keymaps/vial/rules.mk create mode 100644 keyboards/viktus/minne_topre/keymaps/vial/vial.json create mode 100644 keyboards/viktus/minne_topre/minne_topre.c create mode 100644 keyboards/viktus/minne_topre/readme.md create mode 100644 keyboards/viktus/minne_topre/rules.mk diff --git a/keyboards/viktus/minne_topre/ec.c b/keyboards/viktus/minne_topre/ec.c new file mode 100644 index 0000000000..569c878582 --- /dev/null +++ b/keyboards/viktus/minne_topre/ec.c @@ -0,0 +1,179 @@ +/* Copyright 2023 Viktus Design LLC + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "quantum.h" +#include "ec.h" +#include "analog.h" +//#include "debug.h" // needed for debugging + +// sensing channel definitions +#define A0 0 +#define A1 1 +#define A2 2 +#define A3 3 +#define A4 4 +#define A5 5 +#define A6 6 +#define A7 7 + +// analog connection settings +#define DISCHARGE_PIN D5 +#define ANALOG_PORT D4 + +#ifndef MUX_SEL_PIN +# define MUX_SEL_PINS \ + { D1, D2, D3 } +#endif + +// pin connections +const uint8_t row_channels[] = MATRIX_ROW_PINS; +const uint8_t col_pins[] = MATRIX_COL_PINS; +const uint8_t mux_sel_pins[] = MUX_SEL_PINS; + +_Static_assert(sizeof(mux_sel_pins) == 3, "invalid MUX_SEL_PINS"); + +static ec_config_t config; +static uint16_t ec_sw_value[MATRIX_COLS][MATRIX_ROWS]; + +static inline void discharge_capacitor(void) { setPinOutput(DISCHARGE_PIN); } +static inline void charge_capacitor(uint8_t col) { + setPinInput(DISCHARGE_PIN); + writePinHigh(col_pins[col]); +} + +static inline void clear_all_col_pins(void) { + for (int col = 0; col < sizeof(col_pins); col++) { + writePinLow(col_pins[col]); + } +} + +void init_mux_sel(void) { + for (int idx = 0; idx < sizeof(mux_sel_pins); idx++) { + setPinOutput(mux_sel_pins[idx]); + } +} + +void select_mux(uint8_t row) { + uint8_t ch = row_channels[row]; + writePin(mux_sel_pins[0], ch & 1); + writePin(mux_sel_pins[1], ch & 2); + writePin(mux_sel_pins[2], ch & 4); +} + +void init_col(void) { + for (int idx = 0; idx < sizeof(col_pins); idx++) { + setPinOutput(col_pins[idx]); + writePinLow(col_pins[idx]); + } +} + +void ec_init(ec_config_t const* const ec_config) { + // save config + config = *ec_config; + + // initialize discharge pin as discharge mode + writePinLow(DISCHARGE_PIN); + setPinOutput(DISCHARGE_PIN); + + // set analog reference + analogReference(ADC_REF_POWER); + + // initialize drive lines + init_col(); + + // initialize multiplexer select pin + init_mux_sel(); + + // set discharge pin to charge mode + setPinInput(DISCHARGE_PIN); +} + +uint16_t ec_readkey_raw(uint8_t col, uint8_t row) { + uint16_t sw_value = 0; + + discharge_capacitor(); + + select_mux(row); + + clear_all_col_pins(); + + cli(); + + charge_capacitor(col); + + sw_value = analogReadPin(ANALOG_PORT); + + sei(); + + return sw_value; +} + +bool ec_update_key(matrix_row_t* current_row, matrix_row_t col, uint16_t sw_value, uint16_t reset_pt, uint16_t actuation_pt) { + bool current_state = (*current_row >> col) & 1; + + // press to release + if (current_state && sw_value < reset_pt) { + *current_row &= ~(MATRIX_ROW_SHIFTER << col); + return true; + } + + // release to press + if ((!current_state) && sw_value > actuation_pt) { + *current_row |= (MATRIX_ROW_SHIFTER << col); + return true; + } + + return false; +} + +bool ec_matrix_scan(matrix_row_t current_matrix[]) { + bool updated = false; + + for (int row = 0; row < sizeof(row_channels); row++) { + for (int col = 0; col < sizeof(col_pins); col++) { + uint16_t reset_pt = config.reset_pt; + uint16_t actuation_pt = config.actuation_pt; + + //Modifying threshold values for overlapping pads + switch(row) { + case 3: + switch(col) { + case 1: + case 10: // lower threshold for bottom outside mods (40 rest, 50 act, 58 btm) + reset_pt = 45; + actuation_pt = 50; + break; + } + break; + } + + ec_sw_value[col][row] = ec_readkey_raw(col, row); + updated |= ec_update_key(¤t_matrix[row], col, ec_sw_value[col][row], reset_pt, actuation_pt); + } + } + + return updated; +} + +// console debugging for pad values +/*void ec_dprint_matrix(void) { + for (int row = 0; row < sizeof(row_channels); row++) { + for (int col = 0; col < sizeof(col_pins); col++) { + dprintf("%5d", ec_sw_value[col][row]); + } + dprintf("\n"); + } +}*/ diff --git a/keyboards/viktus/minne_topre/ec.h b/keyboards/viktus/minne_topre/ec.h new file mode 100644 index 0000000000..8d3a4f04f8 --- /dev/null +++ b/keyboards/viktus/minne_topre/ec.h @@ -0,0 +1,31 @@ +/* Copyright 2023 Viktus Design LLC + * + * 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 +#include + +#include "matrix.h" + +typedef struct { + uint16_t reset_pt; + uint16_t actuation_pt; +} ec_config_t; + +void ec_init(ec_config_t const* const ec_config); +bool ec_matrix_scan(matrix_row_t current_matrix[]); +//void ec_dprint_matrix(void); // needed for debugging +uint16_t ec_readkey_raw(uint8_t col, uint8_t row); +bool ec_update_key(matrix_row_t* current_row, matrix_row_t col, uint16_t sw_value, uint16_t reset_pt, uint16_t actuation_pt); diff --git a/keyboards/viktus/minne_topre/info.json b/keyboards/viktus/minne_topre/info.json new file mode 100644 index 0000000000..afe00b7652 --- /dev/null +++ b/keyboards/viktus/minne_topre/info.json @@ -0,0 +1,256 @@ +{ + "manufacturer": "Viktus Design LLC", + "keyboard_name": "Viktus Minne - Topre", + "maintainer": "BlindAssassin111", + "url": "https://viktus.design", + "usb": { + "device_version": "1.3.0", + "vid": "0x5644", + "pid": "0x4D54" + }, + "bootloader": "atmel-dfu", + "processor": "atmega32u4", + "features": { + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true + }, + "bootmagic": { + "matrix": [0,0] + }, + "build": { + "lto": true + }, + "diode_direction": "COL2ROW", + "matrix_pins": { + "cols": ["B7", "D0", "B6", "D6", "C6", "C7", "D7", "F7", "B4", "F6", "F5", "B5"], + "rows": ["A0", "A1", "A3", "A4"] + }, + "layouts": { + "LAYOUT_all": { + "layout": [ + { "label": "K00", "matrix": [0, 0], "w": 1, "x": 0, "y": 0 }, + { "label": "K01", "matrix": [0, 1], "w": 1, "x": 1, "y": 0 }, + { "label": "K02", "matrix": [0, 2], "w": 1, "x": 2, "y": 0 }, + { "label": "K03", "matrix": [0, 3], "w": 1, "x": 3, "y": 0 }, + { "label": "K04", "matrix": [0, 4], "w": 1, "x": 4, "y": 0 }, + { "label": "K05", "matrix": [0, 5], "w": 1, "x": 5, "y": 0 }, + { "label": "K06", "matrix": [0, 6], "w": 1, "x": 6, "y": 0 }, + { "label": "K07", "matrix": [0, 7], "w": 1, "x": 7, "y": 0 }, + { "label": "K08", "matrix": [0, 8], "w": 1, "x": 8, "y": 0 }, + { "label": "K09", "matrix": [0, 9], "w": 1, "x": 9, "y": 0 }, + { "label": "K0A", "matrix": [0, 10], "w": 1, "x": 10, "y": 0 }, + { "label": "K0B", "matrix": [0, 11], "w": 1.75, "x": 11, "y": 0 }, + { "label": "K10", "matrix": [1, 0], "w": 1.25, "x": 0, "y": 1 }, + { "label": "K11", "matrix": [1, 1], "w": 1, "x": 1.25, "y": 1 }, + { "label": "K12", "matrix": [1, 2], "w": 1, "x": 2.25, "y": 1 }, + { "label": "K13", "matrix": [1, 3], "w": 1, "x": 3.25, "y": 1 }, + { "label": "K14", "matrix": [1, 4], "w": 1, "x": 4.25, "y": 1 }, + { "label": "K15", "matrix": [1, 5], "w": 1, "x": 5.25, "y": 1 }, + { "label": "K16", "matrix": [1, 6], "w": 1, "x": 6.25, "y": 1 }, + { "label": "K17", "matrix": [1, 7], "w": 1, "x": 7.25, "y": 1 }, + { "label": "K18", "matrix": [1, 8], "w": 1, "x": 8.25, "y": 1 }, + { "label": "K19", "matrix": [1, 9], "w": 1, "x": 9.25, "y": 1 }, + { "label": "K1A", "matrix": [1, 10], "w": 1, "x": 10.25, "y": 1 }, + { "label": "K1B", "matrix": [1, 11], "w": 1.5, "x": 11.25, "y": 1 }, + { "label": "K20", "matrix": [2, 0], "w": 1.75, "x": 0, "y": 2 }, + { "label": "K21", "matrix": [2, 1], "w": 1, "x": 1.75, "y": 2 }, + { "label": "K22", "matrix": [2, 2], "w": 1, "x": 2.75, "y": 2 }, + { "label": "K23", "matrix": [2, 3], "w": 1, "x": 3.75, "y": 2 }, + { "label": "K24", "matrix": [2, 4], "w": 1, "x": 4.75, "y": 2 }, + { "label": "K25", "matrix": [2, 5], "w": 1, "x": 5.75, "y": 2 }, + { "label": "K26", "matrix": [2, 6], "w": 1, "x": 6.75, "y": 2 }, + { "label": "K27", "matrix": [2, 7], "w": 1, "x": 7.75, "y": 2 }, + { "label": "K28", "matrix": [2, 8], "w": 1, "x": 8.75, "y": 2 }, + { "label": "K29", "matrix": [2, 9], "w": 1, "x": 9.75, "y": 2 }, + { "label": "K2A", "matrix": [2, 10], "w": 1, "x": 10.75, "y": 2 }, + { "label": "K2B", "matrix": [2, 11], "w": 1, "x": 11.75, "y": 2 }, + { "label": "K31", "matrix": [3, 1], "w": 1, "x": 1.375, "y": 3 }, + { "label": "K32", "matrix": [3, 2], "w": 1, "x": 2.375, "y": 3 }, + { "label": "K34", "matrix": [3, 4], "w": 2.5, "x": 3.375, "y": 3 }, + { "label": "K35", "matrix": [3, 5], "w": 1, "x": 5.875, "y": 3 }, + { "label": "K37", "matrix": [3, 7], "w": 2.5, "x": 6.875, "y": 3 }, + { "label": "K39", "matrix": [3, 9], "w": 1, "x": 9.375, "y": 3 }, + { "label": "K3A", "matrix": [3, 10], "w": 1, "x": 10.375, "y": 3 } + ] + }, + "LAYOUT_dual_3u": { + "layout": [ + { "label": "K00", "matrix": [0, 0], "w": 1, "x": 0, "y": 0 }, + { "label": "K01", "matrix": [0, 1], "w": 1, "x": 1, "y": 0 }, + { "label": "K02", "matrix": [0, 2], "w": 1, "x": 2, "y": 0 }, + { "label": "K03", "matrix": [0, 3], "w": 1, "x": 3, "y": 0 }, + { "label": "K04", "matrix": [0, 4], "w": 1, "x": 4, "y": 0 }, + { "label": "K05", "matrix": [0, 5], "w": 1, "x": 5, "y": 0 }, + { "label": "K06", "matrix": [0, 6], "w": 1, "x": 6, "y": 0 }, + { "label": "K07", "matrix": [0, 7], "w": 1, "x": 7, "y": 0 }, + { "label": "K08", "matrix": [0, 8], "w": 1, "x": 8, "y": 0 }, + { "label": "K09", "matrix": [0, 9], "w": 1, "x": 9, "y": 0 }, + { "label": "K0A", "matrix": [0, 10], "w": 1, "x": 10, "y": 0 }, + { "label": "K0B", "matrix": [0, 11], "w": 1.75, "x": 11, "y": 0 }, + { "label": "K10", "matrix": [1, 0], "w": 1.25, "x": 0, "y": 1 }, + { "label": "K11", "matrix": [1, 1], "w": 1, "x": 1.25, "y": 1 }, + { "label": "K12", "matrix": [1, 2], "w": 1, "x": 2.25, "y": 1 }, + { "label": "K13", "matrix": [1, 3], "w": 1, "x": 3.25, "y": 1 }, + { "label": "K14", "matrix": [1, 4], "w": 1, "x": 4.25, "y": 1 }, + { "label": "K15", "matrix": [1, 5], "w": 1, "x": 5.25, "y": 1 }, + { "label": "K16", "matrix": [1, 6], "w": 1, "x": 6.25, "y": 1 }, + { "label": "K17", "matrix": [1, 7], "w": 1, "x": 7.25, "y": 1 }, + { "label": "K18", "matrix": [1, 8], "w": 1, "x": 8.25, "y": 1 }, + { "label": "K19", "matrix": [1, 9], "w": 1, "x": 9.25, "y": 1 }, + { "label": "K1A", "matrix": [1, 10], "w": 1, "x": 10.25, "y": 1 }, + { "label": "K1B", "matrix": [1, 11], "w": 1.5, "x": 11.25, "y": 1 }, + { "label": "K20", "matrix": [2, 0], "w": 1.75, "x": 0, "y": 2 }, + { "label": "K21", "matrix": [2, 1], "w": 1, "x": 1.75, "y": 2 }, + { "label": "K22", "matrix": [2, 2], "w": 1, "x": 2.75, "y": 2 }, + { "label": "K23", "matrix": [2, 3], "w": 1, "x": 3.75, "y": 2 }, + { "label": "K24", "matrix": [2, 4], "w": 1, "x": 4.75, "y": 2 }, + { "label": "K25", "matrix": [2, 5], "w": 1, "x": 5.75, "y": 2 }, + { "label": "K26", "matrix": [2, 6], "w": 1, "x": 6.75, "y": 2 }, + { "label": "K27", "matrix": [2, 7], "w": 1, "x": 7.75, "y": 2 }, + { "label": "K28", "matrix": [2, 8], "w": 1, "x": 8.75, "y": 2 }, + { "label": "K29", "matrix": [2, 9], "w": 1, "x": 9.75, "y": 2 }, + { "label": "K2A", "matrix": [2, 10], "w": 1, "x": 10.75, "y": 2 }, + { "label": "K2B", "matrix": [2, 11], "w": 1, "x": 11.75, "y": 2 }, + { "label": "K31", "matrix": [3, 1], "w": 1, "x": 1.375, "y": 3 }, + { "label": "K32", "matrix": [3, 2], "w": 1, "x": 2.375, "y": 3 }, + { "label": "K34", "matrix": [3, 4], "w": 3, "x": 3.375, "y": 3 }, + { "label": "K37", "matrix": [3, 7], "w": 3, "x": 6.375, "y": 3 }, + { "label": "K39", "matrix": [3, 9], "w": 1, "x": 9.375, "y": 3 }, + { "label": "K3A", "matrix": [3, 10], "w": 1, "x": 10.375, "y": 3 } + ] + }, + "LAYOUT_6u": { + "layout": [ + { "label": "K00", "matrix": [0, 0], "w": 1, "x": 0, "y": 0 }, + { "label": "K01", "matrix": [0, 1], "w": 1, "x": 1, "y": 0 }, + { "label": "K02", "matrix": [0, 2], "w": 1, "x": 2, "y": 0 }, + { "label": "K03", "matrix": [0, 3], "w": 1, "x": 3, "y": 0 }, + { "label": "K04", "matrix": [0, 4], "w": 1, "x": 4, "y": 0 }, + { "label": "K05", "matrix": [0, 5], "w": 1, "x": 5, "y": 0 }, + { "label": "K06", "matrix": [0, 6], "w": 1, "x": 6, "y": 0 }, + { "label": "K07", "matrix": [0, 7], "w": 1, "x": 7, "y": 0 }, + { "label": "K08", "matrix": [0, 8], "w": 1, "x": 8, "y": 0 }, + { "label": "K09", "matrix": [0, 9], "w": 1, "x": 9, "y": 0 }, + { "label": "K0A", "matrix": [0, 10], "w": 1, "x": 10, "y": 0 }, + { "label": "K0B", "matrix": [0, 11], "w": 1.75, "x": 11, "y": 0 }, + { "label": "K10", "matrix": [1, 0], "w": 1.25, "x": 0, "y": 1 }, + { "label": "K11", "matrix": [1, 1], "w": 1, "x": 1.25, "y": 1 }, + { "label": "K12", "matrix": [1, 2], "w": 1, "x": 2.25, "y": 1 }, + { "label": "K13", "matrix": [1, 3], "w": 1, "x": 3.25, "y": 1 }, + { "label": "K14", "matrix": [1, 4], "w": 1, "x": 4.25, "y": 1 }, + { "label": "K15", "matrix": [1, 5], "w": 1, "x": 5.25, "y": 1 }, + { "label": "K16", "matrix": [1, 6], "w": 1, "x": 6.25, "y": 1 }, + { "label": "K17", "matrix": [1, 7], "w": 1, "x": 7.25, "y": 1 }, + { "label": "K18", "matrix": [1, 8], "w": 1, "x": 8.25, "y": 1 }, + { "label": "K19", "matrix": [1, 9], "w": 1, "x": 9.25, "y": 1 }, + { "label": "K1A", "matrix": [1, 10], "w": 1, "x": 10.25, "y": 1 }, + { "label": "K1B", "matrix": [1, 11], "w": 1.5, "x": 11.25, "y": 1 }, + { "label": "K20", "matrix": [2, 0], "w": 1.75, "x": 0, "y": 2 }, + { "label": "K21", "matrix": [2, 1], "w": 1, "x": 1.75, "y": 2 }, + { "label": "K22", "matrix": [2, 2], "w": 1, "x": 2.75, "y": 2 }, + { "label": "K23", "matrix": [2, 3], "w": 1, "x": 3.75, "y": 2 }, + { "label": "K24", "matrix": [2, 4], "w": 1, "x": 4.75, "y": 2 }, + { "label": "K25", "matrix": [2, 5], "w": 1, "x": 5.75, "y": 2 }, + { "label": "K26", "matrix": [2, 6], "w": 1, "x": 6.75, "y": 2 }, + { "label": "K27", "matrix": [2, 7], "w": 1, "x": 7.75, "y": 2 }, + { "label": "K28", "matrix": [2, 8], "w": 1, "x": 8.75, "y": 2 }, + { "label": "K29", "matrix": [2, 9], "w": 1, "x": 9.75, "y": 2 }, + { "label": "K2A", "matrix": [2, 10], "w": 1, "x": 10.75, "y": 2 }, + { "label": "K2B", "matrix": [2, 11], "w": 1, "x": 11.75, "y": 2 }, + { "label": "K31", "matrix": [3, 1], "w": 1, "x": 1.375, "y": 3 }, + { "label": "K32", "matrix": [3, 2], "w": 1, "x": 2.375, "y": 3 }, + { "label": "K35", "matrix": [3, 5], "w": 6, "x": 3.375, "y": 3 }, + { "label": "K39", "matrix": [3, 9], "w": 1, "x": 9.375, "y": 3 }, + { "label": "K3A", "matrix": [3, 10], "w": 1, "x": 10.375, "y": 3 } + ] + }, + "LAYOUT_7u": { + "layout": [ + { "label": "K00", "matrix": [0, 0], "w": 1, "x": 0, "y": 0 }, + { "label": "K01", "matrix": [0, 1], "w": 1, "x": 1, "y": 0 }, + { "label": "K02", "matrix": [0, 2], "w": 1, "x": 2, "y": 0 }, + { "label": "K03", "matrix": [0, 3], "w": 1, "x": 3, "y": 0 }, + { "label": "K04", "matrix": [0, 4], "w": 1, "x": 4, "y": 0 }, + { "label": "K05", "matrix": [0, 5], "w": 1, "x": 5, "y": 0 }, + { "label": "K06", "matrix": [0, 6], "w": 1, "x": 6, "y": 0 }, + { "label": "K07", "matrix": [0, 7], "w": 1, "x": 7, "y": 0 }, + { "label": "K08", "matrix": [0, 8], "w": 1, "x": 8, "y": 0 }, + { "label": "K09", "matrix": [0, 9], "w": 1, "x": 9, "y": 0 }, + { "label": "K0A", "matrix": [0, 10], "w": 1, "x": 10, "y": 0 }, + { "label": "K0B", "matrix": [0, 11], "w": 1.75, "x": 11, "y": 0 }, + { "label": "K10", "matrix": [1, 0], "w": 1.25, "x": 0, "y": 1 }, + { "label": "K11", "matrix": [1, 1], "w": 1, "x": 1.25, "y": 1 }, + { "label": "K12", "matrix": [1, 2], "w": 1, "x": 2.25, "y": 1 }, + { "label": "K13", "matrix": [1, 3], "w": 1, "x": 3.25, "y": 1 }, + { "label": "K14", "matrix": [1, 4], "w": 1, "x": 4.25, "y": 1 }, + { "label": "K15", "matrix": [1, 5], "w": 1, "x": 5.25, "y": 1 }, + { "label": "K16", "matrix": [1, 6], "w": 1, "x": 6.25, "y": 1 }, + { "label": "K17", "matrix": [1, 7], "w": 1, "x": 7.25, "y": 1 }, + { "label": "K18", "matrix": [1, 8], "w": 1, "x": 8.25, "y": 1 }, + { "label": "K19", "matrix": [1, 9], "w": 1, "x": 9.25, "y": 1 }, + { "label": "K1A", "matrix": [1, 10], "w": 1, "x": 10.25, "y": 1 }, + { "label": "K1B", "matrix": [1, 11], "w": 1.5, "x": 11.25, "y": 1 }, + { "label": "K20", "matrix": [2, 0], "w": 1.75, "x": 0, "y": 2 }, + { "label": "K21", "matrix": [2, 1], "w": 1, "x": 1.75, "y": 2 }, + { "label": "K22", "matrix": [2, 2], "w": 1, "x": 2.75, "y": 2 }, + { "label": "K23", "matrix": [2, 3], "w": 1, "x": 3.75, "y": 2 }, + { "label": "K24", "matrix": [2, 4], "w": 1, "x": 4.75, "y": 2 }, + { "label": "K25", "matrix": [2, 5], "w": 1, "x": 5.75, "y": 2 }, + { "label": "K26", "matrix": [2, 6], "w": 1, "x": 6.75, "y": 2 }, + { "label": "K27", "matrix": [2, 7], "w": 1, "x": 7.75, "y": 2 }, + { "label": "K28", "matrix": [2, 8], "w": 1, "x": 8.75, "y": 2 }, + { "label": "K29", "matrix": [2, 9], "w": 1, "x": 9.75, "y": 2 }, + { "label": "K2A", "matrix": [2, 10], "w": 1, "x": 10.75, "y": 2 }, + { "label": "K2B", "matrix": [2, 11], "w": 1, "x": 11.75, "y": 2 }, + { "label": "K31", "matrix": [3, 1], "w": 1.5, "x": 1.375, "y": 3 }, + { "label": "K35", "matrix": [3, 5], "w": 7, "x": 2.875, "y": 3 }, + { "label": "K3A", "matrix": [3, 10], "w": 1.5, "x": 9.875, "y": 3 } + ] + }, + "LAYOUT_10u": { + "layout": [ + { "label": "K00", "matrix": [0, 0], "w": 1, "x": 0, "y": 0 }, + { "label": "K01", "matrix": [0, 1], "w": 1, "x": 1, "y": 0 }, + { "label": "K02", "matrix": [0, 2], "w": 1, "x": 2, "y": 0 }, + { "label": "K03", "matrix": [0, 3], "w": 1, "x": 3, "y": 0 }, + { "label": "K04", "matrix": [0, 4], "w": 1, "x": 4, "y": 0 }, + { "label": "K05", "matrix": [0, 5], "w": 1, "x": 5, "y": 0 }, + { "label": "K06", "matrix": [0, 6], "w": 1, "x": 6, "y": 0 }, + { "label": "K07", "matrix": [0, 7], "w": 1, "x": 7, "y": 0 }, + { "label": "K08", "matrix": [0, 8], "w": 1, "x": 8, "y": 0 }, + { "label": "K09", "matrix": [0, 9], "w": 1, "x": 9, "y": 0 }, + { "label": "K0A", "matrix": [0, 10], "w": 1, "x": 10, "y": 0 }, + { "label": "K0B", "matrix": [0, 11], "w": 1.75, "x": 11, "y": 0 }, + { "label": "K10", "matrix": [1, 0], "w": 1.25, "x": 0, "y": 1 }, + { "label": "K11", "matrix": [1, 1], "w": 1, "x": 1.25, "y": 1 }, + { "label": "K12", "matrix": [1, 2], "w": 1, "x": 2.25, "y": 1 }, + { "label": "K13", "matrix": [1, 3], "w": 1, "x": 3.25, "y": 1 }, + { "label": "K14", "matrix": [1, 4], "w": 1, "x": 4.25, "y": 1 }, + { "label": "K15", "matrix": [1, 5], "w": 1, "x": 5.25, "y": 1 }, + { "label": "K16", "matrix": [1, 6], "w": 1, "x": 6.25, "y": 1 }, + { "label": "K17", "matrix": [1, 7], "w": 1, "x": 7.25, "y": 1 }, + { "label": "K18", "matrix": [1, 8], "w": 1, "x": 8.25, "y": 1 }, + { "label": "K19", "matrix": [1, 9], "w": 1, "x": 9.25, "y": 1 }, + { "label": "K1A", "matrix": [1, 10], "w": 1, "x": 10.25, "y": 1 }, + { "label": "K1B", "matrix": [1, 11], "w": 1.5, "x": 11.25, "y": 1 }, + { "label": "K20", "matrix": [2, 0], "w": 1.75, "x": 0, "y": 2 }, + { "label": "K21", "matrix": [2, 1], "w": 1, "x": 1.75, "y": 2 }, + { "label": "K22", "matrix": [2, 2], "w": 1, "x": 2.75, "y": 2 }, + { "label": "K23", "matrix": [2, 3], "w": 1, "x": 3.75, "y": 2 }, + { "label": "K24", "matrix": [2, 4], "w": 1, "x": 4.75, "y": 2 }, + { "label": "K25", "matrix": [2, 5], "w": 1, "x": 5.75, "y": 2 }, + { "label": "K26", "matrix": [2, 6], "w": 1, "x": 6.75, "y": 2 }, + { "label": "K27", "matrix": [2, 7], "w": 1, "x": 7.75, "y": 2 }, + { "label": "K28", "matrix": [2, 8], "w": 1, "x": 8.75, "y": 2 }, + { "label": "K29", "matrix": [2, 9], "w": 1, "x": 9.75, "y": 2 }, + { "label": "K2A", "matrix": [2, 10], "w": 1, "x": 10.75, "y": 2 }, + { "label": "K2B", "matrix": [2, 11], "w": 1, "x": 11.75, "y": 2 }, + { "label": "K35", "matrix": [3, 5], "w": 10, "x": 1.375, "y": 3 } + ] + } + } +} diff --git a/keyboards/viktus/minne_topre/keymaps/default/keymap.c b/keyboards/viktus/minne_topre/keymaps/default/keymap.c new file mode 100644 index 0000000000..5ad476a25d --- /dev/null +++ b/keyboards/viktus/minne_topre/keymaps/default/keymap.c @@ -0,0 +1,26 @@ +/* Copyright 2023 Viktus Design LLC + * + * 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] = { + [0] = LAYOUT_all( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, MO(1), + KC_LCTL, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL + ) +}; diff --git a/keyboards/viktus/minne_topre/keymaps/via/keymap.c b/keyboards/viktus/minne_topre/keymaps/via/keymap.c new file mode 100644 index 0000000000..5ad476a25d --- /dev/null +++ b/keyboards/viktus/minne_topre/keymaps/via/keymap.c @@ -0,0 +1,26 @@ +/* Copyright 2023 Viktus Design LLC + * + * 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] = { + [0] = LAYOUT_all( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, MO(1), + KC_LCTL, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL + ) +}; diff --git a/keyboards/viktus/minne_topre/keymaps/via/minne_topre.json b/keyboards/viktus/minne_topre/keymaps/via/minne_topre.json new file mode 100644 index 0000000000..5f18c16b90 --- /dev/null +++ b/keyboards/viktus/minne_topre/keymaps/via/minne_topre.json @@ -0,0 +1,151 @@ +{ + "name": "Minne - Topre", + "vendorId": "0x5644", + "productId": "0x4D54", + "matrix": { + "rows": 4, + "cols": 12 + }, + "layouts": { + "labels": [ + ["Bottom Row", "Dual 3U", "6U", "7U", "10U"] + ], + "keymap": [ + [ + { + "c":"#777777" + }, + "0,0", + { + "c":"#cccccc" + }, + "0,1", + "0,2", + "0,3", + "0,4", + "0,5", + "0,6", + "0,7", + "0,8", + "0,9", + "0,10", + { + "c":"#aaaaaa", + "w":1.75 + }, + "0,11" + ], + [ + { + "w":1.25 + }, + "1,0", + { + "c":"#cccccc" + }, + "1,1", + "1,2", + "1,3", + "1,4", + "1,5", + "1,6", + "1,7", + "1,8", + "1,9", + "1,10", + { + "c":"#777777", + "w":1.5 + }, + "1,11" + ], + [ + { + "c":"#aaaaaa", + "w":1.75 + }, + "2,0", + { + "c":"#cccccc" + }, + "2,1", + "2,2", + "2,3", + "2,4", + "2,5", + "2,6", + "2,7", + "2,8", + "2,9", + "2,10", + { + "c":"#aaaaaa" + }, + "2,11" + ], + [ + { + "x":1.38 + }, + "3,1\n\n\n0,0", + "3,2\n\n\n0,0", + { + "c":"#cccccc", + "w":3 + }, + "3,4\n\n\n0,0", + { + "w":3 + }, + "3,7\n\n\n0,0", + { + "c":"#aaaaaa" + }, + "3,9\n\n\n0,0", + "3,10\n\n\n0,0" + ], + [ + { + "x":1.38 + }, + "3,1\n\n\n0,1", + "3,2\n\n\n0,1", + { + "c":"#cccccc", + "w":6 + }, + "3,5\n\n\n0,1", + { + "c":"#aaaaaa" + }, + "3,9\n\n\n0,1", + "3,10\n\n\n0,1" + ], + [ + { + "x":1.38, + "w":1.5 + }, + "3,1\n\n\n0,2", + { + "c":"#cccccc", + "w":7 + }, + "3,5\n\n\n0,2", + { + "c":"#aaaaaa", + "w":1.5 + }, + "3,10\n\n\n0,2" + ], + [ + { + "x":1.38, + "c":"#cccccc", + "w":10 + }, + "3,5\n\n\n0,3" + ] + ] + } +} diff --git a/keyboards/viktus/minne_topre/keymaps/via/rules.mk b/keyboards/viktus/minne_topre/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/viktus/minne_topre/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/viktus/minne_topre/keymaps/vial/config.h b/keyboards/viktus/minne_topre/keymaps/vial/config.h new file mode 100644 index 0000000000..0b72656397 --- /dev/null +++ b/keyboards/viktus/minne_topre/keymaps/vial/config.h @@ -0,0 +1,6 @@ +#pragma once + +#define VIAL_KEYBOARD_UID {0xE9, 0xAD, 0xFD, 0x66, 0x8E, 0x62, 0x1D, 0xA7} + +#define VIAL_UNLOCK_COMBO_ROWS { 0, 2 } +#define VIAL_UNLOCK_COMBO_COLS { 0, 0 } diff --git a/keyboards/viktus/minne_topre/keymaps/vial/keymap.c b/keyboards/viktus/minne_topre/keymaps/vial/keymap.c new file mode 100644 index 0000000000..5ad476a25d --- /dev/null +++ b/keyboards/viktus/minne_topre/keymaps/vial/keymap.c @@ -0,0 +1,26 @@ +/* Copyright 2023 Viktus Design LLC + * + * 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] = { + [0] = LAYOUT_all( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, MO(1), + KC_LCTL, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL + ) +}; diff --git a/keyboards/viktus/minne_topre/keymaps/vial/rules.mk b/keyboards/viktus/minne_topre/keymaps/vial/rules.mk new file mode 100644 index 0000000000..b993c43f1c --- /dev/null +++ b/keyboards/viktus/minne_topre/keymaps/vial/rules.mk @@ -0,0 +1,6 @@ +VIA_ENABLE = yes +VIAL_ENABLE = yes +LTO_ENABLE = yes +KEY_OVERRIDE_ENABLE = no +EXTRAKEY_ENABLE = no +MOUSEKEY_ENABLE = no diff --git a/keyboards/viktus/minne_topre/keymaps/vial/vial.json b/keyboards/viktus/minne_topre/keymaps/vial/vial.json new file mode 100644 index 0000000000..38eaaaca17 --- /dev/null +++ b/keyboards/viktus/minne_topre/keymaps/vial/vial.json @@ -0,0 +1,127 @@ +{ + "name": "Minne - Topre", + "vendorId": "0x5644", + "productId": "0x4D54", + "lighting": "none", + "matrix": { + "rows": 4, + "cols": 12 + }, + "layouts": { + "labels": [ + ["Bottom Row", "Dual 3U", "6U", "7U", "10U"] + ], + "keymap": [ + [ + "0,0", + "0,1", + "0,2", + "0,3", + "0,4", + "0,5", + "0,6", + "0,7", + "0,8", + "0,9", + "0,10", + { + "w":1.75 + }, + "0,11" + ], + [ + { + "w":1.25 + }, + "1,0", + "1,1", + "1,2", + "1,3", + "1,4", + "1,5", + "1,6", + "1,7", + "1,8", + "1,9", + "1,10", + { + "w":1.5 + }, + "1,11" + ], + [ + { + "w":1.75 + }, + "2,0", + "2,1", + "2,2", + "2,3", + "2,4", + "2,5", + "2,6", + "2,7", + "2,8", + "2,9", + "2,10", + "2,11" + ], + [ + { + "x":1.38 + }, + "3,1\n\n\n0,0", + "3,2\n\n\n0,0", + { + "w":3 + }, + "3,4\n\n\n0,0", + { + "w":3 + }, + "3,7\n\n\n0,0", + "3,9\n\n\n0,0", + "3,10\n\n\n0,0" + ], + [ + { + "x":1.38 + }, + "3,1\n\n\n0,1", + "3,2\n\n\n0,1", + { + "w":6 + }, + "3,5\n\n\n0,1", + { + "x":0 + }, + "3,9\n\n\n0,1", + "3,10\n\n\n0,1" + ], + [ + { + "x":1.38, + "w":1.5 + }, + "3,1\n\n\n0,2", + { + "w":7 + }, + "3,5\n\n\n0,2", + { + "x":0, + "w":1.5 + }, + "3,10\n\n\n0,2" + ], + [ + { + "x":1.38, + "w":10 + }, + "3,5\n\n\n0,3" + ] + ] + } +} diff --git a/keyboards/viktus/minne_topre/minne_topre.c b/keyboards/viktus/minne_topre/minne_topre.c new file mode 100644 index 0000000000..96b04090cf --- /dev/null +++ b/keyboards/viktus/minne_topre/minne_topre.c @@ -0,0 +1,49 @@ +/* Copyright 2023 Viktus Design LLC + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "quantum.h" +#include "ec.h" +#include "matrix.h" +//#include "debug.h" // needed for debugging + +#define RESET_PT 55 +#define ACTUATION_PT 65 + +// console debugging for pad values +/*void keyboard_post_init_kb() { + debug_enable = true; + debug_matrix = true; +}*/ + +void matrix_init_custom(void) { + ec_config_t ec_config = {.reset_pt = RESET_PT, .actuation_pt = ACTUATION_PT}; + + ec_init(&ec_config); +} + +bool matrix_scan_custom(matrix_row_t current_matrix[]) { + bool updated = ec_matrix_scan(current_matrix); + + // console debugging for pad values + /*static int cnt = 0; + if (cnt++ == 300) { + cnt = 0; + ec_dprint_matrix(); + dprintf("\n"); + }*/ + + return updated; +} diff --git a/keyboards/viktus/minne_topre/readme.md b/keyboards/viktus/minne_topre/readme.md new file mode 100644 index 0000000000..0bd412f28c --- /dev/null +++ b/keyboards/viktus/minne_topre/readme.md @@ -0,0 +1,27 @@ +# Viktus Minne - Topre + +![minne_topre](https://i.imgur.com/OKnryxch.png) + +Minne is a 40% keyboard with an HHKB bottom row, Now with Topre. + +- Keyboard Maintainer: BlindAssassin111 +- Hardware Supported: Viktus Minne Topre PCB +- Hardware Availability: Viktus Design LLC + +Make example for this keyboard (after setting up your build environment): + + make viktus/minne_topre:default + +Flashing example for this keyboard: + + make viktus/minne_topre:default:flash + +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). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard +* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available diff --git a/keyboards/viktus/minne_topre/rules.mk b/keyboards/viktus/minne_topre/rules.mk new file mode 100644 index 0000000000..037e26c530 --- /dev/null +++ b/keyboards/viktus/minne_topre/rules.mk @@ -0,0 +1,3 @@ +CUSTOM_MATRIX = lite +QUANTUM_LIB_SRC += analog.c +SRC += ec.c From b6b360bfabd10708ff1f6fce5d42fd042672aaf9 Mon Sep 17 00:00:00 2001 From: John-Schreiber <56258966+John-Schreiber@users.noreply.github.com> Date: Tue, 28 Mar 2023 21:50:07 -0400 Subject: [PATCH 06/18] [Keyboard] Add support for BFO-9000 (#426) * Add files via upload * Update keyboards/keebio/bfo9000/keymaps/vial/rules.mk Co-authored-by: Less/Rikki <86894501+lesshonor@users.noreply.github.com> --------- Co-authored-by: Less/Rikki <86894501+lesshonor@users.noreply.github.com> --- .../keebio/bfo9000/keymaps/vial/config.h | 32 ++++ .../keebio/bfo9000/keymaps/vial/keymap.c | 15 ++ .../keebio/bfo9000/keymaps/vial/rules.mk | 5 + .../keebio/bfo9000/keymaps/vial/vial.json | 152 ++++++++++++++++++ 4 files changed, 204 insertions(+) create mode 100644 keyboards/keebio/bfo9000/keymaps/vial/config.h create mode 100644 keyboards/keebio/bfo9000/keymaps/vial/keymap.c create mode 100644 keyboards/keebio/bfo9000/keymaps/vial/rules.mk create mode 100644 keyboards/keebio/bfo9000/keymaps/vial/vial.json diff --git a/keyboards/keebio/bfo9000/keymaps/vial/config.h b/keyboards/keebio/bfo9000/keymaps/vial/config.h new file mode 100644 index 0000000000..c461f0e599 --- /dev/null +++ b/keyboards/keebio/bfo9000/keymaps/vial/config.h @@ -0,0 +1,32 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once +#define VIAL_KEYBOARD_UID {0xCA, 0x43, 0x6E, 0xF3, 0x4D, 0x91, 0x78, 0x1F} +#define VIAL_UNLOCK_COMBO_ROWS { 0, 2 } +#define VIAL_UNLOCK_COMBO_COLS { 0, 5 } + + +//#define USE_I2C + +/* Select hand configuration */ +// #define MASTER_RIGHT +// #define EE_HANDS +#define DYNAMIC_KEYMAP_LAYER_COUNT 2 diff --git a/keyboards/keebio/bfo9000/keymaps/vial/keymap.c b/keyboards/keebio/bfo9000/keymaps/vial/keymap.c new file mode 100644 index 0000000000..f37ea79c40 --- /dev/null +++ b/keyboards/keebio/bfo9000/keymaps/vial/keymap.c @@ -0,0 +1,15 @@ +#include QMK_KEYBOARD_H + +#define _BASE 0 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_BASE] = LAYOUT( + KC_ESC, KC_VOLU, KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + KC_HOME, KC_VOLD, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_END, KC_TAB, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_PGUP, KC_CAPS, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_ENT, + KC_PGDN, KC_UP, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, XXXXXXX, + KC_LEFT, KC_DOWN, KC_RGHT, KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_ENT, KC_BSPC, KC_SPC, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT +) +}; diff --git a/keyboards/keebio/bfo9000/keymaps/vial/rules.mk b/keyboards/keebio/bfo9000/keymaps/vial/rules.mk new file mode 100644 index 0000000000..6c6095dc89 --- /dev/null +++ b/keyboards/keebio/bfo9000/keymaps/vial/rules.mk @@ -0,0 +1,5 @@ +VIA_ENABLE = yes +VIAL_ENABLE = yes +LTO_ENABLE = yes +COMMAND_ENABLE = no +KEY_OVERRIDE_ENABLE = no \ No newline at end of file diff --git a/keyboards/keebio/bfo9000/keymaps/vial/vial.json b/keyboards/keebio/bfo9000/keymaps/vial/vial.json new file mode 100644 index 0000000000..dd1cb17f81 --- /dev/null +++ b/keyboards/keebio/bfo9000/keymaps/vial/vial.json @@ -0,0 +1,152 @@ +{ + "name": "Keeb.io BFO-9000", + "vendorId": "0xCB10", + "productId": "0x1169", + "lighting": "qmk_rgblight", + "matrix": { + "rows": 12, + "cols": 9 + }, + "layouts": { + "keymap": [ + [ + "0,0", + "0,1", + "0,2", + "0,3", + "0,4", + "0,5", + "0,6", + "0,7", + "0,8", + { + "x": 5 + }, + "6,0", + "6,1", + "6,2", + "6,3", + "6,4", + "6,5", + "6,6", + "6,7", + "6,8" + ], + [ + "1,0", + "1,1", + "1,2", + "1,3", + "1,4", + "1,5", + "1,6", + "1,7", + "1,8", + { + "x": 5 + }, + "7,0", + "7,1", + "7,2", + "7,3", + "7,4", + "7,5", + "7,6", + "7,7", + "7,8" + ], + [ + "2,0", + "2,1", + "2,2", + "2,3", + "2,4", + "2,5", + "2,6", + "2,7", + "2,8", + { + "x": 5 + }, + "8,0", + "8,1", + "8,2", + "8,3", + "8,4", + "8,5", + "8,6", + "8,7", + "8,8" + ], + [ + "3,0", + "3,1", + "3,2", + "3,3", + "3,4", + "3,5", + "3,6", + "3,7", + "3,8", + { + "x": 5 + }, + "9,0", + "9,1", + "9,2", + "9,3", + "9,4", + "9,5", + "9,6", + "9,7", + "9,8" + ], + [ + "4,0", + "4,1", + "4,2", + "4,3", + "4,4", + "4,5", + "4,6", + "4,7", + "4,8", + { + "x": 5 + }, + "10,0", + "10,1", + "10,2", + "10,3", + "10,4", + "10,5", + "10,6", + "10,7", + "10,8" + ], + [ + "5,0", + "5,1", + "5,2", + "5,3", + "5,4", + "5,5", + "5,6", + "5,7", + "5,8", + { + "x": 5 + }, + "11,0", + "11,1", + "11,2", + "11,3", + "11,4", + "11,5", + "11,6", + "11,7", + "11,8" + ] + ] + } +} \ No newline at end of file From 209c682ce90ff98b487debcc71c47f64317a845e Mon Sep 17 00:00:00 2001 From: Less/Rikki <86894501+lesshonor@users.noreply.github.com> Date: Tue, 28 Mar 2023 21:51:14 -0400 Subject: [PATCH 07/18] [CI] detect clang-formatted VIAL_KEYBOARD_UID (#428) * fix: detect clang-formatted VIAL_KEYBOARD_UIDs * style: match UID output to "About..." in Vial GUI --- util/ci_vial_verify_uid.py | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/util/ci_vial_verify_uid.py b/util/ci_vial_verify_uid.py index a07cb24de5..5f98be7c2d 100755 --- a/util/ci_vial_verify_uid.py +++ b/util/ci_vial_verify_uid.py @@ -1,33 +1,33 @@ #!/usr/bin/env python3 from glob import glob -import os +from pathlib import Path import re import sys import struct from collections import defaultdict - def main(): + + VIAL_UID_REGEX = re.compile(r"#\s*define\s+VIAL_KEYBOARD_UID\s+(?:\\(?:\n|\r)\s*)*{\s*((?:0(?:x|X)(?:[0-9a-fA-F]){2}\s*,\s*){7}(?:0(?:x|X)(?:[0-9a-fA-F]){2}))\s*}") + error = 0 uid_to_keyboards = defaultdict(set) for filename in glob("keyboards/**/vial.json", recursive=True): keyboard = filename[10:-10].split("/keymaps/")[0] - path = os.path.dirname(filename) + dirname = Path(filename).parents[0] uid = None + while True: - config_h = os.path.join(path, "config.h") - if os.path.exists(config_h): - with open(config_h, "r") as inf: - for line in inf: - uid = re.findall(r"#define.*VIAL_KEYBOARD_UID.*{(.*)}", line) - if uid: - break + config_h = dirname.joinpath("config.h") + if config_h.exists() and config_h.stat().st_size < 100000: + content = config_h.read_text() + uid = VIAL_UID_REGEX.search(content) if uid: break - path = os.path.dirname(path) - if path.endswith("keyboards"): + dirname = dirname.parents[0] + if dirname.match("keyboards"): break if not uid: @@ -35,7 +35,8 @@ def main(): error = 1 continue - uid = uid[0].split(",") + uid = uid[1].split(",") + uid.reverse() uid = [int(x, 16) for x in uid] uid = struct.pack("BBBBBBBB", *uid).hex() uid_to_keyboards[uid].add(keyboard) From ba1ebf348ee7e0919979fd7bf4e0d1f73148f37b Mon Sep 17 00:00:00 2001 From: adophoxia <100170946+adophoxia@users.noreply.github.com> Date: Sun, 9 Apr 2023 18:01:59 -0700 Subject: [PATCH 08/18] Port Keychron Q11 to VIAL (#413) * Port Keychron Q11 to VIAL * Add back removed `KC_TASK` and `KC_FLXP` keycodes in `default` and `via` keymaps * Sync #20125 from `qmk/master` --- .../keychron/q11/ansi_encoder/ansi_encoder.c | 244 ++++++++++++++++ keyboards/keychron/q11/ansi_encoder/config.h | 20 ++ keyboards/keychron/q11/ansi_encoder/info.json | 166 +++++++++++ .../q11/ansi_encoder/keymaps/default/keymap.c | 71 +++++ .../q11/ansi_encoder/keymaps/default/rules.mk | 1 + .../ansi_encoder/keymaps/keychron/keymap.c | 84 ++++++ .../ansi_encoder/keymaps/keychron/rules.mk | 5 + .../q11/ansi_encoder/keymaps/via/keymap.c | 72 +++++ .../q11/ansi_encoder/keymaps/via/rules.mk | 2 + .../q11/ansi_encoder/keymaps/vial/config.h | 8 + .../q11/ansi_encoder/keymaps/vial/keymap.c | 84 ++++++ .../q11/ansi_encoder/keymaps/vial/rules.mk | 7 + .../q11/ansi_encoder/keymaps/vial/vial.json | 268 ++++++++++++++++++ keyboards/keychron/q11/ansi_encoder/rules.mk | 9 + keyboards/keychron/q11/config.h | 110 +++++++ keyboards/keychron/q11/halconf.h | 23 ++ keyboards/keychron/q11/mcuconf.h | 28 ++ keyboards/keychron/q11/q11.c | 98 +++++++ keyboards/keychron/q11/readme.md | 21 ++ 19 files changed, 1321 insertions(+) create mode 100755 keyboards/keychron/q11/ansi_encoder/ansi_encoder.c create mode 100755 keyboards/keychron/q11/ansi_encoder/config.h create mode 100755 keyboards/keychron/q11/ansi_encoder/info.json create mode 100755 keyboards/keychron/q11/ansi_encoder/keymaps/default/keymap.c create mode 100755 keyboards/keychron/q11/ansi_encoder/keymaps/default/rules.mk create mode 100755 keyboards/keychron/q11/ansi_encoder/keymaps/keychron/keymap.c create mode 100755 keyboards/keychron/q11/ansi_encoder/keymaps/keychron/rules.mk create mode 100755 keyboards/keychron/q11/ansi_encoder/keymaps/via/keymap.c create mode 100755 keyboards/keychron/q11/ansi_encoder/keymaps/via/rules.mk create mode 100644 keyboards/keychron/q11/ansi_encoder/keymaps/vial/config.h create mode 100755 keyboards/keychron/q11/ansi_encoder/keymaps/vial/keymap.c create mode 100755 keyboards/keychron/q11/ansi_encoder/keymaps/vial/rules.mk create mode 100644 keyboards/keychron/q11/ansi_encoder/keymaps/vial/vial.json create mode 100755 keyboards/keychron/q11/ansi_encoder/rules.mk create mode 100755 keyboards/keychron/q11/config.h create mode 100755 keyboards/keychron/q11/halconf.h create mode 100755 keyboards/keychron/q11/mcuconf.h create mode 100755 keyboards/keychron/q11/q11.c create mode 100644 keyboards/keychron/q11/readme.md diff --git a/keyboards/keychron/q11/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q11/ansi_encoder/ansi_encoder.c new file mode 100755 index 0000000000..88f6132c61 --- /dev/null +++ b/keyboards/keychron/q11/ansi_encoder/ansi_encoder.c @@ -0,0 +1,244 @@ +/* Copyright 2023 @ Keychron (https://www.keychron.com) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "quantum.h" + +#ifdef RGB_MATRIX_ENABLE + +// clang-format off + +const ckled2001_led PROGMEM g_ckled2001_leds[DRIVER_LED_TOTAL] = { +/* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ + {0, A_2, C_2, B_2}, // ESC + {0, A_3, C_3, B_3}, // F1 + {0, A_4, C_4, B_4}, // F2 + {0, A_5, C_5, B_5}, // F3 + {0, A_6, C_6, B_6}, // F4 + {0, A_7, C_7, B_7}, // F5 + {0, A_8, C_8, B_8}, // F6 + + {0, D_1, F_1, E_1}, // M1 + {0, D_2, F_2, E_2}, // `~ + {0, D_3, F_3, E_3}, // 1! + {0, D_4, F_4, E_4}, // 2@ + {0, D_5, F_5, E_5}, // 3# + {0, D_6, F_6, E_6}, // 4$ + {0, D_7, F_7, E_7}, // 5% + {0, D_8, F_8, E_8}, // 6^ + + {0, G_1, I_1, H_1}, // M2 + {0, G_2, I_2, H_2}, // TAB + {0, G_3, I_3, H_3}, // Q + {0, G_4, I_4, H_4}, // W + {0, G_5, I_5, H_5}, // E + {0, G_6, I_6, H_6}, // R + {0, G_7, I_7, H_7}, // T + + {0, J_1, L_1, K_1}, // M3 + {0, J_2, L_2, K_2}, // CapsJock + {0, J_3, L_3, K_3}, // A + {0, J_4, L_4, K_4}, // S + {0, J_5, L_5, K_5}, // D + {0, J_6, L_6, K_6}, // F + {0, J_7, L_7, K_7}, // G + + {0, J_9, L_9, K_9}, // M4 + {0, J_11, L_11, K_11}, // Shift_J + {0, J_12, L_12, K_12}, // Z + {0, J_13, L_13, K_13}, // X + {0, J_14, L_14, K_14}, // C + {0, J_15, L_15, K_15}, // V + {0, J_16, L_16, K_16}, // B + + {0, G_9, I_9, H_9}, // M5 + {0, G_10, I_10, H_10}, // Ctrl_L + {0, G_11, I_11, H_11}, // WGn_L + {0, G_12, I_12, H_12}, // Alt_L + {0, G_13, I_13, H_13}, // Fn + {0, G_15, I_15, H_15}, // Space + + {0, A_16, C_16, B_16}, // F7 + {0, A_15, C_15, B_15}, // F8 + {0, A_14, C_14, B_14}, // F9 + {0, A_13, C_13, B_13}, // F11 + {0, A_12, C_12, B_12}, // F11 + {0, A_11, C_11, B_11}, // F12 + {0, A_10, C_10, B_10}, // INS + {0, A_9, C_9, B_9}, // DEL + + {0, D_16, F_16, E_16}, // 7& + {0, D_15, F_15, E_15}, // 8* + {0, D_14, F_14, E_14}, // 9( + {0, D_13, F_13, E_13}, // 1) + {0, D_12, F_12, E_12}, // -_ + {0, D_11, F_11, E_11}, // =+ + {0, D_10, F_10, E_10}, // BackSpace + {0, D_8, F_8, E_8}, // PgUp + + {0, G_16, I_16, H_16}, // Y + {0, G_15, I_15, H_15}, // U + {0, G_14, I_14, H_14}, // G + {0, G_13, I_13, H_13}, // O + {0, G_12, I_12, H_12}, // P + {0, G_11, I_11, H_11}, // [ + {0, G_10, I_10, H_10}, // ] + {0, G_9, I_9, H_9}, // \|| + {0, G_8, I_8, H_8}, // PgDn + + {0, J_16, L_16, K_16}, // H + {0, J_15, L_15, K_15}, // J + {0, J_14, L_14, K_14}, // KKEY_PRESS_HOME + {0, J_13, L_13, K_13}, // J + {0, J_12, L_12, K_12}, // ;: + {0, J_11, L_11, K_11}, // '" + {0, J_9, L_9, K_9}, // Enter + {0, J_8, L_8, K_8}, // Home + + {0, J_7, L_7, K_7}, // N + {0, J_6, L_6, K_6}, // M + {0, J_5, L_5, K_5}, // ,< + {0, J_4, L_4, K_4}, // .> + {0, J_3, L_3, K_3}, // ?/ + {0, J_2, L_2, K_2}, // Shift_R + {0, J_1, L_1, K_1}, // Up + + {0, G_6, I_6, H_6}, // Space + {0, G_5, I_5, H_5}, // Win_R + {0, G_4, I_4, H_4}, // Fn + {0, G_3, I_3, H_3}, // Ctrl_R + {0, G_2, I_2, H_2}, // Left + {0, G_1, I_1, H_1}, // Down + {0, G_7, I_7, H_7}, // Right +}; + +#define __ NO_LED + +led_config_t g_led_config = { + { + // Key Matrix to LED Index + { __, 0, 1, 2, 3, 4, 5, 6, __ }, + { 7, 8, 9, 10, 11, 12, 13, 14, __ }, + { 15, 16, 17, 18, 19, __, 20, 21, __ }, + { 22, 23, 24, 25, 26, 27, 28, __, __ }, + { 29, __, 30, 31, 32, 33, 34, 35, __ }, + { 36, 37, 38, 39, 40, __, 41, __, __ }, + { 42, 43, 44, 45, 46, 47, 48, 49, __ }, + { 50, 51, 52, 53, 54, 55, 56, __, 57 }, + { 58, 59, 60, 61, 62, 63, 64, 65, 66 }, + { 67, 68, 69, 70, 71, 72, __, 73, 74 }, + { 75, 76, 77, 78, 79, 80, __, 81, __ }, + { __, 82, 83, 84, 85, __, 86, 87, 88 }, + }, + { + // LED Index to Physical Position + {17,0}, {31,0}, {45,0}, {59,0}, {72,0}, {86,0}, {100,0}, + {0,15}, {17,15}, {31,15}, {45,15}, {59,15}, {72,15}, {86,15}, {100,15}, + {0,27}, {21,27}, {38,27}, {52,27}, {66,27}, {79,27}, {93,27}, + {0,40}, {22,40}, {41,40}, {55,40}, {69,40}, {83,40}, {97,40}, + {0,52}, {26,52}, {48,52}, {61,52}, {76,52}, {90,52}, {102,52}, + {0,64}, {19,64}, {36,64}, {53,64}, {70,64}, {94,64}, + {110,0}, {124,0}, {138,0}, {152,0}, {165,0}, {179,0}, {193,0}, {207,0}, + {110,15}, {124,15}, {138,15}, {152,15}, {165,15}, {179,15}, {200,15}, {224,15}, + {104,27}, {117,27}, {131,27}, {145,27}, {158,27}, {172,27}, {186,27}, {203,27}, {224,27}, + {107,40}, {121,40}, {134,40}, {148,40}, {162,40}, {176,40}, {198,40}, {224,40}, + {114,52}, {127,52}, {141,52}, {155,52}, {169,52}, {188,52}, {210,52}, + {126,64}, {152,64}, {166,64}, {180,64}, {196,64}, {210,64}, {224,64}, + }, + { + // RGB LED Index to Flag + 1, 1, 1, 1, 1, 1, 1, + 1, 1, 4, 4, 4, 4, 4, 4, + 1, 1, 4, 4, 4, 4, 4, + 1, 8, 4, 4, 4, 4, 4, + 1, 1, 4, 4, 4, 4, 4, + 1, 1, 1, 1, 1, 4, + 1, 1, 1, 1, 1, 1, 1, 1, + 4, 4, 4, 4, 4, 4, 1, 1, + 4, 4, 4, 4, 4, 4, 4, 4, 1, + 4, 4, 4, 4, 4, 4, 1, 1, + 4, 4, 4, 4, 4, 1, 1, + 4, 1, 1, 1, 1, 1, 1, + } +}; + +// clang-format on + +#endif + +#define ADC_BUFFER_DEPTH 1 +#define ADC_NUM_CHANNELS 1 +#define ADC_SAMPLING_RATE ADC_SMPR_SMP_12P5 +#define ADC_RESOLUTION ADC_CFGR_RES_10BITS + +static int16_t analogReadPin_my(pin_t pin) { + ADCConfig adcCfg = {}; + adcsample_t sampleBuffer[ADC_NUM_CHANNELS*ADC_BUFFER_DEPTH]; + ADCDriver* targetDriver = &ADCD1; + ADCConversionGroup adcConversionGroup = { + .circular = FALSE, + .num_channels = (uint16_t)(ADC_NUM_CHANNELS), + .cfgr = ADC_RESOLUTION, + }; + + palSetLineMode(pin, PAL_MODE_INPUT_ANALOG); + switch (pin) { + case B0: + adcConversionGroup.smpr[2] = ADC_SMPR2_SMP_AN15(ADC_SAMPLING_RATE); + adcConversionGroup.sqr[0] = ADC_SQR1_SQ1_N(ADC_CHANNEL_IN15); + sampleBuffer[0] = 0; + break; + case B1: + adcConversionGroup.smpr[2] = ADC_SMPR2_SMP_AN16(ADC_SAMPLING_RATE); + adcConversionGroup.sqr[0] = ADC_SQR1_SQ1_N(ADC_CHANNEL_IN16); + sampleBuffer[0] = 0; + break; + default: + return 0; + } + adcStart(targetDriver, &adcCfg); + if (adcConvert(targetDriver, &adcConversionGroup, &sampleBuffer[0], ADC_BUFFER_DEPTH) != MSG_OK) { + return 0; + } + + return *sampleBuffer; +} + +void keyboard_post_init_kb(void) { + // 1. The pin A5/B5 of the USB C interface in the left hand is connected to the pin A0 of MCU, + // A0 will be set to output and write high when keyboard initial. + // 2. The same pin in the right hand is connected to the pin B0 and B1 of MCU respectively, + // and the ADC function of B0 and B1 will be enabled when keyboard initial. + // 3. because the serial usart RXD and TXD is multiplexed on USB's D+ and D- in the right hand. + // So detect the voltage on the pin A5/B5 of the USB C interface by ADC, + // and disable USB connectivity when the ADC value exceeds 1000, + // to avoid affecting the serial usart communication between the left hand and the right hand. + if (is_keyboard_left()) { + setPinOutput(A0); + writePinHigh(A0); + } else { + if ((analogReadPin_my(B0) > 1000) || (analogReadPin_my(B1) > 1000)) { + setPinInput(A11); + setPinInput(A12); + } + } + + keyboard_post_init_user(); +} diff --git a/keyboards/keychron/q11/ansi_encoder/config.h b/keyboards/keychron/q11/ansi_encoder/config.h new file mode 100755 index 0000000000..08632f0ce7 --- /dev/null +++ b/keyboards/keychron/q11/ansi_encoder/config.h @@ -0,0 +1,20 @@ +/* Copyright 2023 @ Keychron(https://www.keychron.com) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (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 caps-lock LED */ +#define CAPS_LOCK_LED_INDEX 23 diff --git a/keyboards/keychron/q11/ansi_encoder/info.json b/keyboards/keychron/q11/ansi_encoder/info.json new file mode 100755 index 0000000000..50d1260a09 --- /dev/null +++ b/keyboards/keychron/q11/ansi_encoder/info.json @@ -0,0 +1,166 @@ +{ + "keyboard_name": "Keychron Q11", + "manufacturer": "Keychron", + "url": "https://github.com/Keychron", + "maintainer": "lalalademaxiya1", + "bootloader": "stm32-dfu", + "bootmagic": { + "matrix": [0, 1] + }, + "features": { + "audio": false, + "backlight": false, + "bootmagic": true, + "command": false, + "console": false, + "dip_switch": true, + "encoder": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgb_matrix": true, + "rgblight": false + }, + "diode_direction": "ROW2COL", + "encoder": { + "rotary": [ + {"pin_a": "B0", "pin_b": "B1"} + ] + }, + "matrix_pins": { + "cols": ["A7", "A6", "A5", "A4", "A3", "A2", "A1", "C15", null], + "rows": ["A13", "A14", "A15", "B3", "B4", "B5"] + }, + "processor": "STM32L432", + "rgb_matrix": { + "driver": "CKLED2001", + "split_count": [42, 47] + }, + "split": { + "enabled": true, + "encoder": { + "right": { + "rotary": [ + {"pin_a": "C14", "pin_b": "C15"} + ] + } + }, + "matrix_pins": { + "right": { + "cols": ["A8", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0"], + "rows": ["B5", "B4", "B3", "A15", "A14", "A13"] + } + }, + "transport": { + "protocol": "serial_usart", + "sync_matrix_state": false + } + }, + "usb": { + "vid": "0x3434", + "pid": "0x01E0", + "device_version": "1.0.0" + }, + "layouts": { + "LAYOUT_ansi_91": { + "layout": [ + {"matrix":[0,0], "x":0, "y":0}, + {"matrix":[0,1], "x":1.25, "y":0}, + {"matrix":[0,2], "x":2.25, "y":0}, + {"matrix":[0,3], "x":3.25, "y":0}, + {"matrix":[0,4], "x":4.25, "y":0}, + {"matrix":[0,5], "x":5.25, "y":0}, + {"matrix":[0,6], "x":6.25, "y":0}, + {"matrix":[0,7], "x":7.25, "y":0}, + {"matrix":[6,0], "x":8.25, "y":0}, + {"matrix":[6,1], "x":9.25, "y":0}, + {"matrix":[6,2], "x":10.25, "y":0}, + {"matrix":[6,3], "x":11.25, "y":0}, + {"matrix":[6,4], "x":12.25, "y":0}, + {"matrix":[6,5], "x":13.25, "y":0}, + {"matrix":[6,6], "x":14.25, "y":0}, + {"matrix":[6,7], "x":15.25, "y":0}, + {"matrix":[6,8], "x":16.5, "y":0}, + + {"matrix":[1,0], "x":0, "y":1.25}, + {"matrix":[1,1], "x":1.25, "y":1.25}, + {"matrix":[1,2], "x":2.25, "y":1.25}, + {"matrix":[1,3], "x":3.25, "y":1.25}, + {"matrix":[1,4], "x":4.25, "y":1.25}, + {"matrix":[1,5], "x":5.25, "y":1.25}, + {"matrix":[1,6], "x":6.25, "y":1.25}, + {"matrix":[1,7], "x":7.25, "y":1.25}, + {"matrix":[7,0], "x":8.25, "y":1.25}, + {"matrix":[7,1], "x":9.25, "y":1.25}, + {"matrix":[7,2], "x":10.25, "y":1.25}, + {"matrix":[7,3], "x":11.25, "y":1.25}, + {"matrix":[7,4], "x":12.25, "y":1.25}, + {"matrix":[7,5], "x":13.25, "y":1.25}, + {"matrix":[7,6], "x":14.25, "y":1.25, "w":2}, + {"matrix":[7,8], "x":16.5, "y":1.25}, + + {"matrix":[2,0], "x":0, "y":2.25}, + {"matrix":[2,1], "x":1.25, "y":2.25, "w":1.5}, + {"matrix":[2,2], "x":2.75, "y":2.25}, + {"matrix":[2,3], "x":3.75, "y":2.25}, + {"matrix":[2,4], "x":4.75, "y":2.25}, + {"matrix":[2,6], "x":5.75, "y":2.25}, + {"matrix":[2,7], "x":6.75, "y":2.25}, + {"matrix":[8,0], "x":7.75, "y":2.25}, + {"matrix":[8,1], "x":8.75, "y":2.25}, + {"matrix":[8,2], "x":9.75, "y":2.25}, + {"matrix":[8,3], "x":10.75, "y":2.25}, + {"matrix":[8,4], "x":11.75, "y":2.25}, + {"matrix":[8,5], "x":12.75, "y":2.25}, + {"matrix":[8,6], "x":13.75, "y":2.25}, + {"matrix":[8,7], "x":14.75, "y":2.25, "w":1.5}, + {"matrix":[8,8], "x":16.5, "y":2.25}, + + {"matrix":[3,0], "x":0, "y":3.25}, + {"matrix":[3,1], "x":1.25, "y":3.25, "w":1.75}, + {"matrix":[3,2], "x":3, "y":3.25}, + {"matrix":[3,3], "x":4, "y":3.25}, + {"matrix":[3,4], "x":5, "y":3.25}, + {"matrix":[3,5], "x":6, "y":3.25}, + {"matrix":[3,6], "x":7, "y":3.25}, + {"matrix":[9,0], "x":8, "y":3.25}, + {"matrix":[9,1], "x":9, "y":3.25}, + {"matrix":[9,2], "x":10, "y":3.25}, + {"matrix":[9,3], "x":11, "y":3.25}, + {"matrix":[9,4], "x":12, "y":3.25}, + {"matrix":[9,5], "x":13, "y":3.25}, + {"matrix":[9,7], "x":14, "y":3.25, "w":2.25}, + {"matrix":[9,8], "x":16.5, "y":3.25}, + + {"matrix":[4,0], "x":0, "y":4.25}, + {"matrix":[4,2], "x":1.25, "y":4.25, "w":2.25}, + {"matrix":[4,3], "x":3.5, "y":4.25}, + {"matrix":[4,4], "x":4.5, "y":4.25}, + {"matrix":[4,5], "x":5.5, "y":4.25}, + {"matrix":[4,6], "x":6.5, "y":4.25}, + {"matrix":[4,7], "x":7.5, "y":4.25}, + {"matrix":[10,0], "x":8.5, "y":4.25}, + {"matrix":[10,1], "x":9.5, "y":4.25}, + {"matrix":[10,2], "x":10.5, "y":4.25}, + {"matrix":[10,3], "x":11.5, "y":4.25}, + {"matrix":[10,4], "x":12.5, "y":4.25}, + {"matrix":[10,5], "x":13.5, "y":4.25, "w":1.75}, + {"matrix":[10,7], "x":15.5, "y":4.25}, + + {"matrix":[5,0], "x":0, "y":5.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,3], "x":3.75, "y":5.25, "w":1.25}, + {"matrix":[5,4], "x":5, "y":5.25, "w":1.25}, + {"matrix":[5,6], "x":6.25, "y":5.25, "w":2.25}, + {"matrix":[11,1], "x":8.5, "y":5.25, "w":2.75}, + {"matrix":[11,2], "x":11.25, "y":5.25}, + {"matrix":[11,3], "x":12.25, "y":5.25}, + {"matrix":[11,4], "x":13.25, "y":5.25}, + {"matrix":[11,6], "x":14.5, "y":5.25}, + {"matrix":[11,7], "x":15.5, "y":5.25}, + {"matrix":[11,8], "x":16.5, "y":5.25} + ] + } + } +} diff --git a/keyboards/keychron/q11/ansi_encoder/keymaps/default/keymap.c b/keyboards/keychron/q11/ansi_encoder/keymaps/default/keymap.c new file mode 100755 index 0000000000..1a7bff95da --- /dev/null +++ b/keyboards/keychron/q11/ansi_encoder/keymaps/default/keymap.c @@ -0,0 +1,71 @@ +/* Copyright 2023 @ Keychron (https://www.keychron.com) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (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 + +// clang-format off + +enum layers{ + MAC_BASE, + MAC_FN, + WIN_BASE, + WIN_FN +}; + +#define KC_TASK LGUI(KC_TAB) +#define KC_FLXP LGUI(KC_E) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [MAC_BASE] = LAYOUT_ansi_91( + KC_MUTE, KC_ESC, KC_BRID, KC_BRIU, KC_NO, KC_NO, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_INS, KC_DEL, KC_MUTE, + _______, 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_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_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_HOME, + _______, 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_LOPT, KC_LCMD, MO(MAC_FN), KC_SPC, KC_SPC, KC_RCMD, MO(MAC_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [MAC_FN] = LAYOUT_ansi_91( + RGB_TOG, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, RGB_TOG, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_RMOD, RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [WIN_BASE] = LAYOUT_ansi_91( + KC_MUTE, 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_INS, KC_DEL, KC_MUTE, + _______, 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_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_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_HOME, + _______, 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_LWIN, KC_LALT, MO(WIN_FN), KC_SPC, KC_SPC, KC_RALT, MO(WIN_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [WIN_FN] = LAYOUT_ansi_91( + RGB_TOG, _______, 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_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_RMOD, RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [MAC_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [MAC_FN] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI), ENCODER_CCW_CW(RGB_VAD, RGB_VAI) }, + [WIN_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [WIN_FN] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI), ENCODER_CCW_CW(RGB_VAD, RGB_VAI) } +}; +#endif // ENCODER_MAP_ENABLE diff --git a/keyboards/keychron/q11/ansi_encoder/keymaps/default/rules.mk b/keyboards/keychron/q11/ansi_encoder/keymaps/default/rules.mk new file mode 100755 index 0000000000..ee32568148 --- /dev/null +++ b/keyboards/keychron/q11/ansi_encoder/keymaps/default/rules.mk @@ -0,0 +1 @@ +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/keychron/q11/ansi_encoder/keymaps/keychron/keymap.c b/keyboards/keychron/q11/ansi_encoder/keymaps/keychron/keymap.c new file mode 100755 index 0000000000..02883cd89a --- /dev/null +++ b/keyboards/keychron/q11/ansi_encoder/keymaps/keychron/keymap.c @@ -0,0 +1,84 @@ +/* Copyright 2023 @ Keychron (https://www.keychron.com) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (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 +#include "keychron_common.h" + +// clang-format off + +enum layers{ + MAC_BASE, + MAC_FN, + WIN_BASE, + WIN_FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [MAC_BASE] = LAYOUT_ansi_91( + KC_MUTE, KC_ESC, KC_BRID, KC_BRIU, KC_MCTL, KC_LPAD, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_INS, KC_DEL, KC_MUTE, + MACRO01, 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_PGUP, + MACRO02, 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_PGDN, + MACRO03, 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_HOME, + MACRO04, 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, + MACRO05, KC_LCTL, KC_LOPTN, KC_LCMMD, MO(MAC_FN), KC_SPC, KC_SPC, KC_RCMMD, MO(MAC_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [MAC_FN] = LAYOUT_ansi_91( + RGB_TOG, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, RGB_TOG, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_RMOD, RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [WIN_BASE] = LAYOUT_ansi_91( + KC_MUTE, 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_INS, KC_DEL, KC_MUTE, + MACRO01, 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_PGUP, + MACRO02, 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_PGDN, + MACRO03, 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_HOME, + MACRO04, 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, + MACRO05, KC_LCTL, KC_LWIN, KC_LALT, MO(WIN_FN), KC_SPC, KC_SPC, KC_RALT, MO(WIN_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [WIN_FN] = LAYOUT_ansi_91( + RGB_TOG, _______, 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_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_RMOD, RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +}; + +#if defined(ENCODER_ENABLE) && defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [MAC_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [MAC_FN] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI), ENCODER_CCW_CW(RGB_VAD, RGB_VAI)}, + [WIN_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_VOLD, KC_VOLU)}, + [WIN_FN] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI), ENCODER_CCW_CW(RGB_VAD, RGB_VAI)} +}; +#endif // ENCODER_MAP_ENABLE + +// clang-format on + +void housekeeping_task_user(void) { + housekeeping_task_keychron(); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (!process_record_keychron(keycode, record)) { + return false; + } + + return true; +} diff --git a/keyboards/keychron/q11/ansi_encoder/keymaps/keychron/rules.mk b/keyboards/keychron/q11/ansi_encoder/keymaps/keychron/rules.mk new file mode 100755 index 0000000000..9cf1a9b56c --- /dev/null +++ b/keyboards/keychron/q11/ansi_encoder/keymaps/keychron/rules.mk @@ -0,0 +1,5 @@ +VIA_ENABLE = yes +ENCODER_MAP_ENABLE = yes + +VPATH += keyboards/keychron/common +SRC += keychron_common.c diff --git a/keyboards/keychron/q11/ansi_encoder/keymaps/via/keymap.c b/keyboards/keychron/q11/ansi_encoder/keymaps/via/keymap.c new file mode 100755 index 0000000000..8c4062adbe --- /dev/null +++ b/keyboards/keychron/q11/ansi_encoder/keymaps/via/keymap.c @@ -0,0 +1,72 @@ +/* Copyright 2023 @ Keychron (https://www.keychron.com) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (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 + +// clang-format off + +enum layers{ + MAC_BASE, + MAC_FN, + WIN_BASE, + WIN_FN +}; + +#define KC_TASK LGUI(KC_TAB) +#define KC_FLXP LGUI(KC_E) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [MAC_BASE] = LAYOUT_ansi_91( + KC_MUTE, KC_ESC, KC_BRID, KC_BRIU, KC_NO, KC_NO, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_INS, KC_DEL, KC_MUTE, + MACRO01, 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_PGUP, + MACRO02, 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_PGDN, + MACRO03, 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_HOME, + MACRO04, 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, + MACRO05, KC_LCTL, KC_LOPT, KC_LCMD, MO(MAC_FN), KC_SPC, KC_SPC, KC_RCMD, MO(MAC_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [MAC_FN] = LAYOUT_ansi_91( + RGB_TOG, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, RGB_TOG, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_RMOD, RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [WIN_BASE] = LAYOUT_ansi_91( + KC_MUTE, 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_INS, KC_DEL, KC_MUTE, + MACRO01, 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_PGUP, + MACRO02, 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_PGDN, + MACRO03, 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_HOME, + MACRO04, 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, + MACRO05, KC_LCTL, KC_LWIN, KC_LALT, MO(WIN_FN), KC_SPC, KC_SPC, KC_RALT, MO(WIN_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [WIN_FN] = LAYOUT_ansi_91( + RGB_TOG, _______, 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_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_RMOD, RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +}; + +#if defined(ENCODER_ENABLE) && defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [MAC_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [MAC_FN] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI), ENCODER_CCW_CW(RGB_VAD, RGB_VAI) }, + [WIN_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [WIN_FN] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI), ENCODER_CCW_CW(RGB_VAD, RGB_VAI) } +}; +#endif // ENCODER_MAP_ENABLE diff --git a/keyboards/keychron/q11/ansi_encoder/keymaps/via/rules.mk b/keyboards/keychron/q11/ansi_encoder/keymaps/via/rules.mk new file mode 100755 index 0000000000..f1adcab005 --- /dev/null +++ b/keyboards/keychron/q11/ansi_encoder/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/keychron/q11/ansi_encoder/keymaps/vial/config.h b/keyboards/keychron/q11/ansi_encoder/keymaps/vial/config.h new file mode 100644 index 0000000000..17d97b7433 --- /dev/null +++ b/keyboards/keychron/q11/ansi_encoder/keymaps/vial/config.h @@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#pragma once + +#define VIAL_KEYBOARD_UID {0x63, 0x39, 0x38, 0xEA, 0x3A, 0x46, 0x3E, 0x9F} + +#define VIAL_UNLOCK_COMBO_ROWS { 0, 9 } +#define VIAL_UNLOCK_COMBO_COLS { 1, 7 } \ No newline at end of file diff --git a/keyboards/keychron/q11/ansi_encoder/keymaps/vial/keymap.c b/keyboards/keychron/q11/ansi_encoder/keymaps/vial/keymap.c new file mode 100755 index 0000000000..02883cd89a --- /dev/null +++ b/keyboards/keychron/q11/ansi_encoder/keymaps/vial/keymap.c @@ -0,0 +1,84 @@ +/* Copyright 2023 @ Keychron (https://www.keychron.com) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (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 +#include "keychron_common.h" + +// clang-format off + +enum layers{ + MAC_BASE, + MAC_FN, + WIN_BASE, + WIN_FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [MAC_BASE] = LAYOUT_ansi_91( + KC_MUTE, KC_ESC, KC_BRID, KC_BRIU, KC_MCTL, KC_LPAD, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_INS, KC_DEL, KC_MUTE, + MACRO01, 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_PGUP, + MACRO02, 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_PGDN, + MACRO03, 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_HOME, + MACRO04, 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, + MACRO05, KC_LCTL, KC_LOPTN, KC_LCMMD, MO(MAC_FN), KC_SPC, KC_SPC, KC_RCMMD, MO(MAC_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [MAC_FN] = LAYOUT_ansi_91( + RGB_TOG, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, RGB_TOG, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_RMOD, RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [WIN_BASE] = LAYOUT_ansi_91( + KC_MUTE, 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_INS, KC_DEL, KC_MUTE, + MACRO01, 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_PGUP, + MACRO02, 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_PGDN, + MACRO03, 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_HOME, + MACRO04, 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, + MACRO05, KC_LCTL, KC_LWIN, KC_LALT, MO(WIN_FN), KC_SPC, KC_SPC, KC_RALT, MO(WIN_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [WIN_FN] = LAYOUT_ansi_91( + RGB_TOG, _______, 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_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_RMOD, RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +}; + +#if defined(ENCODER_ENABLE) && defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [MAC_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [MAC_FN] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI), ENCODER_CCW_CW(RGB_VAD, RGB_VAI)}, + [WIN_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_VOLD, KC_VOLU)}, + [WIN_FN] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI), ENCODER_CCW_CW(RGB_VAD, RGB_VAI)} +}; +#endif // ENCODER_MAP_ENABLE + +// clang-format on + +void housekeeping_task_user(void) { + housekeeping_task_keychron(); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (!process_record_keychron(keycode, record)) { + return false; + } + + return true; +} diff --git a/keyboards/keychron/q11/ansi_encoder/keymaps/vial/rules.mk b/keyboards/keychron/q11/ansi_encoder/keymaps/vial/rules.mk new file mode 100755 index 0000000000..c4ca639d6c --- /dev/null +++ b/keyboards/keychron/q11/ansi_encoder/keymaps/vial/rules.mk @@ -0,0 +1,7 @@ +VIA_ENABLE = yes +VIAL_ENABLE = yes +VIALRGB_ENABLE = yes +ENCODER_MAP_ENABLE = yes + +VPATH += keyboards/keychron/common +SRC += keychron_common.c diff --git a/keyboards/keychron/q11/ansi_encoder/keymaps/vial/vial.json b/keyboards/keychron/q11/ansi_encoder/keymaps/vial/vial.json new file mode 100644 index 0000000000..6897d36068 --- /dev/null +++ b/keyboards/keychron/q11/ansi_encoder/keymaps/vial/vial.json @@ -0,0 +1,268 @@ +{ + "name": "Keychron Q11", + "vendorId": "0x3434", + "productId": "0x01E0", + "lighting": "vialrgb", + "customKeycodes": [ + {"name": "Mission Control", "title": "Mission Control in macOS", "shortName": "MCtrl"}, + {"name": "Launch Pad", "title": "Launch Pad in macOS", "shortName": "LPad"}, + {"name": "Left Option", "title": "Left Option in macOS", "shortName": "LOpt"}, + {"name": "Right Option", "title": "Right Option in macOS", "shortName": "ROpt"}, + {"name": "Left Cmd", "title": "Left Command in macOS", "shortName": "LCmd"}, + {"name": "Right Cmd", "title": "Right Command in macOS", "shortName": "RCmd"}, + {"name": "Siri", "title": "Siri in macOS", "shortName": "Siri"}, + {"name": "Task View", "title": "Task View in windows", "shortName": "Task"}, + {"name": "File Explorer", "title": "File Explorer in windows", "shortName": "File"}, + {"name": "Screen Shot", "title": "Screenshot in macOS", "shortName": "SShot"}, + {"name": "Cortana", "title": "Cortana in windows", "shortName": "Cortana"} + ], + "matrix": {"rows": 12, "cols": 9}, + "layouts": { + "keymap": [ + [ + { + "x": 0.25 + }, + "0,0\n\n\n\n\n\n\n\n\ne", + "0,1\n\n\n\n\n\n\n\n\ne", + { + "x": 14.5 + }, + "1,0\n\n\n\n\n\n\n\n\ne", + "1,1\n\n\n\n\n\n\n\n\ne" + ], + [ + { + "x": 0.75 + }, + "0,0", + { + "x": 0.25, + "c": "#777777" + }, + "0,1\nESC", + { + "c": "#cccccc" + }, + "0,2", + "0,3", + "0,4", + "0,5", + { + "c": "#aaaaaa" + }, + "0,6", + "0,7", + "6,0", + "6,1", + { + "c": "#cccccc" + }, + "6,2", + "6,3", + "6,4", + "6,5", + { + "c": "#aaaaaa" + }, + "6,6", + "6,7", + { + "x": 0.25, + "c": "#cccccc" + }, + "6,8" + ], + [ + { + "y": 0.25, + "x": 0.75 + }, + "1,0", + { + "x": 0.25 + }, + "1,1", + "1,2", + "1,3", + "1,4", + "1,5", + "1,6", + "1,7", + "7,0", + "7,1", + "7,2", + "7,3", + "7,4", + "7,5", + { + "c": "#aaaaaa", + "w": 2 + }, + "7,6", + { + "x": 0.25 + }, + "7,8" + ], + [ + { + "x": 0.75, + "c": "#cccccc" + }, + "2,0", + { + "x": 0.25, + "c": "#aaaaaa", + "w": 1.5 + }, + "2,1", + { + "c": "#cccccc" + }, + "2,2", + "2,3", + "2,4", + "2,6", + "2,7", + "8,0", + "8,1", + "8,2", + "8,3", + "8,4", + "8,5", + "8,6", + { + "w": 1.5 + }, + "8,7", + { + "x": 0.25, + "c": "#aaaaaa" + }, + "8,8" + ], + [ + { + "x": 0.75, + "c": "#cccccc" + }, + "3,0", + { + "x": 0.25, + "c": "#aaaaaa", + "w": 1.75 + }, + "3,1", + { + "c": "#cccccc" + }, + "3,2", + "3,3", + "3,4", + "3,5", + "3,6", + "9,0", + "9,1", + "9,2", + "9,3", + "9,4", + "9,5", + { + "c": "#777777", + "w": 2.25 + }, + "9,7", + { + "x": 0.25, + "c": "#aaaaaa" + }, + "9,8" + ], + [ + { + "x": 0.75, + "c": "#cccccc" + }, + "4,0", + { + "x": 0.25, + "c": "#aaaaaa", + "w": 2.25 + }, + "4,2", + { + "c": "#cccccc" + }, + "4,3", + "4,4", + "4,5", + "4,6", + "4,7", + "10,0", + "10,1", + "10,2", + "10,3", + "10,4", + { + "c": "#aaaaaa", + "w": 1.75 + }, + "10,5", + { + "x": 0.25, + "c": "#777777" + }, + "10,7" + ], + [ + { + "x": 0.75, + "c": "#cccccc" + }, + "5,0", + { + "x": 0.25, + "c": "#aaaaaa", + "w": 1.25 + }, + "5,1", + { + "w": 1.25 + }, + "5,2", + { + "w": 1.25 + }, + "5,3", + { + "w": 1.25 + }, + "5,4", + { + "c": "#cccccc", + "w": 2.25 + }, + "5,6", + { + "w": 2.75 + }, + "11,1", + { + "c": "#aaaaaa" + }, + "11,2", + "11,3", + "11,4", + { + "x": 0.25, + "c": "#777777" + }, + "11,6", + "11,7", + "11,8" + ] + ] + } +} + \ No newline at end of file diff --git a/keyboards/keychron/q11/ansi_encoder/rules.mk b/keyboards/keychron/q11/ansi_encoder/rules.mk new file mode 100755 index 0000000000..567ea30a2a --- /dev/null +++ b/keyboards/keychron/q11/ansi_encoder/rules.mk @@ -0,0 +1,9 @@ +# Build Options +# change yes to no to disable +# +EEPROM_DRIVER = wear_leveling +WEAR_LEVELING_DRIVER = embedded_flash +SERIAL_DRIVER = usart + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/keychron/q11/config.h b/keyboards/keychron/q11/config.h new file mode 100755 index 0000000000..3e765f7718 --- /dev/null +++ b/keyboards/keychron/q11/config.h @@ -0,0 +1,110 @@ +/* Copyright 2023 @ Keychron(https://www.keychron.com) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (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 + +// Connects each switch in the dip switch to the GPIO pin of the MCU +#define DIP_SWITCH_PINS \ + { A8 } + +/* handedness */ +#define SPLIT_HAND_MATRIX_GRID A2, A15 +#define SPLIT_HAND_MATRIX_GRID_LOW_IS_RIGHT + +#define MATRIX_MASKED // actual mask is defined by `matrix_mask` in `q11.c` + +/* RGB Matrix Configuration */ +#define DRIVER_COUNT 1 +#define DRIVER_ADDR_1 0b1110100 +#define DRIVER_1_LED_TOTAL 89 +#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define SPLIT_TRANSPORT_MIRROR + +/* Increase I2C speed to 1000 KHz */ +#define I2C1_TIMINGR_PRESC 0U +#define I2C1_TIMINGR_SCLDEL 3U +#define I2C1_TIMINGR_SDADEL 0U +#define I2C1_TIMINGR_SCLH 15U +#define I2C1_TIMINGR_SCLL 51U + +#define CKLED2001_CURRENT_TUNE \ + { 0x80, 0xFF, 0xFF, 0x80, 0xFF, 0xFF, 0x80, 0xFF, 0xFF, 0x80, 0xFF, 0xFF } // 300mA + +/* EEPROM Driver Configuration */ +#define WEAR_LEVELING_LOGICAL_SIZE 2048 +#define WEAR_LEVELING_BACKING_SIZE (WEAR_LEVELING_LOGICAL_SIZE * 2) + +/* Split Keyboard specific options. */ +#define SERIAL_USART_TX_PIN A9 // USART TX pin + +/* Encoder Configuration */ +#define ENCODER_DEFAULT_POS 0x3 + +/* Disable RGB lighting when PC is in suspend */ +#define RGB_DISABLE_WHEN_USB_SUSPENDED + +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +// #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_FLOW +// #define ENABLE_RGB_MATRIX_PIXEL_FRACTAL + +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN + +#define RGB_MATRIX_KEYPRESSES +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +#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/q11/halconf.h b/keyboards/keychron/q11/halconf.h new file mode 100755 index 0000000000..028285a1f3 --- /dev/null +++ b/keyboards/keychron/q11/halconf.h @@ -0,0 +1,23 @@ +/* Copyright 2020 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#define HAL_USE_I2C TRUE +#define HAL_USE_SERIAL TRUE +#define HAL_USE_ADC TRUE + +#include_next diff --git a/keyboards/keychron/q11/mcuconf.h b/keyboards/keychron/q11/mcuconf.h new file mode 100755 index 0000000000..209b3f6fb5 --- /dev/null +++ b/keyboards/keychron/q11/mcuconf.h @@ -0,0 +1,28 @@ +/* Copyright 2020 QMK + * + * 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_next + +#undef STM32_I2C_USE_I2C1 +#define STM32_I2C_USE_I2C1 TRUE + +#undef STM32_SERIAL_USE_USART1 +#define STM32_SERIAL_USE_USART1 TRUE + +#undef STM32_ADC_USE_ADC1 +#define STM32_ADC_USE_ADC1 TRUE diff --git a/keyboards/keychron/q11/q11.c b/keyboards/keychron/q11/q11.c new file mode 100755 index 0000000000..992eea5776 --- /dev/null +++ b/keyboards/keychron/q11/q11.c @@ -0,0 +1,98 @@ +/* Copyright 2023 @ Keychron (https://www.keychron.com) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "quantum.h" + +// Mask out handedness diode to prevent it +// from keeping the keyboard awake +// - just mirroring `KC_NO` in the `LAYOUT` +// macro to keep it simple +const matrix_row_t matrix_mask[] = { + 0b011111111, + 0b011111111, + 0b011111111, + 0b001111111, + 0b011111101, + 0b001011111, + 0b111111111, + 0b101111111, + 0b111111111, + 0b110111111, + 0b010111111, + 0b111011110, +}; + +#ifdef DIP_SWITCH_ENABLE +bool dip_switch_update_kb(uint8_t index, bool active) { + if (!dip_switch_update_user(index, active)) { + return false; + } + if (index == 0) { + default_layer_set(1UL << (active ? 0 : 2)); + } + return true; +} +#endif + +#if defined(RGB_MATRIX_ENABLE) && (defined(CAPS_LOCK_LED_INDEX) || defined(NUM_LOCK_LED_INDEX)) +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + if (!process_record_user(keycode, record)) { + return false; + } + switch (keycode) { + case RGB_TOG: + if (record->event.pressed) { + switch (rgb_matrix_get_flags()) { + case LED_FLAG_ALL: { + rgb_matrix_set_flags(LED_FLAG_NONE); + rgb_matrix_set_color_all(0, 0, 0); + } break; + default: { + rgb_matrix_set_flags(LED_FLAG_ALL); + } break; + } + } + if (!rgb_matrix_is_enabled()) { + rgb_matrix_set_flags(LED_FLAG_ALL); + rgb_matrix_enable(); + } + return false; + } + return true; +} + +void rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { + // RGB_MATRIX_INDICATOR_SET_COLOR(index, red, green, blue); +# if defined(CAPS_LOCK_LED_INDEX) + if (host_keyboard_led_state().caps_lock) { + RGB_MATRIX_INDICATOR_SET_COLOR(CAPS_LOCK_LED_INDEX, 255, 255, 255); + } else { + if (!rgb_matrix_get_flags()) { + RGB_MATRIX_INDICATOR_SET_COLOR(CAPS_LOCK_LED_INDEX, 0, 0, 0); + } + } +# endif // CAPS_LOCK_LED_INDEX +# if defined(NUM_LOCK_LED_INDEX) + if (host_keyboard_led_state().num_lock) { + RGB_MATRIX_INDICATOR_SET_COLOR(NUM_LOCK_LED_INDEX, 255, 255, 255); + } else { + if (!rgb_matrix_get_flags()) { + RGB_MATRIX_INDICATOR_SET_COLOR(NUM_LOCK_LED_INDEX, 0, 0, 0); + } + } +# endif // NUM_LOCK_LED_INDEX +} +#endif diff --git a/keyboards/keychron/q11/readme.md b/keyboards/keychron/q11/readme.md new file mode 100644 index 0000000000..d7cccb0b3e --- /dev/null +++ b/keyboards/keychron/q11/readme.md @@ -0,0 +1,21 @@ +# Keychron Q11 + +![Keychron Q11](https://i.imgur.com/FPTNqKj.jpg[/img]) + +A customizable 75% split keyboard. + +* Keyboard Maintainer: [Keychron](https://github.com/keychron) +* Hardware Supported: Keychron Q11 +* Hardware Availability: [Keychron Q11 QMK Custom Mechanical Keyboard](https://www.keychron.com/products/keychron-q11-qmk-custom-mechanical-keyboard) + +Make example for this keyboard (after setting up your build environment): + + make keychron/q11/ansi_encoder:default + +Flashing example for this keyboard: + + make keychron/q11/ansi_encoder:default:flash + +**Reset Key**: Hold down the key located at *K01*, which programmed as *Esc* while plugging in the keyboard. + +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). \ No newline at end of file From 4b9687098d1795bd3299e6dca2dcc07114f7a997 Mon Sep 17 00:00:00 2001 From: adophoxia <100170946+adophoxia@users.noreply.github.com> Date: Sun, 9 Apr 2023 18:02:39 -0700 Subject: [PATCH 09/18] Update Q0; Port Keychron Q0 Plus to VIAL (#416) * Update Q0; Port Keychron Q0 Plus to VIAL * Update VIAL UIDs for Q0 and Q0 Plus * Remove `via` keymaps and mentions of `VIA_ENABLE = yes` for `keychron` keymaps for Q0 and Q0 Plus * Update readme.md * Add VIAL-specific flags for `vial` keymap --- keyboards/keychron/q0/config.h | 79 +-------- keyboards/keychron/q0/q0.c | 6 +- keyboards/keychron/q0/q0.h | 23 --- keyboards/keychron/q0/readme.md | 8 +- keyboards/keychron/q0/rev_0130/config.h | 4 + keyboards/keychron/q0/rev_0130/info.json | 125 +++++++++++--- .../q0/rev_0130/keymaps/default/keymap.c | 12 +- .../q0/rev_0130/keymaps/keychron/keymap.c | 65 ++++++++ .../q0/rev_0130/keymaps/keychron/rules.mk | 4 + .../q0/rev_0130/keymaps/vial/config.h | 2 +- .../q0/rev_0130/keymaps/vial/keymap.c | 26 ++- .../q0/rev_0130/keymaps/vial/rules.mk | 5 +- .../q0/rev_0130/keymaps/vial/vial.json | 20 +-- keyboards/keychron/q0/rev_0130/rev_0130.c | 33 ---- keyboards/keychron/q0/rev_0130/rules.mk | 22 --- .../rev_0130.h => rev_0131/config.h} | 34 ++-- keyboards/keychron/q0/rev_0131/info.json | 138 +++++++++++++++ .../q0/rev_0131/keymaps/default/keymap.c | 49 ++++++ .../q0/rev_0131/keymaps/default/rules.mk | 1 + .../q0/rev_0131/keymaps/keychron/keymap.c | 83 +++++++++ .../q0/rev_0131/keymaps/keychron/rules.mk | 2 + .../q0/rev_0131/keymaps/vial/config.h | 8 + .../q0/rev_0131/keymaps/vial/keymap.c | 83 +++++++++ .../q0/rev_0131/keymaps/vial/rules.mk | 7 + .../q0/rev_0131/keymaps/vial/vial.json | 157 ++++++++++++++++++ keyboards/keychron/q0/rev_0131/readme.md | 6 + keyboards/keychron/q0/rev_0131/rev_0131.c | 62 +++++++ keyboards/keychron/q0/rev_0131/rules.mk | 5 + 28 files changed, 839 insertions(+), 230 deletions(-) delete mode 100644 keyboards/keychron/q0/q0.h create mode 100644 keyboards/keychron/q0/rev_0130/keymaps/keychron/keymap.c create mode 100644 keyboards/keychron/q0/rev_0130/keymaps/keychron/rules.mk rename keyboards/keychron/q0/{rev_0130/rev_0130.h => rev_0131/config.h} (57%) create mode 100644 keyboards/keychron/q0/rev_0131/info.json create mode 100644 keyboards/keychron/q0/rev_0131/keymaps/default/keymap.c create mode 100644 keyboards/keychron/q0/rev_0131/keymaps/default/rules.mk create mode 100644 keyboards/keychron/q0/rev_0131/keymaps/keychron/keymap.c create mode 100644 keyboards/keychron/q0/rev_0131/keymaps/keychron/rules.mk create mode 100644 keyboards/keychron/q0/rev_0131/keymaps/vial/config.h create mode 100644 keyboards/keychron/q0/rev_0131/keymaps/vial/keymap.c create mode 100644 keyboards/keychron/q0/rev_0131/keymaps/vial/rules.mk create mode 100644 keyboards/keychron/q0/rev_0131/keymaps/vial/vial.json create mode 100644 keyboards/keychron/q0/rev_0131/readme.md create mode 100644 keyboards/keychron/q0/rev_0131/rev_0131.c create mode 100644 keyboards/keychron/q0/rev_0131/rules.mk diff --git a/keyboards/keychron/q0/config.h b/keyboards/keychron/q0/config.h index 9422fadb42..454d8a2cc6 100644 --- a/keyboards/keychron/q0/config.h +++ b/keyboards/keychron/q0/config.h @@ -16,86 +16,11 @@ #pragma once -/* key matrix size */ -#define MATRIX_ROWS 6 -#define MATRIX_COLS 4 - -/* key matrix pins */ -#define MATRIX_ROW_PINS { B5, B4, B3, A15, A14, A13 } -#define MATRIX_COL_PINS { A5, A6, A7, B0 } - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION ROW2COL - -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 5 - -/* RGB Matrix Driver Configuration */ -#define DRIVER_COUNT 1 -#define DRIVER_ADDR_1 0b1110100 - -#define CKLED2001_CURRENT_TUNE \ - { 0xFF, 0xFF, 0x70, 0xFF, 0xFF, 0x70, 0xFF, 0xFF, 0x70, 0xFF, 0xFF, 0x70 } - -#define RGB_MATRIX_CENTER \ - { 56, 16 } - -/* NKRO */ -#define FORCE_NKRO +#define CKLED2001_CURRENT_TUNE { 0xFF, 0xFF, 0x70, 0xFF, 0xFF, 0x70, 0xFF, 0xFF, 0x70, 0xFF, 0xFF, 0x70 } /* turn off effects when suspended */ #define RGB_DISABLE_WHEN_USB_SUSPENDED /* EEPROM Driver Configuration */ #define WEAR_LEVELING_LOGICAL_SIZE 2048 -#define WEAR_LEVELING_BACKING_SIZE (WEAR_LEVELING_LOGICAL_SIZE * 2) - -// RGB Matrix Animation modes. Explicitly enabled -// For full list of effects, see: -// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects -// #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_FLOW -// #define ENABLE_RGB_MATRIX_PIXEL_FRACTAL -// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined -#define ENABLE_RGB_MATRIX_TYPING_HEATMAP -#define ENABLE_RGB_MATRIX_DIGITAL_RAIN -// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined -#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 -// #define RGB_MATRIX_KEYPRESSES \ No newline at end of file +#define WEAR_LEVELING_BACKING_SIZE (WEAR_LEVELING_LOGICAL_SIZE * 2) \ No newline at end of file diff --git a/keyboards/keychron/q0/q0.c b/keyboards/keychron/q0/q0.c index d17ab77f47..672c8111d3 100644 --- a/keyboards/keychron/q0/q0.c +++ b/keyboards/keychron/q0/q0.c @@ -14,7 +14,7 @@ * along with this program. If not, see . */ -#include "q0.h" +#include "quantum.h" #if defined(RGB_MATRIX_ENABLE) && defined(NUM_LOCK_LED_INDEX) @@ -42,9 +42,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { return true; } -__attribute__((weak)) void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { - // RGB_MATRIX_INDICATOR_SET_COLOR(index, red, green, blue); - +void rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { if (host_keyboard_led_state().num_lock) { RGB_MATRIX_INDICATOR_SET_COLOR(NUM_LOCK_LED_INDEX, 255, 255, 255); } else { diff --git a/keyboards/keychron/q0/q0.h b/keyboards/keychron/q0/q0.h deleted file mode 100644 index 6eaa41e87c..0000000000 --- a/keyboards/keychron/q0/q0.h +++ /dev/null @@ -1,23 +0,0 @@ -/* Copyright 2022 @ Keychron (https://www.keychron.com) - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (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 "quantum.h" - -#if defined(KEYBOARD_keychron_q0_rev_0130) -# include "rev_0130.h" -#endif diff --git a/keyboards/keychron/q0/readme.md b/keyboards/keychron/q0/readme.md index d0180d386e..cab643be3b 100644 --- a/keyboards/keychron/q0/readme.md +++ b/keyboards/keychron/q0/readme.md @@ -7,12 +7,12 @@ A customizable number keypad. * Hardware Availability: [Keychron](https://www.keychron.com) Make example for this keyboard (after setting up your build environment): - - make keychron/q0/rev_0130:default + + make keychron/q0/rev_0131:vial (Keychron Q0 Plus) Flashing example for this keyboard: - - make keychron/q0/rev_0130:default:flash + + make keychron/q0/rev_0131:vial:flash (Keychron Q0 Plus) **Reset Key**: Hold down the key located at *K00*, commonly programmed as *Esc* while plugging in the keyboard. diff --git a/keyboards/keychron/q0/rev_0130/config.h b/keyboards/keychron/q0/rev_0130/config.h index e7fabed664..6b5bf30fda 100644 --- a/keyboards/keychron/q0/rev_0130/config.h +++ b/keyboards/keychron/q0/rev_0130/config.h @@ -16,6 +16,10 @@ #pragma once +/* RGB Matrix Driver Configuration */ +#define DRIVER_COUNT 1 +#define DRIVER_ADDR_1 0b1110100 + /* RGB Matrix Configuration */ #define DRIVER_1_LED_TOTAL 21 #define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL diff --git a/keyboards/keychron/q0/rev_0130/info.json b/keyboards/keychron/q0/rev_0130/info.json index d42a43ef66..cf1503db23 100644 --- a/keyboards/keychron/q0/rev_0130/info.json +++ b/keyboards/keychron/q0/rev_0130/info.json @@ -6,38 +6,117 @@ "usb": { "vid": "0x3434", "pid": "0x0130", - "device_version": "1.0.2" + "device_version": "1.0.2", + "force_nkro": true + }, + "matrix_pins": { + "cols": ["A5", "A6", "A7", "B0"], + "rows": ["B5", "B4", "B3", "A15", "A14", "A13"] + }, + "features": { + "audio": false, + "backlight": false, + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgb_matrix": true, + "rgblight": false + }, + "diode_direction": "ROW2COL", + "bootmagic": { + "matrix": [0, 1] + }, + "processor": "STM32L432", + "bootloader": "stm32-dfu", + "rgb_matrix": { + "driver": "CKLED2001", + "animations": { + "band_spiral_val": true, + "cycle_all": true, + "cycle_left_right": true, + "cycle_up_down": true, + "rainbow_moving_chevron": true, + "cycle_out_in": true, + "cycle_out_in_dual": true, + "cycle_pinwheel": true, + "cycle_spiral": true, + "dual_beacon": true, + "rainbow_beacon": true, + "jellybean_raindrops": true, + "pixel_rain": true, + "typing_heatmap": true, + "digital_rain": true, + "solid_reactive_simple": true, + "solid_reactive_multiwide": true, + "solid_reactive_multinexus": true, + "splash": true, + "solid_splash": true, + "keypresses": true, + "framebuffer_effects": true + }, + "center_point": [56, 16], + "layout": [ + {"flags": 1,"matrix":[0,0], "x":0, "y":0}, + {"flags": 1,"matrix":[0,1], "x":1, "y":0}, + {"flags": 1,"matrix":[0,2], "x":2, "y":0}, + {"flags": 1,"matrix":[0,3], "x":3, "y":0}, + + {"flags": 9,"matrix":[1,0], "x":0, "y":6}, + {"flags": 4,"matrix":[1,1], "x":1, "y":6}, + {"flags": 4,"matrix":[1,2], "x":2, "y":6}, + {"flags": 4,"matrix":[1,3], "x":3, "y":6}, + + {"flags": 4,"matrix":[2,0], "x":0, "y":13}, + {"flags": 4,"matrix":[2,1], "x":1, "y":13}, + {"flags": 4,"matrix":[2,2], "x":2, "y":13}, + + {"flags": 4,"matrix":[3,0], "x":0, "y":19}, + {"flags": 4,"matrix":[3,1], "x":1, "y":19}, + {"flags": 4,"matrix":[3,2], "x":2, "y":19}, + {"flags": 4,"matrix":[2,3], "x":3, "y":16}, + + {"flags": 4,"matrix":[4,0], "x":0, "y":25}, + {"flags": 4,"matrix":[4,1], "x":1, "y":25}, + {"flags": 4,"matrix":[4,2], "x":2, "y":25}, + + {"flags": 4,"matrix":[5,0], "x":0, "y":32}, + {"flags": 4,"matrix":[5,2], "x":2, "y":32}, + {"flags": 1,"matrix":[4,3], "x":3, "y":29} + ] }, "layouts": { "LAYOUT_numpad_6x4": { "layout": [ - {"label":"Fn", "x":0, "y":0}, - {"label":"Esc", "x":1, "y":0}, - {"label":"Backspace", "x":2, "y":0}, - {"label":"Tab", "x":3, "y":0}, + {"matrix":[0,0], "x":0, "y":0}, + {"matrix":[0,1], "x":1, "y":0}, + {"matrix":[0,2], "x":2, "y":0}, + {"matrix":[0,3], "x":3, "y":0}, - {"label":"Num Lock", "x":0, "y":1}, - {"label":"/", "x":1, "y":1}, - {"label":"*", "x":2, "y":1}, - {"label":"-", "x":3, "y":1}, + {"matrix":[1,0], "x":0, "y":1}, + {"matrix":[1,1], "x":1, "y":1}, + {"matrix":[1,2], "x":2, "y":1}, + {"matrix":[1,3], "x":3, "y":1}, - {"label":"7", "x":0, "y":2}, - {"label":"8", "x":1, "y":2}, - {"label":"9", "x":2, "y":2}, + {"matrix":[2,0], "x":0, "y":2}, + {"matrix":[2,1], "x":1, "y":2}, + {"matrix":[2,2], "x":2, "y":2}, - {"label":"4", "x":0, "y":3}, - {"label":"5", "x":1, "y":3}, - {"label":"6", "x":2, "y":3}, - {"label":"+", "x":3, "y":2, "h":2}, + {"matrix":[3,0], "x":0, "y":3}, + {"matrix":[3,1], "x":1, "y":3}, + {"matrix":[3,2], "x":2, "y":3}, + {"matrix":[2,3], "x":3, "y":2, "h":2}, - {"label":"1", "x":0, "y":4}, - {"label":"2", "x":1, "y":4}, - {"label":"3", "x":2, "y":4}, + {"matrix":[4,0], "x":0, "y":4}, + {"matrix":[4,1], "x":1, "y":4}, + {"matrix":[4,2], "x":2, "y":4}, - {"label":"0", "x":0, "y":5, "w":2}, - {"label":".", "x":2, "y":5}, - {"label":"Enter", "x":3, "y":4, "h":2} + {"matrix":[5,0], "x":0, "y":5, "w":2}, + {"matrix":[5,2], "x":2, "y":5}, + {"matrix":[4,3], "x":3, "y":4, "h":2} ] } } -} \ No newline at end of file +} diff --git a/keyboards/keychron/q0/rev_0130/keymaps/default/keymap.c b/keyboards/keychron/q0/rev_0130/keymaps/default/keymap.c index 6a05648074..387ff2d686 100644 --- a/keyboards/keychron/q0/rev_0130/keymaps/default/keymap.c +++ b/keyboards/keychron/q0/rev_0130/keymaps/default/keymap.c @@ -20,12 +20,12 @@ enum layers { _BASE, _FN1}; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = LAYOUT_numpad_6x4( - MO(_FN1), KC_ESC, KC_BSPACE, KC_TAB, - KC_NUMLOCK, KC_PSLS, KC_PAST, KC_PMNS, - KC_P7, KC_P8, KC_P9, - KC_P4, KC_P5, KC_P6, KC_PPLS, - KC_P1, KC_P2, KC_P3, - KC_P0, KC_PDOT, KC_PENT), + MO(_FN1), KC_ESC, KC_BSPC, KC_TAB, + KC_NUM, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, + KC_P0, KC_PDOT, KC_PENT), [_FN1] = LAYOUT_numpad_6x4( _______, KC_MUTE, KC_VOLD, KC_VOLU, diff --git a/keyboards/keychron/q0/rev_0130/keymaps/keychron/keymap.c b/keyboards/keychron/q0/rev_0130/keymaps/keychron/keymap.c new file mode 100644 index 0000000000..73826716fc --- /dev/null +++ b/keyboards/keychron/q0/rev_0130/keymaps/keychron/keymap.c @@ -0,0 +1,65 @@ +/* Copyright 2023 @ Keychron (https://www.keychron.com) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (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 +#include "keychron_common.h" + +enum layers { _BASE, _FN1, _RESERVED1, _RESERVED2 }; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_numpad_6x4( + MO(_FN1), KC_ESC, KC_BSPC, KC_TAB, + KC_NUM, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, + KC_P0, KC_PDOT, KC_PENT), + + [_FN1] = LAYOUT_numpad_6x4( + _______, KC_MUTE, KC_VOLD, KC_VOLU, + RGB_MOD, RGB_VAI, RGB_HUI, KC_DEL, + RGB_RMOD, RGB_VAD, RGB_HUD, + RGB_SAI, RGB_SPI, KC_MPRV, _______, + RGB_SAD, RGB_SPD, KC_MPLY, + RGB_TOG, KC_MNXT, _______), + + [_RESERVED1] = LAYOUT_numpad_6x4( + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, + _______, _______, _______), + + [_RESERVED2] = LAYOUT_numpad_6x4( + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, + _______, _______, _______) +}; + +void housekeeping_task_user(void) { + housekeeping_task_keychron(); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (!process_record_keychron(keycode, record)) { + return false; + } + return true; +} diff --git a/keyboards/keychron/q0/rev_0130/keymaps/keychron/rules.mk b/keyboards/keychron/q0/rev_0130/keymaps/keychron/rules.mk new file mode 100644 index 0000000000..e5ae43813e --- /dev/null +++ b/keyboards/keychron/q0/rev_0130/keymaps/keychron/rules.mk @@ -0,0 +1,4 @@ +ENCODER_MAP_ENABLE = yes + +VPATH += keyboards/keychron/common +SRC += keychron_common.c diff --git a/keyboards/keychron/q0/rev_0130/keymaps/vial/config.h b/keyboards/keychron/q0/rev_0130/keymaps/vial/config.h index 5065e78b68..7dab45c639 100644 --- a/keyboards/keychron/q0/rev_0130/keymaps/vial/config.h +++ b/keyboards/keychron/q0/rev_0130/keymaps/vial/config.h @@ -2,7 +2,7 @@ #pragma once -#define VIAL_KEYBOARD_UID {0xCD, 0xB9, 0xD4, 0xC9, 0x53, 0x9A, 0x68, 0xC3} +#define VIAL_KEYBOARD_UID {0xCB, 0x44, 0x98, 0x8F, 0x71, 0xAE, 0x25, 0x99} #define VIAL_UNLOCK_COMBO_ROWS { 0, 4 } #define VIAL_UNLOCK_COMBO_COLS { 0, 3 } diff --git a/keyboards/keychron/q0/rev_0130/keymaps/vial/keymap.c b/keyboards/keychron/q0/rev_0130/keymaps/vial/keymap.c index 078ede4041..73826716fc 100644 --- a/keyboards/keychron/q0/rev_0130/keymaps/vial/keymap.c +++ b/keyboards/keychron/q0/rev_0130/keymaps/vial/keymap.c @@ -1,4 +1,4 @@ -/* Copyright 2022 @ Keychron (https://www.keychron.com) +/* Copyright 2023 @ Keychron (https://www.keychron.com) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,17 +15,18 @@ */ #include QMK_KEYBOARD_H +#include "keychron_common.h" enum layers { _BASE, _FN1, _RESERVED1, _RESERVED2 }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = LAYOUT_numpad_6x4( - MO(_FN1), KC_ESC, KC_BSPACE, KC_TAB, - KC_NUMLOCK, KC_PSLS, KC_PAST, KC_PMNS, - KC_P7, KC_P8, KC_P9, - KC_P4, KC_P5, KC_P6, KC_PPLS, - KC_P1, KC_P2, KC_P3, - KC_P0, KC_PDOT, KC_PENT), + MO(_FN1), KC_ESC, KC_BSPC, KC_TAB, + KC_NUM, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, + KC_P0, KC_PDOT, KC_PENT), [_FN1] = LAYOUT_numpad_6x4( _______, KC_MUTE, KC_VOLD, KC_VOLU, @@ -51,3 +52,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______) }; + +void housekeeping_task_user(void) { + housekeeping_task_keychron(); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (!process_record_keychron(keycode, record)) { + return false; + } + return true; +} diff --git a/keyboards/keychron/q0/rev_0130/keymaps/vial/rules.mk b/keyboards/keychron/q0/rev_0130/keymaps/vial/rules.mk index 31bb6d699f..c4077f69ff 100644 --- a/keyboards/keychron/q0/rev_0130/keymaps/vial/rules.mk +++ b/keyboards/keychron/q0/rev_0130/keymaps/vial/rules.mk @@ -1,3 +1,6 @@ VIA_ENABLE = yes VIAL_ENABLE = yes -VIALRGB_ENABLE = yes \ No newline at end of file +VIALRGB_ENABLE = yes + +VPATH += keyboards/keychron/common +SRC += keychron_common.c diff --git a/keyboards/keychron/q0/rev_0130/keymaps/vial/vial.json b/keyboards/keychron/q0/rev_0130/keymaps/vial/vial.json index 4e75265ffa..65216a9750 100644 --- a/keyboards/keychron/q0/rev_0130/keymaps/vial/vial.json +++ b/keyboards/keychron/q0/rev_0130/keymaps/vial/vial.json @@ -1,14 +1,14 @@ { - "name": "Keychron Q0", - "vendorId": "0x3434", - "productId": "0x0130", - "lighting": "vialrgb", - "matrix": { - "rows": 6, - "cols": 4 - }, - "layouts": { - "keymap":[ + "name": "Keychron Q0", + "vendorId": "0x3434", + "productId": "0x0130", + "lighting": "vialrgb", + "matrix": { + "rows": 6, + "cols": 4 + }, + "layouts": { + "keymap":[ [ "0,0", "0,1", diff --git a/keyboards/keychron/q0/rev_0130/rev_0130.c b/keyboards/keychron/q0/rev_0130/rev_0130.c index 64c4842086..5d03282dd4 100644 --- a/keyboards/keychron/q0/rev_0130/rev_0130.c +++ b/keyboards/keychron/q0/rev_0130/rev_0130.c @@ -54,37 +54,4 @@ const ckled2001_led PROGMEM g_ckled2001_leds[DRIVER_LED_TOTAL] = { {0, L_1, J_1, K_1}, // 19 {0, C_2, A_2, B_2}, // 20 }; - -#define __ NO_LED - -led_config_t g_led_config = { - { - // Key Matrix to LED Index - { 0, 1, 2, 3 }, - { 4, 5, 6, 7 }, - { 8, 9, 10, 14 }, - { 11, 12, 13, __ }, - { 15, 16, 17, 20 }, - { 18, __, 19, __ } - }, - { - // LED Index to Physical Position - {0,0}, {37,0}, {75,0}, {112,0}, - {0,6}, {37,6}, {75,6}, {112,6}, - {0,13}, {37,13}, {75,13}, - {0,19}, {37,19}, {75,19}, {112,16}, - {0,25}, {37,25}, {75,25}, - {18,32}, {75,32}, {112,29}, - }, - { - // LED Index to Flag - 1, 1, 1, 1, - 9, 4, 4, 4, - 4, 4, 4, - 4, 4, 4, 4, - 4, 4, 4, - 4, 4, 1 - } -}; - #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/q0/rev_0130/rules.mk b/keyboards/keychron/q0/rev_0130/rules.mk index 5a04c755cd..4eebc33437 100644 --- a/keyboards/keychron/q0/rev_0130/rules.mk +++ b/keyboards/keychron/q0/rev_0130/rules.mk @@ -1,25 +1,3 @@ -# MCU name -MCU = STM32L432 - -# Bootloader selection -BOOTLOADER = stm32-dfu - -# Build Options -# change yes to no to disable. -# -BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = yes # Enable USB N-key Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -AUDIO_ENABLE = no # Audio output -DIP_SWITCH_ENABLE = no -RGB_MATRIX_ENABLE = yes -RGB_MATRIX_DRIVER = CKLED2001 -LTO_ENABLE = yes EEPROM_DRIVER = wear_leveling WEAR_LEVELING_DRIVER = embedded_flash diff --git a/keyboards/keychron/q0/rev_0130/rev_0130.h b/keyboards/keychron/q0/rev_0131/config.h similarity index 57% rename from keyboards/keychron/q0/rev_0130/rev_0130.h rename to keyboards/keychron/q0/rev_0131/config.h index d66c880aa9..be99f3d3bc 100644 --- a/keyboards/keychron/q0/rev_0130/rev_0130.h +++ b/keyboards/keychron/q0/rev_0131/config.h @@ -1,4 +1,4 @@ -/* Copyright 2022 @ Keychron (https://www.keychron.com) +/* Copyright 2023 @ Keychron (https://www.keychron.com) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,23 +16,19 @@ #pragma once -#include "quantum.h" +/* RGB Matrix Driver Configuration */ +#define DRIVER_COUNT 1 +#define DRIVER_ADDR_1 0b1110111 -#define XXX KC_NO +/* RGB Matrix Configuration */ +#define DRIVER_1_LED_TOTAL 26 +#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL -#define LAYOUT_numpad_6x4( \ - K00, K01, K02, K03, \ - K10, K11, K12, K13, \ - K20, K21, K22, \ - K30, K31, K32, K23, \ - K40, K41, K42, \ - K50, K52, K43 \ -) \ -{ \ - { K00, K01, K02, K03 }, \ - { K10, K11, K12, K13 }, \ - { K20, K21, K22, K23 }, \ - { K30, K31, K32, XXX }, \ - { K40, K41, K42, K43 }, \ - { K50, XXX, K52, XXX }, \ -} +/* Scan phase of led driver set as MSKPHASE_9CHANNEL(defined as 0x03 in CKLED2001.h) */ +#define PHASE_CHANNEL MSKPHASE_9CHANNEL + +/* Enable num-lock LED */ +#define NUM_LOCK_LED_INDEX 5 + +/* Encoder Configuration */ +#define ENCODER_DEFAULT_POS 0x3 diff --git a/keyboards/keychron/q0/rev_0131/info.json b/keyboards/keychron/q0/rev_0131/info.json new file mode 100644 index 0000000000..2f057ea985 --- /dev/null +++ b/keyboards/keychron/q0/rev_0131/info.json @@ -0,0 +1,138 @@ +{ + "keyboard_name": "Keychron Q0 Plus", + "manufacturer": "Keychron", + "url": "https://github.com/Keychron", + "maintainer": "lalalademaxiya1", + "usb": { + "vid": "0x3434", + "pid": "0x0131", + "device_version": "1.0.0", + "force_nkro": true + }, + "matrix_pins": { + "cols": ["C14", "C15", "A0", "A1", "A2"], + "rows": ["B5", "B4", "B3", "A15", "A14", "A13"] + }, + "features": { + "audio": false, + "backlight": false, + "bootmagic": true, + "command": false, + "console": false, + "encoder": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgb_matrix": true, + "rgblight": false + }, + "diode_direction": "ROW2COL", + "encoder": { + "rotary": [ + {"pin_a": "A3", "pin_b": "A4"} + ] + }, + "bootmagic": { + "matrix": [0, 1] + }, + "processor": "STM32L432", + "bootloader": "stm32-dfu", + "rgb_matrix": { + "driver": "CKLED2001", + "animations": { + "band_spiral_val": true, + "cycle_all": true, + "cycle_left_right": true, + "cycle_up_down": true, + "rainbow_moving_chevron": true, + "cycle_out_in": true, + "cycle_out_in_dual": true, + "cycle_pinwheel": true, + "cycle_spiral": true, + "dual_beacon": true, + "rainbow_beacon": true, + "jellybean_raindrops": true, + "pixel_rain": true, + "typing_heatmap": true, + "digital_rain": true, + "solid_reactive_simple": true, + "solid_reactive_multiwide": true, + "solid_reactive_multinexus": true, + "splash": true, + "solid_splash": true, + "keypresses": true, + "framebuffer_effects": true + }, + "layout": [ + {"flags": 1, "matrix":[0,1], "x":1.25, "y":0}, + {"flags": 1, "matrix":[0,2], "x":2.25, "y":0}, + {"flags": 1, "matrix":[0,3], "x":3.25, "y":0}, + {"flags": 1, "matrix":[0,4], "x":4.25, "y":0}, + + {"flags": 4, "matrix":[1,0], "x":0, "y":1.25}, + {"flags": 8, "matrix":[1,1], "x":1.25, "y":1.25}, + {"flags": 4, "matrix":[1,2], "x":2.25, "y":1.25}, + {"flags": 4, "matrix":[1,3], "x":3.25, "y":1.25}, + {"flags": 4, "matrix":[1,4], "x":4.25, "y":1.25}, + + {"flags": 4, "matrix":[2,0], "x":0, "y":2.25}, + {"flags": 4, "matrix":[2,1], "x":1.25, "y":2.25}, + {"flags": 4, "matrix":[2,2], "x":2.25, "y":2.25}, + {"flags": 4, "matrix":[2,3], "x":3.25, "y":2.25}, + {"flags": 4, "matrix":[2,4], "x":4.25, "y":2.25}, + + {"flags": 4, "matrix":[3,0], "x":0, "y":3.25}, + {"flags": 4, "matrix":[3,1], "x":1.25, "y":3.25}, + {"flags": 4, "matrix":[3,2], "x":2.25, "y":3.25}, + {"flags": 4, "matrix":[3,3], "x":3.25, "y":3.25}, + + {"flags": 4, "matrix":[4,0], "x":0, "y":4.25}, + {"flags": 4, "matrix":[4,1], "x":1.25, "y":4.25}, + {"flags": 4, "matrix":[4,2], "x":2.25, "y":4.25}, + {"flags": 4, "matrix":[4,3], "x":3.25, "y":4.25}, + {"flags": 4, "matrix":[4,4], "x":4.25, "y":4.25}, + + {"flags": 4, "matrix":[5,0], "x":0, "y":5.25}, + {"flags": 4, "matrix":[5,1], "x":1.25, "y":5.25}, + {"flags": 1, "matrix":[5,3], "x":3.25, "y":5.25} + ] + }, + "layouts": { + "LAYOUT_numpad_6x5": { + "layout": [ + {"matrix":[0,0], "x":0, "y":0}, + {"matrix":[0,1], "x":1.25, "y":0}, + {"matrix":[0,2], "x":2.25, "y":0}, + {"matrix":[0,3], "x":3.25, "y":0}, + {"matrix":[0,4], "x":4.25, "y":0}, + + {"matrix":[1,0], "x":0, "y":1.25}, + {"matrix":[1,1], "x":1.25, "y":1.25}, + {"matrix":[1,2], "x":2.25, "y":1.25}, + {"matrix":[1,3], "x":3.25, "y":1.25}, + {"matrix":[1,4], "x":4.25, "y":1.25}, + + {"matrix":[2,0], "x":0, "y":2.25}, + {"matrix":[2,1], "x":1.25, "y":2.25}, + {"matrix":[2,2], "x":2.25, "y":2.25}, + {"matrix":[2,3], "x":3.25, "y":2.25}, + {"matrix":[2,4], "x":4.25, "y":2.25, "h":2}, + + {"matrix":[3,0], "x":0, "y":3.25}, + {"matrix":[3,1], "x":1.25, "y":3.25}, + {"matrix":[3,2], "x":2.25, "y":3.25}, + {"matrix":[3,3], "x":3.25, "y":3.25}, + + {"matrix":[4,0], "x":0, "y":4.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, "h":2}, + + {"matrix":[5,0], "x":0, "y":5.25}, + {"matrix":[5,1], "x":1.25, "y":5.25, "w":2}, + {"matrix":[5,3], "x":3.25, "y":5.25} + ] + } + } +} diff --git a/keyboards/keychron/q0/rev_0131/keymaps/default/keymap.c b/keyboards/keychron/q0/rev_0131/keymaps/default/keymap.c new file mode 100644 index 0000000000..f92d6b8362 --- /dev/null +++ b/keyboards/keychron/q0/rev_0131/keymaps/default/keymap.c @@ -0,0 +1,49 @@ +/* Copyright 2023 @ Keychron (https://www.keychron.com) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (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 + +// clang-format off + +enum layers { + BASE, + FUNC +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = LAYOUT_numpad_6x5( + KC_MUTE, MO(FUNC), KC_ESC, KC_BSPC, KC_TAB, + _______, KC_NUM, KC_PSLS, KC_PAST, KC_PMNS, + _______, KC_P7, KC_P8, KC_P9, KC_PPLS, + _______, KC_P4, KC_P5, KC_P6, + _______, KC_P1, KC_P2, KC_P3, KC_PENT, + _______, KC_P0, KC_PDOT), + + [FUNC] = LAYOUT_numpad_6x5( + RGB_TOG, _______, KC_MUTE, KC_VOLD, KC_VOLU, + _______, RGB_MOD, RGB_VAI, RGB_HUI, KC_DEL, + _______, RGB_RMOD, RGB_VAD, RGB_HUD, _______, + _______, RGB_SAI, RGB_SPI, KC_MPRV, + _______, RGB_SAD, RGB_SPD, KC_MPLY, _______, + _______, RGB_TOG, KC_MNXT), +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [FUNC] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI) }, +}; +#endif // ENCODER_MAP_ENABLE diff --git a/keyboards/keychron/q0/rev_0131/keymaps/default/rules.mk b/keyboards/keychron/q0/rev_0131/keymaps/default/rules.mk new file mode 100644 index 0000000000..ee32568148 --- /dev/null +++ b/keyboards/keychron/q0/rev_0131/keymaps/default/rules.mk @@ -0,0 +1 @@ +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/keychron/q0/rev_0131/keymaps/keychron/keymap.c b/keyboards/keychron/q0/rev_0131/keymaps/keychron/keymap.c new file mode 100644 index 0000000000..5d73b5733f --- /dev/null +++ b/keyboards/keychron/q0/rev_0131/keymaps/keychron/keymap.c @@ -0,0 +1,83 @@ +/* Copyright 2023 @ Keychron (https://www.keychron.com) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (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 +#include "keychron_common.h" + +// clang-format off + +enum layers { + BASE, + FUNC, + L2, + L3 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = LAYOUT_numpad_6x5( + KC_MUTE, MO(FUNC), KC_ESC, KC_BSPC, KC_TAB, + MACRO01, KC_NUM, KC_PSLS, KC_PAST, KC_PMNS, + MACRO02, KC_P7, KC_P8, KC_P9, KC_PPLS, + MACRO03, KC_P4, KC_P5, KC_P6, + MACRO04, KC_P1, KC_P2, KC_P3, KC_PENT, + MACRO05, KC_P0, KC_PDOT), + + [FUNC] = LAYOUT_numpad_6x5( + RGB_TOG, _______, KC_MUTE, KC_VOLD, KC_VOLU, + MACRO01, RGB_MOD, RGB_VAI, RGB_HUI, KC_DEL, + MACRO02, RGB_RMOD, RGB_VAD, RGB_HUD, _______, + MACRO03, RGB_SAI, RGB_SPI, KC_MPRV, + MACRO04, RGB_SAD, RGB_SPD, KC_MPLY, _______, + MACRO05, RGB_TOG, KC_MNXT), + + [L2] = LAYOUT_numpad_6x5( + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______), + + [L3] = LAYOUT_numpad_6x5( + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______) +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [FUNC] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI) }, + [L2] = { ENCODER_CCW_CW(_______, _______) }, + [L3] = { ENCODER_CCW_CW(_______, _______) } +}; +#endif // ENCODER_MAP_ENABLE + +// clang-format on + +void housekeeping_task_user(void) { + housekeeping_task_keychron(); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (!process_record_keychron(keycode, record)) { + return false; + } + return true; +} diff --git a/keyboards/keychron/q0/rev_0131/keymaps/keychron/rules.mk b/keyboards/keychron/q0/rev_0131/keymaps/keychron/rules.mk new file mode 100644 index 0000000000..4b0e1da76e --- /dev/null +++ b/keyboards/keychron/q0/rev_0131/keymaps/keychron/rules.mk @@ -0,0 +1,2 @@ +VPATH += keyboards/keychron/common +SRC += keychron_common.c diff --git a/keyboards/keychron/q0/rev_0131/keymaps/vial/config.h b/keyboards/keychron/q0/rev_0131/keymaps/vial/config.h new file mode 100644 index 0000000000..15f11cf4df --- /dev/null +++ b/keyboards/keychron/q0/rev_0131/keymaps/vial/config.h @@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#pragma once + +#define VIAL_KEYBOARD_UID {0xD2, 0xD3, 0x91, 0xAE, 0xA4, 0x06, 0x6C, 0x30} + +#define VIAL_UNLOCK_COMBO_ROWS { 0, 4 } +#define VIAL_UNLOCK_COMBO_COLS { 1, 4 } diff --git a/keyboards/keychron/q0/rev_0131/keymaps/vial/keymap.c b/keyboards/keychron/q0/rev_0131/keymaps/vial/keymap.c new file mode 100644 index 0000000000..52e1ee2eb2 --- /dev/null +++ b/keyboards/keychron/q0/rev_0131/keymaps/vial/keymap.c @@ -0,0 +1,83 @@ +/* Copyright 2023 @ Keychron (https://www.keychron.com) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (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 +#include "keychron_common.h" + +// clang-format off + +enum layers { + BASE, + FUNC, + L2, + L3 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = LAYOUT_numpad_6x5( + KC_MUTE, MO(FUNC), KC_ESC, KC_BSPC, KC_TAB, + MACRO01, KC_NUM, KC_PSLS, KC_PAST, KC_PMNS, + MACRO02, KC_P7, KC_P8, KC_P9, KC_PPLS, + MACRO03, KC_P4, KC_P5, KC_P6, + MACRO04, KC_P1, KC_P2, KC_P3, KC_PENT, + MACRO05, KC_P0, KC_PDOT), + + [FUNC] = LAYOUT_numpad_6x5( + RGB_TOG, _______, KC_MUTE, KC_VOLD, KC_VOLU, + MACRO01, RGB_MOD, RGB_VAI, RGB_HUI, KC_DEL, + MACRO02, RGB_RMOD, RGB_VAD, RGB_HUD, _______, + MACRO03, RGB_SAI, RGB_SPI, KC_MPRV, + MACRO04, RGB_SAD, RGB_SPD, KC_MPLY, _______, + MACRO05, RGB_TOG, KC_MNXT), + + [L2] = LAYOUT_numpad_6x5( + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______), + + [L3] = LAYOUT_numpad_6x5( + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______) +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [FUNC] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI) }, + [L2] = { ENCODER_CCW_CW(_______, _______) }, + [L3] = { ENCODER_CCW_CW(_______, _______) } +}; +#endif // ENCODER_MAP_ENABLE + +// clang-format on + +void housekeeping_task_user(void) { + housekeeping_task_keychron(); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (!process_record_keychron(keycode, record)) { + return false; + } + return true; +} diff --git a/keyboards/keychron/q0/rev_0131/keymaps/vial/rules.mk b/keyboards/keychron/q0/rev_0131/keymaps/vial/rules.mk new file mode 100644 index 0000000000..c4ca639d6c --- /dev/null +++ b/keyboards/keychron/q0/rev_0131/keymaps/vial/rules.mk @@ -0,0 +1,7 @@ +VIA_ENABLE = yes +VIAL_ENABLE = yes +VIALRGB_ENABLE = yes +ENCODER_MAP_ENABLE = yes + +VPATH += keyboards/keychron/common +SRC += keychron_common.c diff --git a/keyboards/keychron/q0/rev_0131/keymaps/vial/vial.json b/keyboards/keychron/q0/rev_0131/keymaps/vial/vial.json new file mode 100644 index 0000000000..06922df10d --- /dev/null +++ b/keyboards/keychron/q0/rev_0131/keymaps/vial/vial.json @@ -0,0 +1,157 @@ +{ + "name": "Keychron Q0 Plus", + "vendorId": "0x3434", + "productId": "0x0131", + "lighting": "vialrgb", + "customKeycodes": [ + { + "name": "Mission Control", + "title": "Mission Control in macOS", + "shortName": "MCtrl" + }, + { + "name": "Launch Pad", + "title": "Launch Pad in macOS", + "shortName": "LPad" + }, + { + "name": "Left Option", + "title": "Left Option in macOS", + "shortName": "LOpt" + }, + { + "name": "Right Option", + "title": "Right Option in macOS", + "shortName": "ROpt" + }, + { + "name": "Left Cmd", + "title": "Left Command in macOS", + "shortName": "LCmd" + }, + { + "name": "Right Cmd", + "title": "Right Command in macOS", + "shortName": "RCmd" + }, + { + "name": "Siri", + "title": "Siri in macOS", + "shortName": "Siri" + }, + { + "name": "Task View", + "title": "Task View in windows", + "shortName": "Task" + }, + { + "name": "File Explorer", + "title": "File Explorer in windows", + "shortName": "File" + }, + { + "name": "Screen Shot", + "title": "Screenshot in macOS", + "shortName": "SShot" + }, + { + "name": "Cortana", + "title": "Cortana in windows", + "shortName": "Cortana" + } + ], + "matrix": {"rows": 6, "cols": 5}, + "layouts": { + "keymap": [ + [ + "0,0\n\n\n\n\n\n\n\n\ne", + "0,1\n\n\n\n\n\n\n\n\ne" + ], + [ + { + "x": 0.5 + }, + "0,0", + { + "x": 0.25, + "c": "#aaaaaa" + }, + "0,1", + "0,2", + "0,3", + "0,4" + ], + [ + { + "y": 0.25, + "x": 0.5, + "c": "#cccccc" + }, + "1,0", + { + "x": 0.25 + }, + "1,1", + "1,2", + "1,3", + "1,4" + ], + [ + { + "x": 0.5 + }, + "2,0", + { + "x": 0.25 + }, + "2,1", + "2,2", + "2,3", + { + "h": 2 + }, + "2,4" + ], + [ + { + "x": 0.5 + }, + "3,0", + { + "x": 0.25 + }, + "3,1", + "3,2", + "3,3" + ], + [ + { + "x": 0.5 + }, + "4,0", + { + "x": 0.25 + }, + "4,1", + "4,2", + "4,3", + { + "h": 2 + }, + "4,4" + ], + [ + { + "x": 0.5 + }, + "5,0", + { + "x": 0.25, + "w": 2 + }, + "5,1", + "5,3" + ] + ] + } +} diff --git a/keyboards/keychron/q0/rev_0131/readme.md b/keyboards/keychron/q0/rev_0131/readme.md new file mode 100644 index 0000000000..df07c40e49 --- /dev/null +++ b/keyboards/keychron/q0/rev_0131/readme.md @@ -0,0 +1,6 @@ +# The enhanced version with encoder of the Keychron Q0 + +- The name of this keyboard is "Q0 Plus" +- Enable EC11 rotary encoder +- Turn clockwise to increase volume and turn anti-clockwise to decrease volume +- Press the knob button to mute diff --git a/keyboards/keychron/q0/rev_0131/rev_0131.c b/keyboards/keychron/q0/rev_0131/rev_0131.c new file mode 100644 index 0000000000..89f812e681 --- /dev/null +++ b/keyboards/keychron/q0/rev_0131/rev_0131.c @@ -0,0 +1,62 @@ +/* Copyright 2023 @ Keychron (https://www.keychron.com) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "quantum.h" + +#ifdef RGB_MATRIX_ENABLE + +// clang-format off + +const ckled2001_led PROGMEM g_ckled2001_leds[DRIVER_LED_TOTAL] = { +/* Refer to CKLED manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ + {0, I_2, G_2, H_2}, + {0, I_3, G_3, H_3}, + {0, I_4, G_4, H_4}, + {0, I_5, G_5, H_5}, + + {0, C_1, A_1, B_1}, + {0, C_2, A_2, B_2}, + {0, C_3, A_3, B_3}, + {0, C_4, A_4, B_4}, + {0, C_5, A_5, B_5}, + + {0, F_1, D_1, E_1}, + {0, F_2, D_2, E_2}, + {0, F_3, D_3, E_3}, + {0, F_4, D_4, E_4}, + {0, F_5, D_5, E_5}, + + {0, I_6, G_6, H_6}, + {0, I_7, G_7, H_7}, + {0, I_8, G_8, H_8}, + {0, I_9, G_9, H_9}, + + {0, C_6, A_6, B_6}, + {0, C_7, A_7, B_7}, + {0, C_8, A_8, B_8}, + {0, C_9, A_9, B_9}, + {0, C_10, A_10, B_10}, + + {0, F_6, D_6, E_6}, + {0, F_7, D_7, E_7}, + {0, F_9, D_9, E_9}, +}; +#endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/q0/rev_0131/rules.mk b/keyboards/keychron/q0/rev_0131/rules.mk new file mode 100644 index 0000000000..4eebc33437 --- /dev/null +++ b/keyboards/keychron/q0/rev_0131/rules.mk @@ -0,0 +1,5 @@ +EEPROM_DRIVER = wear_leveling +WEAR_LEVELING_DRIVER = embedded_flash + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE From bec2d660d6c014024667e2aee2fa6384e07120c4 Mon Sep 17 00:00:00 2001 From: Kristofer Date: Mon, 10 Apr 2023 03:03:31 +0200 Subject: [PATCH 10/18] Port SteamVan rev1 to Vial (#429) * Start porting SteamVan rev1 * Port SteamVan rev1 * Update readme.md * Update readme.md * Update readme.md * Update keymap.c --- .../handwired/steamvan/keymaps/vial/config.h | 7 + .../handwired/steamvan/keymaps/vial/keymap.c | 60 +++++++ .../handwired/steamvan/keymaps/vial/readme.md | 2 + .../handwired/steamvan/keymaps/vial/rules.mk | 2 + .../handwired/steamvan/keymaps/vial/vial.json | 153 ++++++++++++++++++ 5 files changed, 224 insertions(+) create mode 100644 keyboards/handwired/steamvan/keymaps/vial/config.h create mode 100644 keyboards/handwired/steamvan/keymaps/vial/keymap.c create mode 100644 keyboards/handwired/steamvan/keymaps/vial/readme.md create mode 100644 keyboards/handwired/steamvan/keymaps/vial/rules.mk create mode 100644 keyboards/handwired/steamvan/keymaps/vial/vial.json diff --git a/keyboards/handwired/steamvan/keymaps/vial/config.h b/keyboards/handwired/steamvan/keymaps/vial/config.h new file mode 100644 index 0000000000..2ae2574576 --- /dev/null +++ b/keyboards/handwired/steamvan/keymaps/vial/config.h @@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#pragma once + +#define VIAL_KEYBOARD_UID {0x7B, 0x61, 0xAC, 0x64, 0xC9, 0x02, 0x6D, 0x1A} +#define VIAL_UNLOCK_COMBO_ROWS { 0, 2 } +#define VIAL_UNLOCK_COMBO_COLS { 0, 11 } diff --git a/keyboards/handwired/steamvan/keymaps/vial/keymap.c b/keyboards/handwired/steamvan/keymaps/vial/keymap.c new file mode 100644 index 0000000000..e612a7a6f5 --- /dev/null +++ b/keyboards/handwired/steamvan/keymaps/vial/keymap.c @@ -0,0 +1,60 @@ +/* Copyright 2019 John M Daly + * + * 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 + +// This file is based on the default keymap of the MiniVan. + +enum layer_names { + _QW, + _L1, + _L2, + _L3, +}; + +// Curly braces have their own keys. These are defined to make them not mess up +// the grid in layer 2. +#define L_CURBR LSFT(KC_LBRC) +#define R_CURBR LSFT(KC_RBRC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QW] = LAYOUT_standard( /* QWERTY */ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + MO(_L1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, MO(_L1), + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(_L2), + KC_LCTL, MO(_L2), KC_LGUI, KC_ENT, KC_SPC, KC_RALT, KC_ESC, TG(_L3) + ), + + [_L1] = LAYOUT_standard( /* LAYER 1 */ + KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, + _______, KC_BSLS, KC_QUOT, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_DOWN, KC_UP, KC_LEFT, KC_RGHT, _______, + _______, KC_ESC, _______, KC_PSCR, _______, _______, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, KC_RSFT, + _______, KC_LGUI, _______, _______, _______, _______, _______, _______ + ), + + [_L2] = LAYOUT_standard( /* LAYER 2 */ + _______, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, KC_0, _______, + KC_ESC, KC_PIPE, KC_DQUO, KC_UNDS, KC_PLUS, L_CURBR, R_CURBR, KC_4, KC_5, KC_6, KC_VOLU, KC_ENT, + _______, _______, _______, _______, _______, _______, KC_0, KC_1, KC_2, KC_3, KC_VOLD, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_L3] = LAYOUT_standard( /* LAYER 3 */ + _______, _______, _______, _______, _______, _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, _______, + KC_ESC, _______, _______, _______, _______, _______, _______, KC_F5, KC_F6, KC_F7, KC_F8, _______, + KC_LSFT, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_F9, KC_F10, KC_F11, KC_F12, _______, + _______, KC_LSFT, KC_B, KC_SPC, KC_C, _______, _______, _______ + ) +}; diff --git a/keyboards/handwired/steamvan/keymaps/vial/readme.md b/keyboards/handwired/steamvan/keymaps/vial/readme.md new file mode 100644 index 0000000000..9bb3f35c29 --- /dev/null +++ b/keyboards/handwired/steamvan/keymaps/vial/readme.md @@ -0,0 +1,2 @@ +# SteamVan rev1 Vial +Based on the default SteamVan layout diff --git a/keyboards/handwired/steamvan/keymaps/vial/rules.mk b/keyboards/handwired/steamvan/keymaps/vial/rules.mk new file mode 100644 index 0000000000..4f7618e9b2 --- /dev/null +++ b/keyboards/handwired/steamvan/keymaps/vial/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +VIAL_ENABLE = yes diff --git a/keyboards/handwired/steamvan/keymaps/vial/vial.json b/keyboards/handwired/steamvan/keymaps/vial/vial.json new file mode 100644 index 0000000000..87eee470d7 --- /dev/null +++ b/keyboards/handwired/steamvan/keymaps/vial/vial.json @@ -0,0 +1,153 @@ +{ + "name": "SteamVan", + "vendorId": "0xFEED", + "productId": "0x0001", + "lighting": "qmk_rgblight", + "matrix": { + "rows": 4, + "cols": 12 + }, + "layouts": { + "labels": [ + "Arrows", + "Command" + ], + "keymap": [ + [ + { + "c": "#777777" + }, + "0,0", + { + "c": "#cccccc" + }, + "0,1", + "0,2", + "0,3", + "0,4", + "0,5", + "0,6", + "0,7", + "0,8", + "0,9", + "0,10", + { + "c": "#aaaaaa", + "w": 1.75 + }, + "0,11" + ], + [ + { + "w": 1.25 + }, + "1,0", + { + "c": "#cccccc" + }, + "1,1", + "1,2", + "1,3", + "1,4", + "1,5", + "1,6", + "1,7", + "1,8", + "1,9", + "1,10", + { + "c": "#aaaaaa", + "w": 1.5 + }, + "1,11" + ], + [ + { + "w": 1.75 + }, + "2,0", + { + "c": "#cccccc" + }, + "2,1", + "2,2", + "2,3", + "2,4", + "2,5", + "2,6", + "2,7", + "2,8", + "2,9", + "2,10\n\n\n0,0", + { + "c": "#aaaaaa" + }, + "2,11" + ], + [ + { + "w": 1.25 + }, + "3,0\n\n\n1,0", + { + "w": 1.5 + }, + "3,1\n\n\n1,0", + { + "w": 1.25 + }, + "3,3\n\n\n1,0", + { + "c": "#777777", + "w": 2.25 + }, + "3,4", + { + "c": "#aaaaaa", + "w": 2 + }, + "3,6", + { + "w": 1.25 + }, + "3,8\n\n\n0,0", + { + "w": 1.5 + }, + "3,9\n\n\n0,0", + { + "w": 1.75 + }, + "3,11\n\n\n0,0" + ], + [ + { + "y": 0.25, + "x": 10.75, + "c": "#777777" + }, + "2,10\n\n\n0,1" + ], + [ + { + "c": "#aaaaaa" + }, + "3,0\n\n\n1,1", + "3,1\n\n\n1,1", + "3,2\n\n\n1,1", + "3,3\n\n\n1,1", + { + "x": 4.25, + "w": 1.5 + }, + "3,8\n\n\n0,1", + { + "c": "#777777" + }, + "3,9\n\n\n0,1", + "3,10\n\n\n0,1", + "3,11\n\n\n0,1" + ] + ] + } +} From 712ad24d403c2603251dfa6c992c22384bd69dee Mon Sep 17 00:00:00 2001 From: Kristofer Date: Mon, 10 Apr 2023 03:03:45 +0200 Subject: [PATCH 11/18] Port Plaid to Vial (#430) * Port Plaid * Update readme.md * Update readme.md * Update keymap.c --- .../dm9records/plaid/keymaps/vial/config.h | 8 ++ .../dm9records/plaid/keymaps/vial/keymap.c | 109 ++++++++++++++++++ .../dm9records/plaid/keymaps/vial/readme.md | 7 ++ .../dm9records/plaid/keymaps/vial/rules.mk | 3 + .../dm9records/plaid/keymaps/vial/vial.json | 71 ++++++++++++ 5 files changed, 198 insertions(+) create mode 100644 keyboards/dm9records/plaid/keymaps/vial/config.h create mode 100644 keyboards/dm9records/plaid/keymaps/vial/keymap.c create mode 100644 keyboards/dm9records/plaid/keymaps/vial/readme.md create mode 100644 keyboards/dm9records/plaid/keymaps/vial/rules.mk create mode 100644 keyboards/dm9records/plaid/keymaps/vial/vial.json diff --git a/keyboards/dm9records/plaid/keymaps/vial/config.h b/keyboards/dm9records/plaid/keymaps/vial/config.h new file mode 100644 index 0000000000..a45879476d --- /dev/null +++ b/keyboards/dm9records/plaid/keymaps/vial/config.h @@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#pragma once + +#define VIAL_KEYBOARD_UID {0x19, 0x4E, 0xD1, 0x59, 0x72, 0x00, 0x2E, 0x42} + +#define VIAL_UNLOCK_COMBO_ROWS { 0, 2 } +#define VIAL_UNLOCK_COMBO_COLS { 0, 11 } diff --git a/keyboards/dm9records/plaid/keymaps/vial/keymap.c b/keyboards/dm9records/plaid/keymaps/vial/keymap.c new file mode 100644 index 0000000000..c0aff7dc89 --- /dev/null +++ b/keyboards/dm9records/plaid/keymaps/vial/keymap.c @@ -0,0 +1,109 @@ +/* Copyright 2019 Takuya Urakawa (dm9records.com) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (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 + +enum plaid_layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; + +#define LOWER FN_MO13 +#define RAISE FN_MO23 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | RAlt | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_plaid_grid( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , + KC_LCTL, KC_RALT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_plaid_grid( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_plaid_grid( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * |Reset | | | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | |MusCyc|Aud on|Audoff|AGnorm|AGswap| | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | |Mus on|Musoff| | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_plaid_grid( + QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, + _______, _______, _______, MU_ON, MU_OFF, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +bool led_update_user(led_t led_state) { + writePin(LED_RED, led_state.caps_lock); + writePin(LED_GREEN, led_state.scroll_lock); + return false; +} diff --git a/keyboards/dm9records/plaid/keymaps/vial/readme.md b/keyboards/dm9records/plaid/keymaps/vial/readme.md new file mode 100644 index 0000000000..80a89a715d --- /dev/null +++ b/keyboards/dm9records/plaid/keymaps/vial/readme.md @@ -0,0 +1,7 @@ +# Vial keymap for Plaid + +This layout is based on the default layout, and includes an adjust layer (4), +accessible by holding the lower and raise modifiers together. + +RED LED : Caps Lock +GREEN LED : Scroll Lock diff --git a/keyboards/dm9records/plaid/keymaps/vial/rules.mk b/keyboards/dm9records/plaid/keymaps/vial/rules.mk new file mode 100644 index 0000000000..46f9f1360f --- /dev/null +++ b/keyboards/dm9records/plaid/keymaps/vial/rules.mk @@ -0,0 +1,3 @@ +VIA_ENABLE = yes +VIAL_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/dm9records/plaid/keymaps/vial/vial.json b/keyboards/dm9records/plaid/keymaps/vial/vial.json new file mode 100644 index 0000000000..e33ee4de72 --- /dev/null +++ b/keyboards/dm9records/plaid/keymaps/vial/vial.json @@ -0,0 +1,71 @@ +{ + "name": "Plaid", + "vendorId": "0x16C0", + "productId": "0x27DB", + "lighting": "none", + "matrix": { "rows": 4, "cols": 12 }, + "layouts": { + "labels": [["Bottom Row", "Grid", "MIT"]], + "keymap": [ + [ + "0,0", + "0,1", + "0,2", + "0,3", + "0,4", + "0,5", + "0,6", + "0,7", + "0,8", + "0,9", + "0,10", + "0,11" + ], + [ + "1,0", + "1,1", + "1,2", + "1,3", + "1,4", + "1,5", + "1,6", + "1,7", + "1,8", + "1,9", + "1,10", + "1,11" + ], + [ + "2,0", + "2,1", + "2,2", + "2,3", + "2,4", + "2,5", + "2,6", + "2,7", + "2,8", + "2,9", + "2,10", + "2,11" + ], + [ + "3,0", + "3,1", + "3,2", + "3,3", + "3,4", + { "c": "#777777" }, + "3,5\n\n\n0,0", + "3,6\n\n\n0,0", + { "c": "#cccccc" }, + "3,7", + "3,8", + "3,9", + "3,10", + "3,11" + ], + [{ "x": 5, "c": "#777777", "w": 2 }, "3,5\n\n\n0,1"] + ] + } +} From c18a5a91e82605298eef1575d7f3b9d309cc2674 Mon Sep 17 00:00:00 2001 From: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Sun, 9 Apr 2023 21:03:53 -0400 Subject: [PATCH 12/18] Move keymap to proper PCB Rev folder (#432) --- .../{ => standard_led/arm/rev4}/keymaps/vial/config.h | 0 .../{ => standard_led/arm/rev4}/keymaps/vial/keymap.c | 0 .../adelais/standard_led/arm/rev4/keymaps/vial/readme.md | 5 +++++ .../{ => standard_led/arm/rev4}/keymaps/vial/rules.mk | 0 .../{ => standard_led/arm/rev4}/keymaps/vial/vial.json | 0 5 files changed, 5 insertions(+) rename keyboards/mechlovin/adelais/{ => standard_led/arm/rev4}/keymaps/vial/config.h (100%) rename keyboards/mechlovin/adelais/{ => standard_led/arm/rev4}/keymaps/vial/keymap.c (100%) create mode 100644 keyboards/mechlovin/adelais/standard_led/arm/rev4/keymaps/vial/readme.md rename keyboards/mechlovin/adelais/{ => standard_led/arm/rev4}/keymaps/vial/rules.mk (100%) rename keyboards/mechlovin/adelais/{ => standard_led/arm/rev4}/keymaps/vial/vial.json (100%) diff --git a/keyboards/mechlovin/adelais/keymaps/vial/config.h b/keyboards/mechlovin/adelais/standard_led/arm/rev4/keymaps/vial/config.h similarity index 100% rename from keyboards/mechlovin/adelais/keymaps/vial/config.h rename to keyboards/mechlovin/adelais/standard_led/arm/rev4/keymaps/vial/config.h diff --git a/keyboards/mechlovin/adelais/keymaps/vial/keymap.c b/keyboards/mechlovin/adelais/standard_led/arm/rev4/keymaps/vial/keymap.c similarity index 100% rename from keyboards/mechlovin/adelais/keymaps/vial/keymap.c rename to keyboards/mechlovin/adelais/standard_led/arm/rev4/keymaps/vial/keymap.c diff --git a/keyboards/mechlovin/adelais/standard_led/arm/rev4/keymaps/vial/readme.md b/keyboards/mechlovin/adelais/standard_led/arm/rev4/keymaps/vial/readme.md new file mode 100644 index 0000000000..f26e9b45e6 --- /dev/null +++ b/keyboards/mechlovin/adelais/standard_led/arm/rev4/keymaps/vial/readme.md @@ -0,0 +1,5 @@ +# The Vial keymap for Adelais Rev. 4 + +Make example for this keyboard (after setting up your build environment): + + make mechlovin/adelais/standard_led/arm/rev4:vial \ No newline at end of file diff --git a/keyboards/mechlovin/adelais/keymaps/vial/rules.mk b/keyboards/mechlovin/adelais/standard_led/arm/rev4/keymaps/vial/rules.mk similarity index 100% rename from keyboards/mechlovin/adelais/keymaps/vial/rules.mk rename to keyboards/mechlovin/adelais/standard_led/arm/rev4/keymaps/vial/rules.mk diff --git a/keyboards/mechlovin/adelais/keymaps/vial/vial.json b/keyboards/mechlovin/adelais/standard_led/arm/rev4/keymaps/vial/vial.json similarity index 100% rename from keyboards/mechlovin/adelais/keymaps/vial/vial.json rename to keyboards/mechlovin/adelais/standard_led/arm/rev4/keymaps/vial/vial.json From e54c15147ad47ce7641fb4c2bb1c8bf607625338 Mon Sep 17 00:00:00 2001 From: Keepo <64993772+CountKeepo@users.noreply.github.com> Date: Mon, 10 Apr 2023 04:04:04 +0300 Subject: [PATCH 13/18] Add missing vial.json to the PRKL30 keyboard (#434) * Create rules.mk * Add files via upload * Update readme.md * Support for PRKL30 + fix Added VIAL support for PRKL30 since it didn't have any. I also fixed a deprecated line in the promicro folder. #define RGBLIGHT_ANIMATIONS is no longer valid in QMK. * Create vial.json --- .../handwired/prkl30/keymaps/vial/vial.json | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 keyboards/handwired/prkl30/keymaps/vial/vial.json diff --git a/keyboards/handwired/prkl30/keymaps/vial/vial.json b/keyboards/handwired/prkl30/keymaps/vial/vial.json new file mode 100644 index 0000000000..d3e7048f47 --- /dev/null +++ b/keyboards/handwired/prkl30/keymaps/vial/vial.json @@ -0,0 +1,20 @@ +{ + "name": "PRKL30", + "vendorId": "0xE0E0", + "productId": "0x0030", + "lighting": "qmk_rgblight", + "matrix": {"rows": 4, "cols": 10}, + "layouts": { + "labels": [ + "Encoder", + "Split space" + ], + "keymap": [ + ["0,0\n\n\n0,1\n\n\n\n\n\ne","0,1\n\n\n0,1\n\n\n\n\n\ne",{"d":true},"\n\n\n0,0\n\n\n\n\n\n",{"d":true},"\n\n\n0,0\n\n\n\n\n\n"], + [{"y":0.25,"x":2.5},"0,0","0,1","0,2","0,3","0,4","0,5","0,6","0,7","0,8","0,9","3,0","3,1",{"w":1.5},"3,2"], + [{"x":2.5},"1,0","1,1","1,2","1,3","1,4","1,5","1,6","1,7","1,8","1,9","3,3","3,4",{"x":0.25,"w":1.25,"h":2,"w2":1.5,"h2":1,"x2":-0.25},"3,5"], + [{"x":2.5},"2,0","2,1","2,2","2,3","2,4",{"w":2},"2,5\n\n\n1,0","2,7","2,8","2,9","3,6",{"w":1.25},"3,7"], + [{"y":0.25,"x":7.5},"2,5\n\n\n1,1","2,6\n\n\n1,1"] + ] + } +} \ No newline at end of file From 9824ad65cb04171a20c054888aaf29359d83c96b Mon Sep 17 00:00:00 2001 From: Patrick Muldoon Date: Sun, 9 Apr 2023 18:04:17 -0700 Subject: [PATCH 14/18] Adding Mode Sonnet, both HotSwap and Solder PCB. (#435) Following the porting guide this adds The Mode Sonnet, both hotswap and solder variants. Tested on multiple keyboards. --- keyboards/mode/m75h/keymaps/vial/config.h | 9 + keyboards/mode/m75h/keymaps/vial/keymap.c | 53 ++++ keyboards/mode/m75h/keymaps/vial/rules.mk | 2 + keyboards/mode/m75h/keymaps/vial/vial.json | 224 +++++++++++++++++ keyboards/mode/m75s/keymaps/vial/config.h | 9 + keyboards/mode/m75s/keymaps/vial/keymap.c | 53 ++++ keyboards/mode/m75s/keymaps/vial/rules.mk | 2 + keyboards/mode/m75s/keymaps/vial/vial.json | 267 +++++++++++++++++++++ 8 files changed, 619 insertions(+) create mode 100644 keyboards/mode/m75h/keymaps/vial/config.h create mode 100755 keyboards/mode/m75h/keymaps/vial/keymap.c create mode 100644 keyboards/mode/m75h/keymaps/vial/rules.mk create mode 100644 keyboards/mode/m75h/keymaps/vial/vial.json create mode 100644 keyboards/mode/m75s/keymaps/vial/config.h create mode 100755 keyboards/mode/m75s/keymaps/vial/keymap.c create mode 100644 keyboards/mode/m75s/keymaps/vial/rules.mk create mode 100644 keyboards/mode/m75s/keymaps/vial/vial.json diff --git a/keyboards/mode/m75h/keymaps/vial/config.h b/keyboards/mode/m75h/keymaps/vial/config.h new file mode 100644 index 0000000000..853449a33a --- /dev/null +++ b/keyboards/mode/m75h/keymaps/vial/config.h @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#pragma once + +#define VIAL_KEYBOARD_UID {0xF0, 0x43, 0xB4, 0x31, 0xB5, 0x0C, 0x27, 0x6F} + +/* Unlock with esc / del */ +#define VIAL_UNLOCK_COMBO_ROWS { 0, 0 } +#define VIAL_UNLOCK_COMBO_COLS { 0, 15 } diff --git a/keyboards/mode/m75h/keymaps/vial/keymap.c b/keyboards/mode/m75h/keymaps/vial/keymap.c new file mode 100755 index 0000000000..67acb022d4 --- /dev/null +++ b/keyboards/mode/m75h/keymaps/vial/keymap.c @@ -0,0 +1,53 @@ +/* +Copyright 2020 Álvaro "Gondolindrim" Volpato + +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] = { + [0] = LAYOUT_all( + 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_DEL , + 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_HOME, + 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_PGUP, + 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_PGDN, + 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_END , + KC_LCTL , KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1) , KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/mode/m75h/keymaps/vial/rules.mk b/keyboards/mode/m75h/keymaps/vial/rules.mk new file mode 100644 index 0000000000..4f7618e9b2 --- /dev/null +++ b/keyboards/mode/m75h/keymaps/vial/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +VIAL_ENABLE = yes diff --git a/keyboards/mode/m75h/keymaps/vial/vial.json b/keyboards/mode/m75h/keymaps/vial/vial.json new file mode 100644 index 0000000000..cc181bbee3 --- /dev/null +++ b/keyboards/mode/m75h/keymaps/vial/vial.json @@ -0,0 +1,224 @@ +{ + "name": "Mode SeventyFive H", + "vendorId": "0x00DE", + "productId": "0x7572", + "lighting": "none", + "matrix": {"rows": 7, "cols": 16}, + "layouts": { + "labels": ["7U Spacebar"], + "keymap": [ + [ + { + "c": "#777777" + }, + "0,0", + { + "x": 0.5, + "c": "#cccccc" + }, + "0,1", + "0,2", + "0,3", + "0,4", + { + "x": 0.5 + }, + "0,6", + "0,7", + "0,8", + "0,9", + { + "x": 0.5 + }, + "0,10", + "0,11", + "0,12", + "0,13", + { + "x": 0.5 + }, + "0,15" + ], + [ + { + "y": 0.5, + "c": "#cccccc" + }, + "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", + { + "c": "#aaaaaa", + "w": 2 + }, + "1,13", + { + "c": "#cccccc" + }, + "1,15" + ], + [ + { + "c": "#aaaaaa", + "w": 1.5 + }, + "2,0", + { + "c": "#cccccc" + }, + "2,1", + "2,2", + "2,3", + "2,4", + "2,5", + "2,6", + "2,7", + "2,8", + "2,9", + "2,10", + "2,11", + "2,12", + { + "c": "#aaaaaa", + "w": 1.5 + }, + "2,14", + { + "c": "#cccccc" + }, + "2,15" + ], + [ + { + "c": "#aaaaaa", + "w": 1.75 + }, + "3,0", + { + "c": "#cccccc" + }, + "3,1", + "3,2", + "3,3", + "3,4", + "3,5", + "3,6", + "3,7", + "3,8", + "3,9", + "3,10", + "3,11", + { + "c": "#777777", + "w": 2.25 + }, + "3,14", + { + "c": "#cccccc" + }, + "3,15" + ], + [ + { + "c": "#aaaaaa", + "w": 2.25 + }, + "4,0", + { + "c": "#cccccc" + }, + "4,2", + "4,3", + "4,4", + "4,5", + "4,6", + "4,7", + "4,8", + "4,9", + "4,10", + "4,11", + { + "c": "#aaaaaa", + "w": 1.75 + }, + "4,12", + { + "c": "#777777" + }, + "4,14", + { + "c": "#cccccc" + }, + "4,15" + ], + [ + { + "c": "#aaaaaa", + "w": 1.25 + }, + "5,0\n\n\n0,0", + { + "w": 1.25 + }, + "5,1\n\n\n0,0", + { + "w": 1.25 + }, + "5,2\n\n\n0,0", + { + "c": "#cccccc", + "w": 6.25 + }, + "6,6\n\n\n0,0", + { + "c": "#aaaaaa", + "w": 1.25 + }, + "6,10\n\n\n0,0", + { + "w": 1.25 + }, + "6,11\n\n\n0,0", + { + "x": 0.5, + "c": "#777777" + }, + "6,13", + "6,14", + "6,15" + ], + [ + { + "c": "#aaaaaa", + "w": 1.5 + }, + "5,0\n\n\n0,1", + "5,1\n\n\n0,1", + { + "w": 1.5 + }, + "5,2\n\n\n0,1", + { + "c": "#cccccc", + "w": 7 + }, + "6,6\n\n\n0,1", + { + "c": "#aaaaaa", + "w": 1.5 + }, + "6,11\n\n\n0,1" + ] + ] + } +} diff --git a/keyboards/mode/m75s/keymaps/vial/config.h b/keyboards/mode/m75s/keymaps/vial/config.h new file mode 100644 index 0000000000..c0bc8a51b7 --- /dev/null +++ b/keyboards/mode/m75s/keymaps/vial/config.h @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#pragma once + +#define VIAL_KEYBOARD_UID {0x3D, 0x6C, 0x63, 0x19, 0xA7, 0x1F, 0x0E, 0x59} + +/* Unlock with esc / del */ +#define VIAL_UNLOCK_COMBO_ROWS { 0, 0 } +#define VIAL_UNLOCK_COMBO_COLS { 0, 15 } diff --git a/keyboards/mode/m75s/keymaps/vial/keymap.c b/keyboards/mode/m75s/keymaps/vial/keymap.c new file mode 100755 index 0000000000..fafdb6c136 --- /dev/null +++ b/keyboards/mode/m75s/keymaps/vial/keymap.c @@ -0,0 +1,53 @@ +/* +Copyright 2020 Álvaro "Gondolindrim" Volpato + +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] = { + [0] = LAYOUT_all( + 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_DEL , + 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_BSPC, KC_HOME, + 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_PGUP, + 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_NUBS, KC_ENT , KC_PGDN, + KC_LSFT, KC_NUHS, 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_END , + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, MO(1) , KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + QK_BOOT , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/mode/m75s/keymaps/vial/rules.mk b/keyboards/mode/m75s/keymaps/vial/rules.mk new file mode 100644 index 0000000000..4f7618e9b2 --- /dev/null +++ b/keyboards/mode/m75s/keymaps/vial/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +VIAL_ENABLE = yes diff --git a/keyboards/mode/m75s/keymaps/vial/vial.json b/keyboards/mode/m75s/keymaps/vial/vial.json new file mode 100644 index 0000000000..d34f7c79f4 --- /dev/null +++ b/keyboards/mode/m75s/keymaps/vial/vial.json @@ -0,0 +1,267 @@ +{ + "name": "Mode SeventyFive S", + "vendorId": "0x00DE", + "productId": "0x7583", + "lighting": "none", + "matrix": {"rows": 7, "cols": 16}, + "layouts": { + "labels": [ + "7U Spacebar", + "Split Backspace", + "ISO Enter", + "Split Left Shift" + ], + "keymap": [ + [ + { + "x": 15.75 + }, + "1,13\n\n\n1,1", + "1,14\n\n\n1,1" + ], + [ + { + "y": 0.25, + "x": 2.75, + "c": "#777777" + }, + "0,0", + { + "x": 0.5, + "c": "#cccccc" + }, + "0,1", + "0,2", + "0,3", + "0,4", + { + "x": 0.5 + }, + "0,6", + "0,7", + "0,8", + "0,9", + { + "x": 0.5 + }, + "0,10", + "0,11", + "0,12", + "0,13", + { + "x": 0.5 + }, + "0,15" + ], + [ + { + "y": 0.5, + "x": 2.75, + "c": "#cccccc" + }, + "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", + { + "c": "#aaaaaa", + "w": 2 + }, + "1,13\n\n\n1,0", + { + "c": "#cccccc" + }, + "1,15" + ], + [ + { + "x": 2.75, + "c": "#aaaaaa", + "w": 1.5 + }, + "2,0", + { + "c": "#cccccc" + }, + "2,1", + "2,2", + "2,3", + "2,4", + "2,5", + "2,6", + "2,7", + "2,8", + "2,9", + "2,10", + "2,11", + "2,12", + { + "c": "#aaaaaa", + "w": 1.5 + }, + "2,14\n\n\n2,0", + { + "c": "#cccccc" + }, + "2,15", + { + "x": 1.5, + "c": "#777777", + "w": 1.25, + "h": 2, + "w2": 1.5, + "h2": 1, + "x2": -0.25 + }, + "3,14\n\n\n2,1" + ], + [ + { + "x": 2.75, + "c": "#aaaaaa", + "w": 1.75 + }, + "3,0", + { + "c": "#cccccc" + }, + "3,1", + "3,2", + "3,3", + "3,4", + "3,5", + "3,6", + "3,7", + "3,8", + "3,9", + "3,10", + "3,11", + { + "c": "#777777", + "w": 2.25 + }, + "3,14\n\n\n2,0", + { + "c": "#cccccc" + }, + "3,15", + { + "x": 0.5 + }, + "3,13\n\n\n2,1" + ], + [ + { + "c": "#aaaaaa", + "w": 1.25 + }, + "4,0\n\n\n3,1", + { + "c": "#cccccc" + }, + "4,1\n\n\n3,1", + { + "x": 0.5, + "c": "#aaaaaa", + "w": 2.25 + }, + "4,0\n\n\n3,0", + { + "c": "#cccccc" + }, + "4,2", + "4,3", + "4,4", + "4,5", + "4,6", + "4,7", + "4,8", + "4,9", + "4,10", + "4,11", + { + "c": "#aaaaaa", + "w": 1.75 + }, + "4,12", + { + "c": "#777777" + }, + "4,14", + { + "c": "#cccccc" + }, + "4,15" + ], + [ + { + "x": 2.75, + "c": "#aaaaaa", + "w": 1.25 + }, + "5,0\n\n\n0,0", + { + "w": 1.25 + }, + "5,1\n\n\n0,0", + { + "w": 1.25 + }, + "5,2\n\n\n0,0", + { + "c": "#cccccc", + "w": 6.25 + }, + "6,6\n\n\n0,0", + { + "c": "#aaaaaa", + "w": 1.25 + }, + "6,10\n\n\n0,0", + { + "w": 1.25 + }, + "6,11\n\n\n0,0", + { + "x": 0.5, + "c": "#777777" + }, + "6,13", + "6,14", + "6,15" + ], + [ + { + "x": 2.75, + "c": "#aaaaaa", + "w": 1.5 + }, + "5,0\n\n\n0,1", + "5,1\n\n\n0,1", + { + "w": 1.5 + }, + "5,2\n\n\n0,1", + { + "c": "#cccccc", + "w": 7 + }, + "6,6\n\n\n0,1", + { + "c": "#aaaaaa", + "w": 1.5 + }, + "6,11\n\n\n0,1" + ] + ] + } +} From 1d5c35f18b6a7e7cb9bdc1df8e7b61178c40561d Mon Sep 17 00:00:00 2001 From: Jake Wickham <70282382+JW2586@users.noreply.github.com> Date: Sun, 16 Apr 2023 02:09:11 +0100 Subject: [PATCH 15/18] Waterfowl support (#436) * waterfowl support * Update .gitignore * Update .gitignore * working * deleted old json files * Delete compile command.txt * Update keyboards/waterfowl/keymaps/vial/rules.mk Co-authored-by: Less/Rikki <86894501+lesshonor@users.noreply.github.com> --------- Co-authored-by: Less/Rikki <86894501+lesshonor@users.noreply.github.com> --- keyboards/waterfowl/keymaps/vial/config.h | 8 + keyboards/waterfowl/keymaps/vial/keymap.c | 117 +++++++++ keyboards/waterfowl/keymaps/vial/rules.mk | 9 + keyboards/waterfowl/keymaps/vial/vial.json | 263 +++++++++++++++++++++ 4 files changed, 397 insertions(+) create mode 100644 keyboards/waterfowl/keymaps/vial/config.h create mode 100644 keyboards/waterfowl/keymaps/vial/keymap.c create mode 100644 keyboards/waterfowl/keymaps/vial/rules.mk create mode 100644 keyboards/waterfowl/keymaps/vial/vial.json diff --git a/keyboards/waterfowl/keymaps/vial/config.h b/keyboards/waterfowl/keymaps/vial/config.h new file mode 100644 index 0000000000..0c550f1f5a --- /dev/null +++ b/keyboards/waterfowl/keymaps/vial/config.h @@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#pragma once + +#define VIAL_KEYBOARD_UID {0x95, 0x71, 0x9F, 0x29, 0xA6, 0x0B, 0x39, 0x57} + +#define VIAL_UNLOCK_COMBO_ROWS {0, 2, 4, 6} +#define VIAL_UNLOCK_COMBO_COLS {0, 0, 0, 0} diff --git a/keyboards/waterfowl/keymaps/vial/keymap.c b/keyboards/waterfowl/keymaps/vial/keymap.c new file mode 100644 index 0000000000..3e693bcebf --- /dev/null +++ b/keyboards/waterfowl/keymaps/vial/keymap.c @@ -0,0 +1,117 @@ +/* Copyright 2022 CyanDuck +* +* 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 3 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 + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _QWERTY, + _NAVNUM, + _SYM, + _FUNC, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* QWERTY + * + * ,----------------------------------. ,----------------------------------. + * | Q | W | E | R | T | | Y | U | I | O | P | + * |------+------+------+------+------| |------+------+------+------+------| + * | A | S | D | F | G | | H | J | K | L | ; | + * |------+------+------+------+------| ,-----. ,-----. |------+------+------+------+------| + * | Z | X | C | V | B | |CAPS | |NUMLK| | N | M | , | . | / | + * `----------------------------------' `-----' `-----' `----------------------------------' + * ,-----. ,--------------------. ,--------------------. ,-----. + * | 1 | | DEL | SPACE | TAB | | ESC | BS | ENTER | | 4 | + * `-----' `--------------------' `--------------------' `-----' + */ +[_QWERTY] = LAYOUT( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + MT(MOD_LGUI, KC_A), MT(MOD_LALT, KC_S), MT(MOD_LCTL, KC_D), MT(MOD_LSFT, KC_F), KC_G, KC_H, MT(MOD_LSFT, KC_J), MT(MOD_LCTL, KC_K), MT(MOD_LALT, KC_L), MT(MOD_LGUI, KC_SCLN), + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + KC_1, LT(3,KC_DEL), LT(1,KC_SPC), KC_TAB, KC_CAPS, KC_NUM, KC_ESC, KC_BSPC, LT(2,KC_ENT), KC_4 +), + +/* NAVNUM + * + * ,----------------------------------. ,----------------------------------. + * | | PgUp | UP | PgDn | | | / | 7 | 8 | 9 | - | + * |------+------+------+------+------| |------+------+------+------+------| + * | Home | Left | Down | Right| End | | = | 4 | 5 | 6 | + | + * |------+------+------+------+------| ,-----. ,-----. |------+------+------+------+------| + * | | | INS | | | |CAPS | |NUMLK| | 0 | 1 | 2 | 3 | * | + * `----------------------------------' `-----' `-----' `----------------------------------' + * ,-----. ,--------------------. ,--------------------. ,-----. + * | 1 | | DEL | SPACE | MO(3)| | ESC | BS | ENTER | | 4 | + * `-----' `--------------------' `--------------------' `-----' + */ +[_NAVNUM] = LAYOUT( + KC_NO, KC_PGUP, KC_UP, KC_PGDN, KC_NO, KC_SLSH, KC_7, KC_8, KC_9, KC_MINS, + KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_EQL, KC_4, KC_5, KC_6, KC_PLUS, + KC_NO, KC_NO, KC_INS, KC_NO, KC_NO, KC_0, KC_1, KC_2, KC_3, KC_ASTR, + KC_1, LT(3,KC_DEL), LT(1,KC_SPC), KC_TAB, KC_CAPS, KC_NUM, KC_ESC, KC_BSPC, LT(2,KC_ENT), KC_4 +), + +/* SYM + * + * ,----------------------------------. ,----------------------------------. + * | % | @ | [ | ] | \ | | ¦ | ¬ | ^ | | | + * |------+------+------+------+------| |------+------+------+------+------| + * | # | ! | ( | ) | | | | _ | ' | " | ~ | ` | + * |------+------+------+------+------| ,-----. ,-----. |------+------+------+------+------| + * | $ | £ | { | } | & | |CAPS | |NUMLK| | | | | | | + * `----------------------------------' `-----' `-----' `----------------------------------' + * ,-----. ,--------------------. ,--------------------. ,-----. + * | 1 | | DEL | SPACE | TAB | | ESC | BS | ENTER | | 4 | + * `-----' `--------------------' `--------------------' `-----' + */ +[_SYM] = LAYOUT( + KC_PERC, KC_AT, KC_LBRC, KC_RBRC, KC_BSLS, KC_NO, KC_NO, KC_CIRC, KC_NO, KC_NO, + KC_HASH, KC_EXLM, KC_LPRN, KC_RPRN, KC_PIPE, KC_UNDS, KC_QUOT, KC_DQT, KC_TILD, KC_GRV, + KC_DLR, KC_NO, KC_LCBR, KC_RCBR, KC_AMPR, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_1, LT(3,KC_DEL), LT(1,KC_SPC), KC_TAB, KC_CAPS, KC_NUM, KC_ESC, KC_BSPC, LT(2,KC_ENT), KC_4 +), + +/* FUNC + * + * ,----------------------------------. ,----------------------------------. + * | | | | | | | | F7 | F8 | F9 | F11 | + * |------+------+------+------+------| |------+------+------+------+------| + * | | | | | | | | F4 | F5 | F6 | F12 | + * |------+------+------+------+------| ,-----. ,-----. |------+------+------+------+------| + * | Reset| | | | | |CAPS | |NUMLK| | F10 | F1 | F2 | F3 | F13 | + * `----------------------------------' `-----' `-----' `----------------------------------' + * ,-----. ,--------------------. ,--------------------. ,-----. + * | 1 | | DEL | SPACE | TAB | | ESC | BS | ENTER | | 4 | + * `-----' `--------------------' `--------------------' `-----' + */ +[_FUNC] = LAYOUT( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F7, KC_F8, KC_F9, KC_F11, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F4, KC_F5, KC_F6, KC_F12, + RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_F10, KC_F1, KC_F2, KC_F3, KC_F13, + KC_1, LT(3,KC_DEL), LT(1,KC_SPC), KC_TAB, KC_CAPS, KC_NUM, KC_ESC, KC_BSPC, LT(2,KC_ENT), KC_4 +), +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [_QWERTY] = { ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN), ENCODER_CCW_CW(KC_TAB, S(KC_TAB)), ENCODER_CCW_CW(KC_MS_WH_LEFT, KC_MS_WH_RIGHT), ENCODER_CCW_CW(KC_LEFT, KC_RIGHT) }, + [_NAVNUM] = { ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN), ENCODER_CCW_CW(KC_TAB, S(KC_TAB)), ENCODER_CCW_CW(KC_MS_WH_LEFT, KC_MS_WH_RIGHT), ENCODER_CCW_CW(KC_LEFT, KC_RIGHT) }, + [_SYM] = { ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN), ENCODER_CCW_CW(KC_TAB, S(KC_TAB)), ENCODER_CCW_CW(KC_MS_WH_LEFT, KC_MS_WH_RIGHT), ENCODER_CCW_CW(KC_LEFT, KC_RIGHT) }, + [_FUNC] = { ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN), ENCODER_CCW_CW(KC_TAB, S(KC_TAB)), ENCODER_CCW_CW(KC_MS_WH_LEFT, KC_MS_WH_RIGHT), ENCODER_CCW_CW(KC_LEFT, KC_RIGHT) }, +}; +#endif \ No newline at end of file diff --git a/keyboards/waterfowl/keymaps/vial/rules.mk b/keyboards/waterfowl/keymaps/vial/rules.mk new file mode 100644 index 0000000000..db6cb50ede --- /dev/null +++ b/keyboards/waterfowl/keymaps/vial/rules.mk @@ -0,0 +1,9 @@ +ENCODER_ENABLE = yes +ENCODER_MAP_ENABLE = yes +VIA_ENABLE = yes +VIAL_ENABLE = yes +LTO_ENABLE = yes +QMK_SETTINGS = no +KEY_OVERRIDE_ENABLE = no +TAP_DANCE_ENABLE = no +COMBO_ENABLE = no \ No newline at end of file diff --git a/keyboards/waterfowl/keymaps/vial/vial.json b/keyboards/waterfowl/keymaps/vial/vial.json new file mode 100644 index 0000000000..2e2f3118a7 --- /dev/null +++ b/keyboards/waterfowl/keymaps/vial/vial.json @@ -0,0 +1,263 @@ +{ + "name": "Waterfowl", + "vendorId": "0xFEED", + "productId": "0x9CE3", + "lighting": "none", + "matrix": { + "rows": 8, + "cols": 5 + }, + "layouts": { + "keymap": + [ + [ + { + "y": 0.25, + "x": 3 + }, + "0,2", + { + "x": 9 + }, + "4,2" + ], + [ + { + "y": -0.75, + "x": 2 + }, + "0,1", + { + "x": 1 + }, + "0,3", + { + "x": 7 + }, + "4,3", + { + "x": 1 + }, + "4,1" + ], + [ + { + "y": -0.875, + "x": 5 + }, + "0,4", + { + "x": 5 + }, + "4,4" + ], + [ + { + "y": -0.625, + "x": 1 + }, + "0,0", + { + "x": 13 + }, + "4,0" + ], + [ + { + "y": -0.75, + "x": 3 + }, + "1,2", + { + "x": 9 + }, + "5,2" + ], + [ + { + "y": -0.75, + "x": 2 + }, + "1,1", + { + "x": 1 + }, + "1,3", + { + "x": 1 + }, + "1,0\n\n\n\n\n\n\n\n\ne", + "1,1\n\n\n\n\n\n\n\n\ne", + { + "x": 1 + }, + "3,0\n\n\n\n\n\n\n\n\ne", + "3,1\n\n\n\n\n\n\n\n\ne", + { + "x": 1 + }, + "5,3", + { + "x": 1 + }, + "5,1" + ], + [ + { + "y": -0.875, + "x": 5 + }, + "1,4", + { + "x": 5 + }, + "5,4" + ], + [ + { + "y": -0.625, + "x": 1 + }, + "1,0", + { + "x": 13 + }, + "5,0" + ], + [ + { + "y": -0.75, + "x": 3 + }, + "2,2", + { + "x": 9 + }, + "6,2" + ], + [ + { + "y": -0.75, + "x": 2 + }, + "2,1", + { + "x": 1 + }, + "2,3", + { + "x": 1.5 + }, + "3,4", + { + "x": 2 + }, + "7,4", + { + "x": 1.5 + }, + "6,3", + { + "x": 1 + }, + "6,1" + ], + [ + { + "y": -0.875, + "x": 5 + }, + "2,4", + { + "x": 5 + }, + "6,4" + ], + [ + { + "y": -0.625, + "x": 1 + }, + "2,0", + { + "x": 13 + }, + "6,0" + ], + [ + { + "y": -0.5, + "x": 3 + }, + "3,0", + { + "x": 9 + }, + "7,0" + ], + [ + { + "x": 2.5 + }, + "0,0\n\n\n\n\n\n\n\n\ne", + "0,1\n\n\n\n\n\n\n\n\ne", + { + "x": 8 + }, + "2,0\n\n\n\n\n\n\n\n\ne", + "2,1\n\n\n\n\n\n\n\n\ne" + ], + [ + { + "r": 15, + "rx": 4, + "ry": 8.175, + "y": -4.675, + "x": -0.5 + }, + "3,1" + ], + [ + { + "r": 30, + "y": -1, + "x": -0.5 + }, + "3,2" + ], + [ + { + "r": 45, + "y": -1, + "x": -0.5 + }, + "3,3" + ], + [ + { + "r": -45, + "rx": 13, + "y": -4.675, + "x": -0.5 + }, + "7,3" + ], + [ + { + "r": -30, + "y": -1, + "x": -0.5 + }, + "7,2" + ], + [ + { + "r": -15, + "y": -1, + "x": -0.5 + }, + "7,1" + ] + ] + } +} \ No newline at end of file From be7f5a959ae408b28a8cb8ec8f2a2f974d682986 Mon Sep 17 00:00:00 2001 From: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Sat, 15 Apr 2023 21:10:31 -0400 Subject: [PATCH 16/18] Port Adelais en Ciel rev3 (#412) * Port Adelais en Ciel rev3 * Add readme * Requested Change * Proper Encoder rules * Remove lines, fix custom keycodes and encoders --- .../rgb_led/rev3/keymaps/vial/config.h | 10 + .../rgb_led/rev3/keymaps/vial/keymap.c | 110 ++++++ .../rgb_led/rev3/keymaps/vial/readme.md | 5 + .../rgb_led/rev3/keymaps/vial/rules.mk | 8 + .../rgb_led/rev3/keymaps/vial/vial.json | 323 ++++++++++++++++++ 5 files changed, 456 insertions(+) create mode 100644 keyboards/mechlovin/adelais/rgb_led/rev3/keymaps/vial/config.h create mode 100644 keyboards/mechlovin/adelais/rgb_led/rev3/keymaps/vial/keymap.c create mode 100644 keyboards/mechlovin/adelais/rgb_led/rev3/keymaps/vial/readme.md create mode 100644 keyboards/mechlovin/adelais/rgb_led/rev3/keymaps/vial/rules.mk create mode 100644 keyboards/mechlovin/adelais/rgb_led/rev3/keymaps/vial/vial.json diff --git a/keyboards/mechlovin/adelais/rgb_led/rev3/keymaps/vial/config.h b/keyboards/mechlovin/adelais/rgb_led/rev3/keymaps/vial/config.h new file mode 100644 index 0000000000..19115cf3bf --- /dev/null +++ b/keyboards/mechlovin/adelais/rgb_led/rev3/keymaps/vial/config.h @@ -0,0 +1,10 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#pragma once + +#define VIAL_KEYBOARD_UID {0x79, 0x23, 0xBB, 0xEF, 0xD1, 0xA9, 0x46, 0x7B} +#define VIAL_UNLOCK_COMBO_ROWS { 0, 2 } +#define VIAL_UNLOCK_COMBO_COLS { 0, 13 } + +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS +#define RGB_MATRIX_KEYPRESSES \ No newline at end of file diff --git a/keyboards/mechlovin/adelais/rgb_led/rev3/keymaps/vial/keymap.c b/keyboards/mechlovin/adelais/rgb_led/rev3/keymaps/vial/keymap.c new file mode 100644 index 0000000000..fffd6d3b17 --- /dev/null +++ b/keyboards/mechlovin/adelais/rgb_led/rev3/keymaps/vial/keymap.c @@ -0,0 +1,110 @@ +/* Copyright 2020 Team Mechlovin + * + * 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 + +enum my_keycodes { + BL_TOG = USER00, + BL_EFFECT, + BL_ISPD, + BL_DSPD, + BL_IHUE, + BL_DHUE, + BL_ISAT, + BL_DSAT, + BL_IVAL, + BL_DVAL +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_SPC, KC_ESC, 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_DEL, + KC_SPC, 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_SLSH, + KC_SPC, 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_BSLS, MO(1), KC_RSFT, KC_UP, + KC_LCTL, KC_LALT, KC_SPC, MO(2), KC_SPC, KC_RALT, KC_RCTL ), + [1] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), + [2] = LAYOUT_all( + QK_BOOT, KC_TRNS, BL_TOG, BL_EFFECT, BL_ISPD, BL_DSPD, BL_IHUE, BL_DHUE, BL_ISAT, BL_DSAT, BL_IVAL, BL_DVAL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_P7, KC_P8, KC_P9, KC_PSLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_P4, KC_P5, KC_P6, KC_PAST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_P0, KC_PDOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), + +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [1] = { ENCODER_CCW_CW(RGB_HUD, RGB_HUI) }, + [2] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI) }, + [3] = { ENCODER_CCW_CW(RGB_RMOD, RGB_MOD)}, + // Encoder 1 +}; +#endif + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch (keycode) { +#ifdef RGB_MATRIX_ENABLE + case BL_TOG: // toggle rgb matrix + rgb_matrix_toggle(); + return false; + case BL_EFFECT: + rgb_matrix_step(); + return false; + case BL_ISPD: + rgb_matrix_increase_speed(); + return false; + case BL_DSPD: + rgb_matrix_decrease_speed(); + return false; + case BL_IHUE: + rgb_matrix_increase_hue(); + return false; + case BL_DHUE: + rgb_matrix_decrease_hue(); + return false; + case BL_ISAT: + rgb_matrix_increase_sat(); + return false; + case BL_DSAT: + rgb_matrix_decrease_sat(); + return false; + case BL_IVAL: + rgb_matrix_increase_val(); + return false; + case BL_DVAL: + rgb_matrix_decrease_val(); + return false; +#endif + default: + break; + } + } + return true; +} diff --git a/keyboards/mechlovin/adelais/rgb_led/rev3/keymaps/vial/readme.md b/keyboards/mechlovin/adelais/rgb_led/rev3/keymaps/vial/readme.md new file mode 100644 index 0000000000..2fb9a5a6b5 --- /dev/null +++ b/keyboards/mechlovin/adelais/rgb_led/rev3/keymaps/vial/readme.md @@ -0,0 +1,5 @@ +# The Vial keymap for Adelais en Ciel Rev. 3 + +Make example for this keyboard (after setting up your build environment): + + make mechlovin/adelais/rgb_led/rev3:vial \ No newline at end of file diff --git a/keyboards/mechlovin/adelais/rgb_led/rev3/keymaps/vial/rules.mk b/keyboards/mechlovin/adelais/rgb_led/rev3/keymaps/vial/rules.mk new file mode 100644 index 0000000000..de611a34ff --- /dev/null +++ b/keyboards/mechlovin/adelais/rgb_led/rev3/keymaps/vial/rules.mk @@ -0,0 +1,8 @@ +VIA_ENABLE = yes +VIAL_ENABLE = yes +VIALRGB_ENABLE = yes +LTO_ENABLE = yes +KEY_OVERRIDE_ENABLE = no +COMBO_ENABLE = no +ENCODER_ENABLE = yes +ENCODER_MAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/mechlovin/adelais/rgb_led/rev3/keymaps/vial/vial.json b/keyboards/mechlovin/adelais/rgb_led/rev3/keymaps/vial/vial.json new file mode 100644 index 0000000000..d163d58253 --- /dev/null +++ b/keyboards/mechlovin/adelais/rgb_led/rev3/keymaps/vial/vial.json @@ -0,0 +1,323 @@ +{ + "name": "Adelais En Ciel Rev.3 DEV", + "vendorId": "0x4D4C", + "productId": "0xAEC4", + "lighting": "vialrgb", + "customKeycodes": [ + {"name": "Backlight Toggle", "title": "Backlight Toggle", "shortName": "BL_TOG"}, + {"name": "Backlight Effect", "title": "Backlight Effect", "shortName": "BL_EFFECT"}, + {"name": "Backlight Increase Speed", "title": "Backlight Increase Speed", "shortName": "BL_ISPD"}, + {"name": "Backlight Decrease Speed", "title": "Backlight Decrease Speed", "shortName": "BL_DSPD"}, + {"name": "Backlight Increase Hue", "title": "Backlight Increase Hue", "shortName": "BL_IHUE"}, + {"name": "Backlight Decrease Hue", "title": "Backlight Decrease Hue", "shortName": "BL_DHUE"}, + {"name": "Backlight Increase Saturation", "title": "Backlight Increase Saturation", "shortName": "BL_ISAT"}, + {"name": "Backlight Decrease Saturation", "title": "Backlight Decrease Saturation", "shortName": "BL_DSAT"}, + {"name": "Backlight Increase Value", "title": "Backlight Increase Value", "shortName": "BL_IVAL"}, + {"name": "Backlight Decrease Value", "title": "Backlight Decrease Value", "shortName": "BL_DVAL"} + ], + "matrix": {"rows": 5, "cols": 15}, + "layouts": { + "labels": [ + "Back Space 2U", + "Right Shift 2.75U", + "Split Space", + "Encoder" + ], + "keymap": [ + [ + { + "x": 0.5, + "c": "#777777" + }, + "3,0\n\n\n\n\n\n\n\n\ne", + "3,1\n\n\n\n\n\n\n\n\ne" + ], + [ + { + "y": -0.85, + "x": 15.15, + "c": "#aaaaaa", + "w": 2 + }, + "0,13\n\n\n0,1" + ], + [ + { + "x": 0.55, + "c": "#777777" + }, + "3,1" + ], + [ + { + "y": -0.95, + "x": 3.7, + "c": "#cccccc" + }, + "0,2", + { + "x": 8.45 + }, + "0,11" + ], + [ + { + "y": -0.95, + "x": 1.7 + }, + "0,0", + "0,1", + { + "x": 10.45 + }, + "0,12", + { + "c": "#aaaaaa" + }, + "0,13\n\n\n0,0", + "0,14\n\n\n0,0" + ], + [ + { + "y": -0.10000000000000009, + "x": 0.35 + }, + "4,1" + ], + [ + { + "y": -0.9499999999999997, + "x": 13, + "c": "#cccccc" + }, + "1,10" + ], + [ + { + "y": -0.9500000000000002, + "x": 1.5, + "c": "#aaaaaa", + "w": 1.5 + }, + "1,0", + { + "c": "#cccccc" + }, + "1,1", + { + "x": 10 + }, + "1,11", + "1,12", + { + "c": "#aaaaaa", + "w": 1.5 + }, + "1,13" + ], + [ + { + "y": -0.10000000000000009, + "x": 0.15 + }, + "4,3" + ], + [ + { + "y": -0.9000000000000004, + "x": 13.4, + "c": "#cccccc" + }, + "2,10", + "2,11", + { + "c": "#777777", + "w": 2.25 + }, + "2,13" + ], + [ + { + "y": -0.9999999999999996, + "x": 1.3, + "c": "#aaaaaa", + "w": 1.75 + }, + "2,0", + { + "c": "#cccccc" + }, + "2,1" + ], + [ + { + "x": 1.05, + "c": "#aaaaaa", + "w": 2.25 + }, + "3,0", + { + "c": "#cccccc" + }, + "3,2", + { + "x": 8.8 + }, + "3,11", + "3,12", + { + "c": "#aaaaaa", + "w": 1.75 + }, + "3,13\n\n\n1,0", + "3,14\n\n\n1,0", + { + "x": 0.3000000000000007, + "w": 2.75 + }, + "3,13\n\n\n1,1" + ], + [ + { + "x": 1.05, + "w": 1.5 + }, + "4,0", + { + "x": 13.45, + "w": 1.5 + }, + "4,14" + ], + [ + { + "r": 12, + "y": -6, + "x": 5.05, + "c": "#cccccc" + }, + "0,3", + "0,4", + "0,5", + "0,6" + ], + [ + { + "x": 4.6 + }, + "1,2", + "1,3", + "1,4", + "1,5" + ], + [ + { + "x": 4.85 + }, + "2,2", + "2,3", + "2,4", + "2,5" + ], + [ + { + "x": 5.3 + }, + "3,3", + "3,4", + "3,5", + "3,6" + ], + [ + { + "x": 6.6, + "c": "#777777", + "w": 2 + }, + "4,4\n\n\n2,0", + { + "c": "#aaaaaa", + "w": 1.25 + }, + "4,6\n\n\n2,0" + ], + [ + { + "y": -0.9500000000000002, + "x": 5.05, + "w": 1.5 + }, + "4,2" + ], + [ + { + "y": 0.25, + "x": 6.5, + "c": "#777777", + "w": 2.25 + }, + "4,4\n\n\n2,1", + { + "c": "#aaaaaa" + }, + "4,6\n\n\n2,1" + ], + [ + { + "r": -12, + "y": -2.7, + "x": 8.45, + "c": "#cccccc" + }, + "0,7", + "0,8", + "0,9", + "0,10" + ], + [ + { + "x": 8.05 + }, + "1,6", + "1,7", + "1,8", + "1,9" + ], + [ + { + "x": 8.2 + }, + "2,6", + "2,7", + "2,8", + "2,9" + ], + [ + { + "x": 7.75 + }, + "3,7", + "3,8", + "3,9", + "3,10" + ], + [ + { + "x": 7.75, + "c": "#777777", + "w": 2.75 + }, + "4,8" + ], + [ + { + "y": -0.9500000000000002, + "x": 10.55, + "c": "#aaaaaa", + "w": 1.5 + }, + "4,10" + ] + ] + } + } From b28c08ff54ac327ed4cce628e408652ebcadf00d Mon Sep 17 00:00:00 2001 From: Alvaro Muente <40742045+alvaromuente@users.noreply.github.com> Date: Sat, 15 Apr 2023 20:11:16 -0500 Subject: [PATCH 17/18] jay60 vial keymap (#438) --- .../mechlovin/jay60/keymaps/vial/config.h | 7 + .../mechlovin/jay60/keymaps/vial/keymap.c | 36 +++++ .../mechlovin/jay60/keymaps/vial/rules.mk | 8 ++ .../mechlovin/jay60/keymaps/vial/vial.json | 127 ++++++++++++++++++ 4 files changed, 178 insertions(+) create mode 100644 keyboards/mechlovin/jay60/keymaps/vial/config.h create mode 100644 keyboards/mechlovin/jay60/keymaps/vial/keymap.c create mode 100644 keyboards/mechlovin/jay60/keymaps/vial/rules.mk create mode 100644 keyboards/mechlovin/jay60/keymaps/vial/vial.json diff --git a/keyboards/mechlovin/jay60/keymaps/vial/config.h b/keyboards/mechlovin/jay60/keymaps/vial/config.h new file mode 100644 index 0000000000..a9982c34d5 --- /dev/null +++ b/keyboards/mechlovin/jay60/keymaps/vial/config.h @@ -0,0 +1,7 @@ +#pragma once + +#define VIAL_KEYBOARD_UID {0xED, 0x27, 0xA0, 0x71, 0x36, 0x44, 0x16, 0x13} +#define VIAL_UNLOCK_COMBO_ROWS { 0, 2 } +#define VIAL_UNLOCK_COMBO_COLS { 0, 13 } + +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 diff --git a/keyboards/mechlovin/jay60/keymaps/vial/keymap.c b/keyboards/mechlovin/jay60/keymaps/vial/keymap.c new file mode 100644 index 0000000000..ed73cc5267 --- /dev/null +++ b/keyboards/mechlovin/jay60/keymaps/vial/keymap.c @@ -0,0 +1,36 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_ESC, 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_BSLS, KC_GRV, + 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_BSPC, + KC_LCTL, 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, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, KC_RALT, KC_RGUI, KC_RCTL + ), + + [1] = LAYOUT_all( + KC_TRNS, 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_TRNS, KC_PSCR, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_BSPC, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, + KC_TRNS, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_DOWN, KC_END, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + +}; \ No newline at end of file diff --git a/keyboards/mechlovin/jay60/keymaps/vial/rules.mk b/keyboards/mechlovin/jay60/keymaps/vial/rules.mk new file mode 100644 index 0000000000..d2df3b4b86 --- /dev/null +++ b/keyboards/mechlovin/jay60/keymaps/vial/rules.mk @@ -0,0 +1,8 @@ +VIA_ENABLE = yes +VIAL_ENABLE = yes + +LTO_ENABLE = yes +QMK_SETTINGS = no +TAP_DANCE_ENABLE = no +COMBO_ENABLE = no +KEY_OVERRIDE_ENABLE = no \ No newline at end of file diff --git a/keyboards/mechlovin/jay60/keymaps/vial/vial.json b/keyboards/mechlovin/jay60/keymaps/vial/vial.json new file mode 100644 index 0000000000..33a9c64e1c --- /dev/null +++ b/keyboards/mechlovin/jay60/keymaps/vial/vial.json @@ -0,0 +1,127 @@ +{ + "name": "Jay60 Rev.1", + "vendorId": "0x4D4C", + "productId": "0x0600", + "lighting": "none", + "matrix": {"rows": 5, "cols": 14}, + "layouts": { + "labels": [ + "Split Backspace", + "2.75U Right Shift", + ["Bottom Row", "6.25U", "7U"] + ], + "keymap": [ + [ + {"c": "#777777"}, + "0,0", + {"c": "#cccccc"}, + "0,1", + "0,2", + "0,3", + "0,4", + "0,5", + "0,6", + "0,7", + "0,8", + "0,9", + "0,10", + "0,11", + "0,12", + {"c": "#aaaaaa", "w": 2}, + "0,13\n\n\n0,0", + {"x": 0.25}, + "0,13\n\n\n0,1", + "2,12\n\n\n0,1" + ], + [ + {"w": 1.5}, + "1,0", + {"c": "#cccccc"}, + "1,1", + "1,2", + "1,3", + "1,4", + "1,5", + "1,6", + "1,7", + "1,8", + "1,9", + "1,10", + "1,11", + "1,12", + {"c": "#aaaaaa", "w": 1.5}, + "1,13" + ], + [ + {"w": 1.75}, + "2,0", + {"c": "#cccccc"}, + "2,1", + "2,2", + "2,3", + "2,4", + "2,5", + "2,6", + "2,7", + "2,8", + "2,9", + "2,10", + "2,11", + {"c": "#777777", "w": 2.25}, + "2,13" + ], + [ + {"c": "#aaaaaa", "w": 2.25}, + "3,0", + {"c": "#cccccc"}, + "3,2", + "3,3", + "3,4", + "3,5", + "3,6", + "3,7", + "3,8", + "3,9", + "3,10", + "3,11", + {"c": "#aaaaaa", "w": 1.75}, + "3,12\n\n\n1,0", + "3,13\n\n\n1,0", + {"x": 0.25, "w": 2.75}, + "3,12\n\n\n1,1" + ], + [ + {"w": 1.25}, + "4,0\n\n\n2,0", + {"w": 1.25}, + "4,1\n\n\n2,0", + {"w": 1.25}, + "4,2\n\n\n2,0", + {"c": "#cccccc", "w": 6.25}, + "4,6\n\n\n2,0", + {"c": "#aaaaaa", "w": 1.25}, + "4,10\n\n\n2,0", + {"w": 1.25}, + "4,11\n\n\n2,0", + {"w": 1.25}, + "4,12\n\n\n2,0", + {"w": 1.25}, + "4,13\n\n\n2,0" + ], + [ + {"y": 0.5, "w": 1.5}, + "4,0\n\n\n2,1", + "4,1\n\n\n2,1", + {"w": 1.5}, + "4,2\n\n\n2,1", + {"c": "#cccccc", "w": 7}, + "4,6\n\n\n2,1", + {"c": "#aaaaaa", "w": 1.5}, + "4,11\n\n\n2,1", + "4,12\n\n\n2,1", + {"w": 1.5}, + "4,13\n\n\n2,1" + ] + ] + } +} \ No newline at end of file From 8356266e078cefeec7c1e4a8c1d59118ad5a0755 Mon Sep 17 00:00:00 2001 From: Raymond Dean <18014111+pcs3rd@users.noreply.github.com> Date: Sun, 16 Apr 2023 00:22:35 -0400 Subject: [PATCH 18/18] Add mini49 to keyboards (#381) * Add mini49 back * Update readme.md * Update keymap.c update vial keymap * Update keymap.c * Create rules.mk * Update readme.md * Update readme.md * Update readme.md * rename vial/ to via/ * Update readme.md * Update config.h Set bootmagic_lite key to top left * Update readme.md * Update keyboards/mini49/config.h Co-authored-by: Less/Rikki <86894501+lesshonor@users.noreply.github.com> * Update keyboards/mini49/keymaps/vial/keymap.c rename `LAYOUT_mini49` to `LAYOUT` Co-authored-by: Less/Rikki <86894501+lesshonor@users.noreply.github.com> * Change code per previous suggestions * remove mini49/config.h * Tonight's last commit. * I lied. * migrate layout to info.json * Update rules.mk * Update readme.md * remove mini49.h and remove reference from info.json * Update readme.md update photo * revert pico-sdk to 07edde8 --------- Co-authored-by: Less/Rikki <86894501+lesshonor@users.noreply.github.com> --- keyboards/mini49/info.json | 81 +++++++++++++++++++++++ keyboards/mini49/keymaps/default/keymap.c | 11 +++ keyboards/mini49/keymaps/default/rules.mk | 1 + keyboards/mini49/keymaps/vial/config.h | 12 ++++ keyboards/mini49/keymaps/vial/keymap.c | 14 ++++ keyboards/mini49/keymaps/vial/rules.mk | 3 + keyboards/mini49/keymaps/vial/vial.json | 19 ++++++ keyboards/mini49/readme.md | 29 ++++++++ keyboards/mini49/rules.mk | 1 + 9 files changed, 171 insertions(+) create mode 100644 keyboards/mini49/info.json create mode 100644 keyboards/mini49/keymaps/default/keymap.c create mode 100644 keyboards/mini49/keymaps/default/rules.mk create mode 100644 keyboards/mini49/keymaps/vial/config.h create mode 100644 keyboards/mini49/keymaps/vial/keymap.c create mode 100644 keyboards/mini49/keymaps/vial/rules.mk create mode 100644 keyboards/mini49/keymaps/vial/vial.json create mode 100644 keyboards/mini49/readme.md create mode 100644 keyboards/mini49/rules.mk diff --git a/keyboards/mini49/info.json b/keyboards/mini49/info.json new file mode 100644 index 0000000000..156722ec10 --- /dev/null +++ b/keyboards/mini49/info.json @@ -0,0 +1,81 @@ +{ + "manufacturer": "HSS", + "keyboard_name": "mini49", + "maintainer": "pcs3rd", + "bootloader": "rp2040", + "diode_direction": "COL2ROW", + "features": { + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true + }, + "matrix_pins": { + "cols": ["GP0", "GP1", "GP2", "GP3", "GP4", "GP5", "GP6", "GP7", "GP8", "GP9"], + "rows": ["GP10", "GP11", "GP12", "GP13", "GP14"] + }, + "processor": "RP2040", + "url": "", + "usb": { + "device_version": "1.0.0", + "pid": "0x0000", + "vid": "0xBEEF" + }, + "layouts": { + "LAYOUT": { + "layout": [ + { "label": "K00", "matrix": [0, 0], "w": 1, "x": 0, "y": 0 }, + { "label": "K01", "matrix": [0, 1], "w": 1, "x": 1, "y": 0 }, + { "label": "K02", "matrix": [0, 2], "w": 1, "x": 2, "y": 0 }, + { "label": "K03", "matrix": [0, 3], "w": 1, "x": 3, "y": 0 }, + { "label": "K04", "matrix": [0, 4], "w": 1, "x": 4, "y": 0 }, + { "label": "K05", "matrix": [0, 5], "w": 1, "x": 5, "y": 0 }, + { "label": "K06", "matrix": [0, 6], "w": 1, "x": 6, "y": 0 }, + { "label": "K07", "matrix": [0, 7], "w": 1, "x": 7, "y": 0 }, + { "label": "K08", "matrix": [0, 8], "w": 1, "x": 8, "y": 0 }, + { "label": "K09", "matrix": [0, 9], "w": 1, "x": 9, "y": 0 }, + { "label": "K10", "matrix": [1, 0], "w": 1, "x": 0, "y": 1 }, + { "label": "K11", "matrix": [1, 1], "w": 1, "x": 1, "y": 1 }, + { "label": "K12", "matrix": [1, 2], "w": 1, "x": 2, "y": 1 }, + { "label": "K13", "matrix": [1, 3], "w": 1, "x": 3, "y": 1 }, + { "label": "K14", "matrix": [1, 4], "w": 1, "x": 4, "y": 1 }, + { "label": "K15", "matrix": [1, 5], "w": 1, "x": 5, "y": 1 }, + { "label": "K16", "matrix": [1, 6], "w": 1, "x": 6, "y": 1 }, + { "label": "K17", "matrix": [1, 7], "w": 1, "x": 7, "y": 1 }, + { "label": "K18", "matrix": [1, 8], "w": 1, "x": 8, "y": 1 }, + { "label": "K19", "matrix": [1, 9], "w": 1, "x": 9, "y": 1 }, + { "label": "K20", "matrix": [2, 0], "w": 1, "x": 0, "y": 2 }, + { "label": "K21", "matrix": [2, 1], "w": 1, "x": 1, "y": 2 }, + { "label": "K22", "matrix": [2, 2], "w": 1, "x": 2, "y": 2 }, + { "label": "K23", "matrix": [2, 3], "w": 1, "x": 3, "y": 2 }, + { "label": "K24", "matrix": [2, 4], "w": 1, "x": 4, "y": 2 }, + { "label": "K25", "matrix": [2, 5], "w": 1, "x": 5, "y": 2 }, + { "label": "K26", "matrix": [2, 6], "w": 1, "x": 6, "y": 2 }, + { "label": "K27", "matrix": [2, 7], "w": 1, "x": 7, "y": 2 }, + { "label": "K28", "matrix": [2, 8], "w": 1, "x": 8, "y": 2 }, + { "label": "K29", "matrix": [2, 9], "w": 1, "x": 9, "y": 2 }, + { "label": "K30", "matrix": [3, 0], "w": 1, "x": 0, "y": 3 }, + { "label": "K31", "matrix": [3, 1], "w": 1, "x": 1, "y": 3 }, + { "label": "K32", "matrix": [3, 2], "w": 1, "x": 2, "y": 3 }, + { "label": "K33", "matrix": [3, 3], "w": 1, "x": 3, "y": 3 }, + { "label": "K34", "matrix": [3, 4], "w": 1, "x": 4, "y": 3 }, + { "label": "K35", "matrix": [3, 5], "w": 1, "x": 5, "y": 3 }, + { "label": "K36", "matrix": [3, 6], "w": 1, "x": 6, "y": 3 }, + { "label": "K37", "matrix": [3, 7], "w": 1, "x": 7, "y": 3 }, + { "label": "K38", "matrix": [3, 8], "w": 1, "x": 8, "y": 3 }, + { "label": "K39", "matrix": [3, 9], "w": 1, "x": 9, "y": 3 }, + { "label": "K40", "matrix": [4, 0], "w": 1, "x": 0, "y": 4 }, + { "label": "K41", "matrix": [4, 1], "w": 1, "x": 1, "y": 4 }, + { "label": "K42", "matrix": [4, 2], "w": 1, "x": 2, "y": 4 }, + { "label": "K43", "matrix": [4, 3], "w": 1, "x": 3, "y": 4 }, + { "label": "K45", "matrix": [4, 5], "w": 1, "x": 4, "y": 4 }, + { "label": "K46", "matrix": [4, 6], "w": 1, "x": 5, "y": 4 }, + { "label": "K47", "matrix": [4, 7], "w": 1, "x": 6, "y": 4 }, + { "label": "K48", "matrix": [4, 8], "w": 1, "x": 7, "y": 4 }, + { "label": "K49", "matrix": [4, 9], "w": 1, "x": 8, "y": 4 } + ] + } + } + +} diff --git a/keyboards/mini49/keymaps/default/keymap.c b/keyboards/mini49/keymaps/default/keymap.c new file mode 100644 index 0000000000..69a9e21a35 --- /dev/null +++ b/keyboards/mini49/keymaps/default/keymap.c @@ -0,0 +1,11 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_ESC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BSPC, + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + KC_LCTL, KC_LALT, KC_LGUI, KC_LSFT, KC_SPC, KC_NO, KC_NO, KC_NO, KC_NO + ) +}; diff --git a/keyboards/mini49/keymaps/default/rules.mk b/keyboards/mini49/keymaps/default/rules.mk new file mode 100644 index 0000000000..7e4fd5d349 --- /dev/null +++ b/keyboards/mini49/keymaps/default/rules.mk @@ -0,0 +1 @@ +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite diff --git a/keyboards/mini49/keymaps/vial/config.h b/keyboards/mini49/keymaps/vial/config.h new file mode 100644 index 0000000000..2ccfe974e6 --- /dev/null +++ b/keyboards/mini49/keymaps/vial/config.h @@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#pragma once + +#define VIAL_KEYBOARD_UID {0x5C, 0x8A, 0x21, 0xB3, 0x82, 0x40, 0xF6, 0x11} + +#define VIAL_UNLOCK_COMBO_ROWS {0, 0} +#define VIAL_UNLOCK_COMBO_COLS {0, 9} + +#define DYNAMIC_KEYMAP_MACRO_COUNT 32 +#define DYNAMIC_KEYMAP_LAYER_COUNT 12 + diff --git a/keyboards/mini49/keymaps/vial/keymap.c b/keyboards/mini49/keymaps/vial/keymap.c new file mode 100644 index 0000000000..a412eeb784 --- /dev/null +++ b/keyboards/mini49/keymaps/vial/keymap.c @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_ESC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BSPC, + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + KC_LCTL, KC_LALT, KC_LGUI, KC_LSFT, KC_SPC, KC_NO, KC_NO, KC_NO, KC_NO + ) +}; + diff --git a/keyboards/mini49/keymaps/vial/rules.mk b/keyboards/mini49/keymaps/vial/rules.mk new file mode 100644 index 0000000000..7e2cda2ab0 --- /dev/null +++ b/keyboards/mini49/keymaps/vial/rules.mk @@ -0,0 +1,3 @@ +VIA_ENABLE = yes +VIAL_ENABLE = yes +MIDI_ENABLE = yes \ No newline at end of file diff --git a/keyboards/mini49/keymaps/vial/vial.json b/keyboards/mini49/keymaps/vial/vial.json new file mode 100644 index 0000000000..40cffe2c13 --- /dev/null +++ b/keyboards/mini49/keymaps/vial/vial.json @@ -0,0 +1,19 @@ +{ + "name": "mini49", + "vendorId": "0xBEEF", + "productId": "0x0000", + "lighting": "none", + "matrix": {"rows": 5, "cols": 10}, + "layouts": { + "keymap": [ + ["0,0","0,1","0,2","0,3","0,4","0,5","0,6","0,7","0,8","0,9"], + ["1,0","1,1","1,2","1,3","1,4","1,5","1,6","1,7","1,8","1,9"], + ["2,0","2,1","2,2","2,3","2,4","2,5","2,6","2,7","2,8","2,9"], + ["3,0","3,1","3,2","3,3","3,4","3,5","3,6","3,7","3,8","3,9"], + ["4,0","4,1","4,2","4,3",{"w": 2 }, "4,5","4,6","4,7","4,8", "4,9"] + ] + }, + "vial": { + "midi": "advanced" + } +} \ No newline at end of file diff --git a/keyboards/mini49/readme.md b/keyboards/mini49/readme.md new file mode 100644 index 0000000000..a68a5ee0fe --- /dev/null +++ b/keyboards/mini49/readme.md @@ -0,0 +1,29 @@ +# mini49 + + +![mini49](https://cloud.stickpile.net/apps/files_sharing/publicpreview/YkYfcoeLRmHpfy2?file=/&fileId=225288&x=1080&y=1920&a=true) + +A sub-60% ortholinear keyboard powered by vial-qmk. + +* Keyboard Maintainer: [Raymond Dean][def] +* Hardware Supported: *RP2040* + +Make example for this keyboard (after setting up your build environment): + + make mini49:vial + +Flashing example for this keyboard: + + make mini49:vial:flash + +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). + +## Bootloader + +Enter the bootloader in 3 ways: + +- Bootmagic reset: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard. Bootmagic is not enabled in the vial layout. +- Physical reset: Hold the BOOT button down while pressing the RESET button. +- Keycode in layout: Press the key mapped to QK_BOOT if it is available + +[def]: https://github.com/pcs3rd diff --git a/keyboards/mini49/rules.mk b/keyboards/mini49/rules.mk new file mode 100644 index 0000000000..6e7633bfe0 --- /dev/null +++ b/keyboards/mini49/rules.mk @@ -0,0 +1 @@ +# This file intentionally left blank