diff options
author | lalalademaxiya1 <66767061+lalalademaxiya1@users.noreply.github.com> | 2022-12-09 00:43:28 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-09 03:43:28 +1100 |
commit | 1215fc2a782100bfd6577e1826f8c7e46be137ca (patch) | |
tree | e8c80e0d7c1234c0e44c38daf48a9a3c456dd441 /keyboards/keychron/q2 | |
parent | 6e6039995beebcaf0126d90db344728f0b8de827 (diff) |
Update Q1 and Q2 for keychron (#18713)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: jpe230 <pablin.123.ra@gmail.com>
Diffstat (limited to 'keyboards/keychron/q2')
78 files changed, 1445 insertions, 1708 deletions
diff --git a/keyboards/keychron/q2/rev_0110/rev_0110.c b/keyboards/keychron/q2/ansi/ansi.c index 125872602e..5c5acb3fd8 100644 --- a/keyboards/keychron/q2/rev_0110/rev_0110.c +++ b/keyboards/keychron/q2/ansi/ansi.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "quantum.h" +#include "ansi.h" #ifdef RGB_MATRIX_ENABLE const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { @@ -97,27 +97,33 @@ const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { {1, F_16, D_16, E_16}, }; +#define __ NO_LED + led_config_t g_led_config = { - { - { 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, 65, 42, 43 }, - { 44, NO_LED, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, NO_LED, 55, 56 }, - { 57, 58, 59, NO_LED, NO_LED, NO_LED, 60, NO_LED, NO_LED, NO_LED, 61, 62, 63, 64, 66 }, + { + // 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, 65, 42, 43 }, + { 44, __, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, __, 55, 56 }, + { 57, 58, 59, __, __, __, 60, __, __, __, 61, 62, 63, 64, 66 } }, { - {0, 0}, {15, 0}, {30, 0}, {45, 0}, {60, 0}, {75, 0}, {90, 0}, {105, 0}, {120, 0}, {135, 0}, {150, 0}, {165, 0}, {180, 0}, {195, 0}, {224, 0}, - {0,16}, {15,16}, {30,16}, {45,16}, {60,16}, {75,16}, {90,16}, {105,16}, {120,16}, {135,16}, {150,16}, {165,16}, {180,16}, {195,16}, {224,16}, - {0,32}, {15,32}, {30,32}, {45,32}, {60,32}, {75,32}, {90,32}, {105,32}, {120,32}, {135,32}, {150,32}, {165,32}, {195,32}, {224,32}, - {0,48}, {30,48}, {45,48}, {60,48}, {75,48}, {90,48}, {105,48}, {120,48}, {135,48}, {150,48}, {165,48}, {180,48}, {210,48}, - {0,64}, {15,64}, {30,64}, {90,64}, {150,64}, {165,64}, {180,64}, {195,64}, {210,64}, {224,64}, + // LED Index to Physical Position + {0,0}, {15,0}, {29,0}, {44,0}, {59,0}, {73,0}, {88,0}, {103,0}, {118,0}, {132,0}, {147,0}, {162,0}, {176,0}, {198,0}, {224,0}, + {4,15}, {22,15}, {37,15}, {51,15}, {66,15}, {81,15}, {95,15}, {110,15}, {125,15}, {140,15}, {154,15}, {169,15}, {184,15}, {202,15}, {224,15}, + {6,30}, {26,30}, {40,30}, {55,30}, {70,30}, {84,30}, {99,30}, {114,30}, {129,30}, {143,30}, {158,30}, {173,30}, {196,30}, {224,30}, + {9,45}, {33,45}, {48,45}, {62,45}, {77,45}, {92,45}, {106,45}, {121,45}, {136,45}, {151,45}, {165,45}, {185,45}, {209,49}, + {2,60}, {20,60}, {39,60}, {94,60}, {147,60}, {162,60}, {176,60}, {195,64}, {209,64}, {224,64} }, { - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + // RGB LED Index to Flag + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, + 1, 1, 1, 4, 1, 1, 1, 1, 1, 1 } }; -#endif + +#endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/q2/ansi/ansi.h b/keyboards/keychron/q2/ansi/ansi.h new file mode 100644 index 0000000000..db52563dc4 --- /dev/null +++ b/keyboards/keychron/q2/ansi/ansi.h @@ -0,0 +1,19 @@ +/* Copyright 2021 @ 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 <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#include "quantum.h" diff --git a/keyboards/keychron/q2/rev_0110/config.h b/keyboards/keychron/q2/ansi/config.h index 6c39432b74..6c39432b74 100644 --- a/keyboards/keychron/q2/rev_0110/config.h +++ b/keyboards/keychron/q2/ansi/config.h diff --git a/keyboards/keychron/q2/ansi/info.json b/keyboards/keychron/q2/ansi/info.json new file mode 100644 index 0000000000..5992d5a69d --- /dev/null +++ b/keyboards/keychron/q2/ansi/info.json @@ -0,0 +1,88 @@ +{ + "keyboard_name": "Q2", + "manufacturer": "Keychron", + "url": "https://github.com/Keychron", + "maintainer": "lalalademaxiya1", + "usb": { + "vid": "0x3434", + "pid": "0x0110", + "device_version": "1.0.0" + }, + "layouts": { + "LAYOUT_ansi_67": { + "layout": [ + {"matrix":[0, 0], "x":0, "y":0.25}, + {"matrix":[0, 1], "x":1, "y":0.25}, + {"matrix":[0, 2], "x":2, "y":0.25}, + {"matrix":[0, 3], "x":3, "y":0.25}, + {"matrix":[0, 4], "x":4, "y":0.25}, + {"matrix":[0, 5], "x":5, "y":0.25}, + {"matrix":[0, 6], "x":6, "y":0.25}, + {"matrix":[0, 7], "x":7, "y":0.25}, + {"matrix":[0, 8], "x":8, "y":0.25}, + {"matrix":[0, 9], "x":9, "y":0.25}, + {"matrix":[0,10], "x":10, "y":0.25}, + {"matrix":[0,11], "x":11, "y":0.25}, + {"matrix":[0,12], "x":12, "y":0.25}, + {"matrix":[0,13], "x":13, "y":0.25, "w":2}, + {"matrix":[0,14], "x":15.25, "y":0}, + + {"matrix":[1, 0], "x":0, "y":1.25, "w":1.5}, + {"matrix":[1, 1], "x":1.5, "y":1.25}, + {"matrix":[1, 2], "x":2.5, "y":1.25}, + {"matrix":[1, 3], "x":3.5, "y":1.25}, + {"matrix":[1, 4], "x":4.5, "y":1.25}, + {"matrix":[1, 5], "x":5.5, "y":1.25}, + {"matrix":[1, 6], "x":6.5, "y":1.25}, + {"matrix":[1, 7], "x":7.5, "y":1.25}, + {"matrix":[1, 8], "x":8.5, "y":1.25}, + {"matrix":[1, 9], "x":9.5, "y":1.25}, + {"matrix":[1,10], "x":10.5, "y":1.25}, + {"matrix":[1,11], "x":11.5, "y":1.25}, + {"matrix":[1,12], "x":12.5, "y":1.25}, + {"matrix":[1,13], "x":13.5, "y":1.25, "w":1.5}, + {"matrix":[1,14], "x":15.25, "y":1.25}, + + {"matrix":[2, 0], "x":0, "y":2.25, "w":1.75}, + {"matrix":[2, 1], "x":1.75, "y":2.25}, + {"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, 5], "x":5.75, "y":2.25}, + {"matrix":[2, 6], "x":6.75, "y":2.25}, + {"matrix":[2, 7], "x":7.75, "y":2.25}, + {"matrix":[2, 8], "x":8.75, "y":2.25}, + {"matrix":[2, 9], "x":9.75, "y":2.25}, + {"matrix":[2,10], "x":10.75, "y":2.25}, + {"matrix":[2,11], "x":11.75, "y":2.25}, + {"matrix":[2,13], "x":12.75, "y":2.25, "w":2.25}, + {"matrix":[2,14], "x":15.25, "y":2.25}, + + {"matrix":[3, 0], "x":0, "y":3.25, "w":2.25}, + {"matrix":[3, 2], "x":2.25, "y":3.25}, + {"matrix":[3, 3], "x":3.25, "y":3.25}, + {"matrix":[3, 4], "x":4.25, "y":3.25}, + {"matrix":[3, 5], "x":5.25, "y":3.25}, + {"matrix":[3, 6], "x":6.25, "y":3.25}, + {"matrix":[3, 7], "x":7.25, "y":3.25}, + {"matrix":[3, 8], "x":8.25, "y":3.25}, + {"matrix":[3, 9], "x":9.25, "y":3.25}, + {"matrix":[3,10], "x":10.25, "y":3.25}, + {"matrix":[3,11], "x":11.25, "y":3.25}, + {"matrix":[3,13], "x":12.25, "y":3.25, "w":1.75}, + {"matrix":[3,14], "x":14.25, "y":3.5}, + + {"matrix":[4, 0], "x":0, "y":4.25, "w":1.25}, + {"matrix":[4, 1], "x":1.25, "y":4.25, "w":1.25}, + {"matrix":[4, 2], "x":2.5, "y":4.25, "w":1.25}, + {"matrix":[4, 6], "x":3.75, "y":4.25, "w":6.25}, + {"matrix":[4,10], "x":10, "y":4.25}, + {"matrix":[4,11], "x":11, "y":4.25}, + {"matrix":[4,12], "x":12, "y":4.25}, + {"matrix":[4,13], "x":13.25, "y":4.5}, + {"matrix":[2,12], "x":14.25, "y":4.5}, + {"matrix":[4,14], "x":15.25, "y":4.5} + ] + } + } +} diff --git a/keyboards/keychron/q2/ansi/keymaps/default/keymap.c b/keyboards/keychron/q2/ansi/keymaps/default/keymap.c new file mode 100644 index 0000000000..ea386157bc --- /dev/null +++ b/keyboards/keychron/q2/ansi/keymaps/default/keymap.c @@ -0,0 +1,65 @@ +/* Copyright 2021 @ 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 <http://www.gnu.org/licenses/>. + */ + +#include QMK_KEYBOARD_H + +enum layers{ + MAC_BASE, + WIN_BASE, + _FN1, + _FN2, + _FN3 +}; + +#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_67( + 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_INS, + 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_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, KC_SPC, KC_RCMD, MO(_FN1), MO(_FN3), KC_LEFT, KC_DOWN, KC_RGHT), + + [WIN_BASE] = LAYOUT_ansi_67( + 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_INS, + 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_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, KC_SPC, KC_RALT, MO(_FN2), MO(_FN3), KC_LEFT, KC_DOWN, KC_RGHT), + + [_FN1] = LAYOUT_ansi_67( + KC_GRV, KC_BRID, KC_BRIU, _______, _______, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, + RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_RMOD,RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [_FN2] = LAYOUT_ansi_67( + KC_GRV, 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_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_RMOD,RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [_FN3] = LAYOUT_ansi_67( + KC_TILD, 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_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_RMOD,RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) +}; diff --git a/keyboards/keychron/q2/ansi/keymaps/keychron/keymap.c b/keyboards/keychron/q2/ansi/keymaps/keychron/keymap.c new file mode 100644 index 0000000000..5581f93406 --- /dev/null +++ b/keyboards/keychron/q2/ansi/keymaps/keychron/keymap.c @@ -0,0 +1,71 @@ +/* Copyright 2021 @ 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 <http://www.gnu.org/licenses/>. + */ + +#include QMK_KEYBOARD_H +#include "keychron_common.h" + +enum layers{ + MAC_BASE, + WIN_BASE, + _FN1, + _FN2, + _FN3 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [MAC_BASE] = LAYOUT_ansi_67( + 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_INS, + 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_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_LOPTN, KC_LCMMD, KC_SPC, KC_RCMMD, MO(_FN1), MO(_FN3), KC_LEFT, KC_DOWN, KC_RGHT), + + [WIN_BASE] = LAYOUT_ansi_67( + 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_INS, + 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_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, KC_SPC, KC_RALT, MO(_FN2), MO(_FN3), KC_LEFT, KC_DOWN, KC_RGHT), + + [_FN1] = LAYOUT_ansi_67( + KC_GRV, KC_BRID, KC_BRIU, KC_MCTL, KC_LPAD, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, + RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_RMOD, RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [_FN2] = LAYOUT_ansi_67( + KC_GRV, 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_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_RMOD, RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [_FN3] = LAYOUT_ansi_67( + KC_TILD, 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_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_RMOD, RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) +}; + +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/q2/ansi/keymaps/keychron/rules.mk b/keyboards/keychron/q2/ansi/keymaps/keychron/rules.mk new file mode 100644 index 0000000000..495e8907b4 --- /dev/null +++ b/keyboards/keychron/q2/ansi/keymaps/keychron/rules.mk @@ -0,0 +1,4 @@ +VIA_ENABLE = yes + +VPATH += keyboards/keychron/common +SRC += keychron_common.c diff --git a/keyboards/keychron/q2/rev_0110/keymaps/ladduro/config.h b/keyboards/keychron/q2/ansi/keymaps/ladduro/config.h index a8ad37d003..a8ad37d003 100644 --- a/keyboards/keychron/q2/rev_0110/keymaps/ladduro/config.h +++ b/keyboards/keychron/q2/ansi/keymaps/ladduro/config.h diff --git a/keyboards/keychron/q2/rev_0110/keymaps/ladduro/keymap.c b/keyboards/keychron/q2/ansi/keymaps/ladduro/keymap.c index cc83640b39..cc83640b39 100644 --- a/keyboards/keychron/q2/rev_0110/keymaps/ladduro/keymap.c +++ b/keyboards/keychron/q2/ansi/keymaps/ladduro/keymap.c diff --git a/keyboards/keychron/q2/rev_0110/keymaps/ladduro/keymap_user.h b/keyboards/keychron/q2/ansi/keymaps/ladduro/keymap_user.h index ded78ae1b8..ded78ae1b8 100644 --- a/keyboards/keychron/q2/rev_0110/keymaps/ladduro/keymap_user.h +++ b/keyboards/keychron/q2/ansi/keymaps/ladduro/keymap_user.h diff --git a/keyboards/keychron/q2/rev_0110/keymaps/ladduro/readme.md b/keyboards/keychron/q2/ansi/keymaps/ladduro/readme.md index 42ca81a1a1..42ca81a1a1 100644 --- a/keyboards/keychron/q2/rev_0110/keymaps/ladduro/readme.md +++ b/keyboards/keychron/q2/ansi/keymaps/ladduro/readme.md diff --git a/keyboards/keychron/q2/rev_0110/keymaps/ladduro/rgb_matrix_user.c b/keyboards/keychron/q2/ansi/keymaps/ladduro/rgb_matrix_user.c index 604f54a705..604f54a705 100644 --- a/keyboards/keychron/q2/rev_0110/keymaps/ladduro/rgb_matrix_user.c +++ b/keyboards/keychron/q2/ansi/keymaps/ladduro/rgb_matrix_user.c diff --git a/keyboards/keychron/q2/rev_0110/keymaps/ladduro/rgb_matrix_user.h b/keyboards/keychron/q2/ansi/keymaps/ladduro/rgb_matrix_user.h index 4d33f483ae..4d33f483ae 100644 --- a/keyboards/keychron/q2/rev_0110/keymaps/ladduro/rgb_matrix_user.h +++ b/keyboards/keychron/q2/ansi/keymaps/ladduro/rgb_matrix_user.h diff --git a/keyboards/keychron/q2/rev_0110/keymaps/ladduro/rules.mk b/keyboards/keychron/q2/ansi/keymaps/ladduro/rules.mk index c0ee640cd2..c0ee640cd2 100644 --- a/keyboards/keychron/q2/rev_0110/keymaps/ladduro/rules.mk +++ b/keyboards/keychron/q2/ansi/keymaps/ladduro/rules.mk diff --git a/keyboards/keychron/q2/ansi/keymaps/via/keymap.c b/keyboards/keychron/q2/ansi/keymaps/via/keymap.c new file mode 100644 index 0000000000..f1b6b66ff8 --- /dev/null +++ b/keyboards/keychron/q2/ansi/keymaps/via/keymap.c @@ -0,0 +1,72 @@ +/* Copyright 2021 @ 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 <http://www.gnu.org/licenses/>. + */ + +#include QMK_KEYBOARD_H + +enum layers{ + MAC_BASE, + WIN_BASE, + _FN1, + _FN2, + _FN3 +}; + +enum custom_keycodes { + KC_MISSION_CONTROL = USER00, + KC_LAUNCHPAD, + KC_TASK, + KC_FLXP +}; + +#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_67( + 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_INS, + 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_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, KC_SPC, KC_RCMD, MO(_FN1), MO(_FN3), KC_LEFT, KC_DOWN, KC_RGHT), + + [WIN_BASE] = LAYOUT_ansi_67( + 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_INS, + 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_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, KC_SPC, KC_RALT, MO(_FN2), MO(_FN3), KC_LEFT, KC_DOWN, KC_RGHT), + + [_FN1] = LAYOUT_ansi_67( + KC_GRV, KC_BRID, KC_BRIU, _______, _______, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, + RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_RMOD,RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [_FN2] = LAYOUT_ansi_67( + KC_GRV, 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_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_RMOD,RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [_FN3] = LAYOUT_ansi_67( + KC_TILD, 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_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_RMOD,RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) +}; diff --git a/keyboards/keychron/q2/ansi/keymaps/via/rules.mk b/keyboards/keychron/q2/ansi/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/keychron/q2/ansi/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/keychron/q2/rev_0110/readme.md b/keyboards/keychron/q2/ansi/readme.md index d3134cedb5..d3134cedb5 100644 --- a/keyboards/keychron/q2/rev_0110/readme.md +++ b/keyboards/keychron/q2/ansi/readme.md diff --git a/keyboards/keychron/q2/rev_0112/rules.mk b/keyboards/keychron/q2/ansi/rules.mk index 38d48f0b27..8da17d91b3 100644 --- a/keyboards/keychron/q2/rev_0112/rules.mk +++ b/keyboards/keychron/q2/ansi/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # change yes to no to disable # BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite -MOUSEKEY_ENABLE = no # Mouse keys +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 diff --git a/keyboards/keychron/q2/rev_0111/rev_0111.c b/keyboards/keychron/q2/ansi_encoder/ansi_encoder.c index 1bada84daa..c926a5bf75 100644 --- a/keyboards/keychron/q2/rev_0111/rev_0111.c +++ b/keyboards/keychron/q2/ansi_encoder/ansi_encoder.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "quantum.h" +#include "ansi_encoder.h" #ifdef RGB_MATRIX_ENABLE const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { @@ -97,41 +97,33 @@ const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { {1, F_16, D_16, E_16}, }; +#define __ NO_LED + led_config_t g_led_config = { - { - { 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, 65, 42, 43 }, - { 44, NO_LED, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, NO_LED, 55, 56 }, - { 57, 58, 59, NO_LED, NO_LED, NO_LED, 60, NO_LED, NO_LED, NO_LED, 61, 62, 63, 64, 66 }, + { + // 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, 65, 42, 43 }, + { 44, __, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, __, 55, 56 }, + { 57, 58, 59, __, __, __, 60, __, __, __, 61, 62, 63, 64, 66 } }, { - {0, 0}, {15, 0}, {30, 0}, {45, 0}, {60, 0}, {75, 0}, {90, 0}, {105, 0}, {120, 0}, {135, 0}, {150, 0}, {165, 0}, {180, 0}, {195, 0}, {224, 0}, - {0,16}, {15,16}, {30,16}, {45,16}, {60,16}, {75,16}, {90,16}, {105,16}, {120,16}, {135,16}, {150,16}, {165,16}, {180,16}, {195,16}, {224,16}, - {0,32}, {15,32}, {30,32}, {45,32}, {60,32}, {75,32}, {90,32}, {105,32}, {120,32}, {135,32}, {150,32}, {165,32}, {195,32}, {224,32}, - {0,48}, {30,48}, {45,48}, {60,48}, {75,48}, {90,48}, {105,48}, {120,48}, {135,48}, {150,48}, {165,48}, {180,48}, {210,48}, - {0,64}, {15,64}, {30,64}, {90,64}, {150,64}, {165,64}, {180,64}, {195,64}, {210,64}, {224,64}, + // LED Index to Physical Position + {0,0}, {15,0}, {29,0}, {44,0}, {59,0}, {73,0}, {88,0}, {103,0}, {118,0}, {132,0}, {147,0}, {162,0}, {176,0}, {198,0}, {224,0}, + {4,15}, {22,15}, {37,15}, {51,15}, {66,15}, {81,15}, {95,15}, {110,15}, {125,15}, {140,15}, {154,15}, {169,15}, {184,15}, {202,15}, {224,15}, + {6,30}, {26,30}, {40,30}, {55,30}, {70,30}, {84,30}, {99,30}, {114,30}, {129,30}, {143,30}, {158,30}, {173,30}, {196,30}, {224,30}, + {9,45}, {33,45}, {48,45}, {62,45}, {77,45}, {92,45}, {106,45}, {121,45}, {136,45}, {151,45}, {165,45}, {185,45}, {209,49}, + {2,60}, {20,60}, {39,60}, {94,60}, {147,60}, {162,60}, {176,60}, {195,64}, {209,64}, {224,64} }, { - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + // RGB LED Index to Flag + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, + 1, 1, 1, 4, 1, 1, 1, 1, 1, 1 } }; -#endif -#ifdef ENCODER_ENABLE -bool encoder_update_kb(uint8_t index, bool clockwise) { - if (!encoder_update_user(index, clockwise)) { return false; } - if (index == 0) { - if (clockwise) { - tap_code_delay(KC_VOLU, 10); - } else { - tap_code_delay(KC_VOLD, 10); - } - } - return true; -} -#endif +#endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/q2/ansi_encoder/ansi_encoder.h b/keyboards/keychron/q2/ansi_encoder/ansi_encoder.h new file mode 100644 index 0000000000..db52563dc4 --- /dev/null +++ b/keyboards/keychron/q2/ansi_encoder/ansi_encoder.h @@ -0,0 +1,19 @@ +/* Copyright 2021 @ 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 <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#include "quantum.h" diff --git a/keyboards/keychron/q2/rev_0111/config.h b/keyboards/keychron/q2/ansi_encoder/config.h index 8ef6c542f0..25e444933c 100644 --- a/keyboards/keychron/q2/rev_0111/config.h +++ b/keyboards/keychron/q2/ansi_encoder/config.h @@ -24,6 +24,5 @@ /* Encoder used pins */ #define ENCODERS_PAD_A { A10 } #define ENCODERS_PAD_B { B5 } - -/* Specifies the number of pulses the encoder registers between each detent */ #define ENCODER_RESOLUTION 4 +#define ENCODER_DEFAULT_POS 0x3 diff --git a/keyboards/keychron/q2/ansi_encoder/info.json b/keyboards/keychron/q2/ansi_encoder/info.json new file mode 100644 index 0000000000..67c4788067 --- /dev/null +++ b/keyboards/keychron/q2/ansi_encoder/info.json @@ -0,0 +1,88 @@ +{ + "keyboard_name": "Q2", + "manufacturer": "Keychron", + "url": "https://github.com/Keychron", + "maintainer": "lalalademaxiya1", + "usb": { + "vid": "0x3434", + "pid": "0x0111", + "device_version": "1.0.0" + }, + "layouts": { + "LAYOUT_ansi_67": { + "layout": [ + {"matrix":[0, 0], "x":0, "y":0.25}, + {"matrix":[0, 1], "x":1, "y":0.25}, + {"matrix":[0, 2], "x":2, "y":0.25}, + {"matrix":[0, 3], "x":3, "y":0.25}, + {"matrix":[0, 4], "x":4, "y":0.25}, + {"matrix":[0, 5], "x":5, "y":0.25}, + {"matrix":[0, 6], "x":6, "y":0.25}, + {"matrix":[0, 7], "x":7, "y":0.25}, + {"matrix":[0, 8], "x":8, "y":0.25}, + {"matrix":[0, 9], "x":9, "y":0.25}, + {"matrix":[0,10], "x":10, "y":0.25}, + {"matrix":[0,11], "x":11, "y":0.25}, + {"matrix":[0,12], "x":12, "y":0.25}, + {"matrix":[0,13], "x":13, "y":0.25, "w":2}, + {"matrix":[0,14], "x":15.25, "y":0}, + + {"matrix":[1, 0], "x":0, "y":1.25, "w":1.5}, + {"matrix":[1, 1], "x":1.5, "y":1.25}, + {"matrix":[1, 2], "x":2.5, "y":1.25}, + {"matrix":[1, 3], "x":3.5, "y":1.25}, + {"matrix":[1, 4], "x":4.5, "y":1.25}, + {"matrix":[1, 5], "x":5.5, "y":1.25}, + {"matrix":[1, 6], "x":6.5, "y":1.25}, + {"matrix":[1, 7], "x":7.5, "y":1.25}, + {"matrix":[1, 8], "x":8.5, "y":1.25}, + {"matrix":[1, 9], "x":9.5, "y":1.25}, + {"matrix":[1,10], "x":10.5, "y":1.25}, + {"matrix":[1,11], "x":11.5, "y":1.25}, + {"matrix":[1,12], "x":12.5, "y":1.25}, + {"matrix":[1,13], "x":13.5, "y":1.25, "w":1.5}, + {"matrix":[1,14], "x":15.25, "y":1.25}, + + {"matrix":[2, 0], "x":0, "y":2.25, "w":1.75}, + {"matrix":[2, 1], "x":1.75, "y":2.25}, + {"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, 5], "x":5.75, "y":2.25}, + {"matrix":[2, 6], "x":6.75, "y":2.25}, + {"matrix":[2, 7], "x":7.75, "y":2.25}, + {"matrix":[2, 8], "x":8.75, "y":2.25}, + {"matrix":[2, 9], "x":9.75, "y":2.25}, + {"matrix":[2,10], "x":10.75, "y":2.25}, + {"matrix":[2,11], "x":11.75, "y":2.25}, + {"matrix":[2,13], "x":12.75, "y":2.25, "w":2.25}, + {"matrix":[2,14], "x":15.25, "y":2.25}, + + {"matrix":[3, 0], "x":0, "y":3.25, "w":2.25}, + {"matrix":[3, 2], "x":2.25, "y":3.25}, + {"matrix":[3, 3], "x":3.25, "y":3.25}, + {"matrix":[3, 4], "x":4.25, "y":3.25}, + {"matrix":[3, 5], "x":5.25, "y":3.25}, + {"matrix":[3, 6], "x":6.25, "y":3.25}, + {"matrix":[3, 7], "x":7.25, "y":3.25}, + {"matrix":[3, 8], "x":8.25, "y":3.25}, + {"matrix":[3, 9], "x":9.25, "y":3.25}, + {"matrix":[3,10], "x":10.25, "y":3.25}, + {"matrix":[3,11], "x":11.25, "y":3.25}, + {"matrix":[3,13], "x":12.25, "y":3.25, "w":1.75}, + {"matrix":[3,14], "x":14.25, "y":3.5}, + + {"matrix":[4, 0], "x":0, "y":4.25, "w":1.25}, + {"matrix":[4, 1], "x":1.25, "y":4.25, "w":1.25}, + {"matrix":[4, 2], "x":2.5, "y":4.25, "w":1.25}, + {"matrix":[4, 6], "x":3.75, "y":4.25, "w":6.25}, + {"matrix":[4,10], "x":10, "y":4.25}, + {"matrix":[4,11], "x":11, "y":4.25}, + {"matrix":[4,12], "x":12, "y":4.25}, + {"matrix":[4,13], "x":13.25, "y":4.5}, + {"matrix":[2,12], "x":14.25, "y":4.5}, + {"matrix":[4,14], "x":15.25, "y":4.5} + ] + } + } +} diff --git a/keyboards/keychron/q2/ansi_encoder/keymaps/default/keymap.c b/keyboards/keychron/q2/ansi_encoder/keymaps/default/keymap.c new file mode 100644 index 0000000000..31ac33f1b7 --- /dev/null +++ b/keyboards/keychron/q2/ansi_encoder/keymaps/default/keymap.c @@ -0,0 +1,75 @@ +/* Copyright 2021 @ 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 <http://www.gnu.org/licenses/>. + */ + +#include QMK_KEYBOARD_H + +enum layers{ + MAC_BASE, + WIN_BASE, + _FN1, + _FN2, + _FN3 +}; + +#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_67( + 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_MUTE, + 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_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, KC_SPC, KC_RCMD, MO(_FN1), MO(_FN3), KC_LEFT, KC_DOWN, KC_RGHT), + + [WIN_BASE] = LAYOUT_ansi_67( + 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_MUTE, + 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_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, KC_SPC, KC_RALT, MO(_FN2), MO(_FN3), KC_LEFT, KC_DOWN, KC_RGHT), + + [_FN1] = LAYOUT_ansi_67( + KC_GRV, KC_BRID, KC_BRIU, _______, _______, 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, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [_FN2] = LAYOUT_ansi_67( + KC_GRV, 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, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [_FN3] = LAYOUT_ansi_67( + KC_TILD, 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_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_RMOD,RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [MAC_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [WIN_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [_FN1] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI) }, + [_FN2] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI) }, + [_FN3] = { ENCODER_CCW_CW(_______, _______) }, +}; +#endif diff --git a/keyboards/keychron/q2/rev_0111/keymaps/default/rules.mk b/keyboards/keychron/q2/ansi_encoder/keymaps/default/rules.mk index a40474b4d5..a40474b4d5 100644 --- a/keyboards/keychron/q2/rev_0111/keymaps/default/rules.mk +++ b/keyboards/keychron/q2/ansi_encoder/keymaps/default/rules.mk diff --git a/keyboards/keychron/q2/ansi_encoder/keymaps/keychron/keymap.c b/keyboards/keychron/q2/ansi_encoder/keymaps/keychron/keymap.c new file mode 100644 index 0000000000..f4c43ef1f7 --- /dev/null +++ b/keyboards/keychron/q2/ansi_encoder/keymaps/keychron/keymap.c @@ -0,0 +1,81 @@ +/* Copyright 2021 @ 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 <http://www.gnu.org/licenses/>. + */ + +#include QMK_KEYBOARD_H +#include "keychron_common.h" + +enum layers{ + MAC_BASE, + WIN_BASE, + _FN1, + _FN2, + _FN3 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [MAC_BASE] = LAYOUT_ansi_67( + 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_MUTE, + 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_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_LOPTN, KC_LCMMD, KC_SPC, KC_RCMMD, MO(_FN1), MO(_FN3), KC_LEFT, KC_DOWN, KC_RGHT), + + [WIN_BASE] = LAYOUT_ansi_67( + 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_MUTE, + 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_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, KC_SPC, KC_RALT, MO(_FN2), MO(_FN3), KC_LEFT, KC_DOWN, KC_RGHT), + + [_FN1] = LAYOUT_ansi_67( + KC_GRV, KC_BRID, KC_BRIU, KC_MCTL, KC_LPAD, 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, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [_FN2] = LAYOUT_ansi_67( + KC_GRV, 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, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [_FN3] = LAYOUT_ansi_67( + KC_TILD, 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_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_RMOD, RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [MAC_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [WIN_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [_FN1] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI) }, + [_FN2] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI) }, + [_FN3] = { ENCODER_CCW_CW(_______, _______) }, +}; +#endif + +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/q2/ansi_encoder/keymaps/keychron/rules.mk b/keyboards/keychron/q2/ansi_encoder/keymaps/keychron/rules.mk new file mode 100644 index 0000000000..9cf1a9b56c --- /dev/null +++ b/keyboards/keychron/q2/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/q2/ansi_encoder/keymaps/via/keymap.c b/keyboards/keychron/q2/ansi_encoder/keymaps/via/keymap.c new file mode 100644 index 0000000000..3f56548c70 --- /dev/null +++ b/keyboards/keychron/q2/ansi_encoder/keymaps/via/keymap.c @@ -0,0 +1,75 @@ +/* Copyright 2021 @ 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 <http://www.gnu.org/licenses/>. + */ + +#include QMK_KEYBOARD_H + +enum layers{ + MAC_BASE, + WIN_BASE, + _FN1, + _FN2, + _FN3 +}; + +#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_67( + 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_MUTE, + 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_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, KC_SPC, KC_RCMD, MO(_FN1), MO(_FN3), KC_LEFT, KC_DOWN, KC_RGHT), + + [WIN_BASE] = LAYOUT_ansi_67( + 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_MUTE, + 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_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, KC_SPC, KC_RALT, MO(_FN2), MO(_FN3), KC_LEFT, KC_DOWN, KC_RGHT), + + [_FN1] = LAYOUT_ansi_67( + KC_GRV, KC_BRID, KC_BRIU, _______, _______, 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, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [_FN2] = LAYOUT_ansi_67( + KC_GRV, 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, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [_FN3] = LAYOUT_ansi_67( + KC_TILD, 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_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_RMOD,RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [MAC_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [WIN_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [_FN1] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI) }, + [_FN2] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI) }, + [_FN3] = { ENCODER_CCW_CW(_______, _______) }, +}; +#endif diff --git a/keyboards/keychron/q2/rev_0111/keymaps/via/rules.mk b/keyboards/keychron/q2/ansi_encoder/keymaps/via/rules.mk index 4253f570f0..4253f570f0 100644 --- a/keyboards/keychron/q2/rev_0111/keymaps/via/rules.mk +++ b/keyboards/keychron/q2/ansi_encoder/keymaps/via/rules.mk diff --git a/keyboards/keychron/q2/rev_0111/readme.md b/keyboards/keychron/q2/ansi_encoder/readme.md index 2bb5d3bca8..2bb5d3bca8 100644 --- a/keyboards/keychron/q2/rev_0111/readme.md +++ b/keyboards/keychron/q2/ansi_encoder/readme.md diff --git a/keyboards/keychron/q2/rev_0113/rules.mk b/keyboards/keychron/q2/ansi_encoder/rules.mk index 9332d29432..8631891e0d 100644 --- a/keyboards/keychron/q2/rev_0113/rules.mk +++ b/keyboards/keychron/q2/ansi_encoder/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # change yes to no to disable # BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite -MOUSEKEY_ENABLE = no # Mouse keys +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 diff --git a/keyboards/keychron/q2/config.h b/keyboards/keychron/q2/config.h index 5961b62929..210ecb1201 100644 --- a/keyboards/keychron/q2/config.h +++ b/keyboards/keychron/q2/config.h @@ -46,18 +46,12 @@ /* Disable DIP switch in matrix data */ #define MATRIX_MASKED -/* NKRO */ -#define FORCE_NKRO - /* turn off effects when suspended */ #define RGB_DISABLE_WHEN_USB_SUSPENDED /* Use 5 dynamic keymap layers */ #define DYNAMIC_KEYMAP_LAYER_COUNT 5 -/* We have 2KB EEPROM size on STM32L432 */ -#define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 2047 - /* EEPROM Driver Configuration */ #define WEAR_LEVELING_LOGICAL_SIZE 2048 #define WEAR_LEVELING_BACKING_SIZE (WEAR_LEVELING_LOGICAL_SIZE * 2) @@ -74,7 +68,7 @@ // #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_BAND_SPIRAL_VAL #define ENABLE_RGB_MATRIX_CYCLE_ALL #define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT #define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN @@ -86,12 +80,12 @@ #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_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_RAIN // #define ENABLE_RGB_MATRIX_PIXEL_FLOW // #define ENABLE_RGB_MATRIX_PIXEL_FRACTAL // enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined @@ -99,14 +93,14 @@ #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 +// #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_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_MULTISPLASH #define ENABLE_RGB_MATRIX_SOLID_SPLASH #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH diff --git a/keyboards/keychron/q2/rev_0112/config.h b/keyboards/keychron/q2/iso/config.h index 35a86d5839..35a86d5839 100644 --- a/keyboards/keychron/q2/rev_0112/config.h +++ b/keyboards/keychron/q2/iso/config.h diff --git a/keyboards/keychron/q2/iso/info.json b/keyboards/keychron/q2/iso/info.json new file mode 100644 index 0000000000..104b97cd23 --- /dev/null +++ b/keyboards/keychron/q2/iso/info.json @@ -0,0 +1,89 @@ +{ + "keyboard_name": "Q2", + "manufacturer": "Keychron", + "url": "https://github.com/Keychron", + "maintainer": "lalalademaxiya1", + "usb": { + "vid": "0x3434", + "pid": "0x0112", + "device_version": "1.0.0" + }, + "layouts": { + "LAYOUT_iso_68": { + "layout": [ + {"matrix":[0, 0], "x":0, "y":0.25}, + {"matrix":[0, 1], "x":1, "y":0.25}, + {"matrix":[0, 2], "x":2, "y":0.25}, + {"matrix":[0, 3], "x":3, "y":0.25}, + {"matrix":[0, 4], "x":4, "y":0.25}, + {"matrix":[0, 5], "x":5, "y":0.25}, + {"matrix":[0, 6], "x":6, "y":0.25}, + {"matrix":[0, 7], "x":7, "y":0.25}, + {"matrix":[0, 8], "x":8, "y":0.25}, + {"matrix":[0, 9], "x":9, "y":0.25}, + {"matrix":[0,10], "x":10, "y":0.25}, + {"matrix":[0,11], "x":11, "y":0.25}, + {"matrix":[0,12], "x":12, "y":0.25}, + {"matrix":[0,13], "x":13, "y":0.25, "w":2}, + {"matrix":[0,14], "x":15.25, "y":0}, + + {"matrix":[1, 0], "x":0, "y":1.25, "w":1.5}, + {"matrix":[1, 1], "x":1.5, "y":1.25}, + {"matrix":[1, 2], "x":2.5, "y":1.25}, + {"matrix":[1, 3], "x":3.5, "y":1.25}, + {"matrix":[1, 4], "x":4.5, "y":1.25}, + {"matrix":[1, 5], "x":5.5, "y":1.25}, + {"matrix":[1, 6], "x":6.5, "y":1.25}, + {"matrix":[1, 7], "x":7.5, "y":1.25}, + {"matrix":[1, 8], "x":8.5, "y":1.25}, + {"matrix":[1, 9], "x":9.5, "y":1.25}, + {"matrix":[1,10], "x":10.5, "y":1.25}, + {"matrix":[1,11], "x":11.5, "y":1.25}, + {"matrix":[1,12], "x":12.5, "y":1.25}, + {"matrix":[1,14], "x":15.25, "y":1.25}, + + {"matrix":[2, 0], "x":0, "y":2.25, "w":1.75}, + {"matrix":[2, 1], "x":1.75, "y":2.25}, + {"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, 5], "x":5.75, "y":2.25}, + {"matrix":[2, 6], "x":6.75, "y":2.25}, + {"matrix":[2, 7], "x":7.75, "y":2.25}, + {"matrix":[2, 8], "x":8.75, "y":2.25}, + {"matrix":[2, 9], "x":9.75, "y":2.25}, + {"matrix":[2,10], "x":10.75, "y":2.25}, + {"matrix":[2,11], "x":11.75, "y":2.25}, + {"matrix":[2,13], "x":12.75, "y":2.25}, + {"matrix":[1,13], "x":13.75, "y":1.25, "w":1.25, "h":2}, + {"matrix":[2,14], "x":15.25, "y":2.25}, + + {"matrix":[3, 0], "x":0, "y":3.25, "w":1.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":[3, 4], "x":4.25, "y":3.25}, + {"matrix":[3, 5], "x":5.25, "y":3.25}, + {"matrix":[3, 6], "x":6.25, "y":3.25}, + {"matrix":[3, 7], "x":7.25, "y":3.25}, + {"matrix":[3, 8], "x":8.25, "y":3.25}, + {"matrix":[3, 9], "x":9.25, "y":3.25}, + {"matrix":[3,10], "x":10.25, "y":3.25}, + {"matrix":[3,11], "x":11.25, "y":3.25}, + {"matrix":[3,13], "x":12.25, "y":3.25, "w":1.75}, + {"matrix":[3,14], "x":14.25, "y":3.5}, + + {"matrix":[4, 0], "x":0, "y":4.25, "w":1.25}, + {"matrix":[4, 1], "x":1.25, "y":4.25, "w":1.25}, + {"matrix":[4, 2], "x":2.5, "y":4.25, "w":1.25}, + {"matrix":[4, 6], "x":3.75, "y":4.25, "w":6.25}, + {"matrix":[4,10], "x":10, "y":4.25}, + {"matrix":[4,11], "x":11, "y":4.25}, + {"matrix":[4,12], "x":12, "y":4.25}, + {"matrix":[4,13], "x":13.25, "y":4.5}, + {"matrix":[2,12], "x":14.25, "y":4.5}, + {"matrix":[4,14], "x":15.25, "y":4.5} + ] + } + } +} diff --git a/keyboards/keychron/q2/rev_0112/rev_0112.c b/keyboards/keychron/q2/iso/iso.c index cf2bb34857..7f8d388b0e 100644 --- a/keyboards/keychron/q2/rev_0112/rev_0112.c +++ b/keyboards/keychron/q2/iso/iso.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "quantum.h" +#include "iso.h" #ifdef RGB_MATRIX_ENABLE const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { @@ -98,27 +98,33 @@ const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { {1, F_16, D_16, E_16} }; +#define __ NO_LED + led_config_t g_led_config = { - { - { 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, 42, 28 }, - { 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 66, 41, 43 }, - { 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, NO_LED, 56, 57 }, - { 58, 59, 60, NO_LED, NO_LED, NO_LED, 61, NO_LED, NO_LED, NO_LED, 62, 63, 64, 65, 67 } + { + // 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, 42, 28 }, + { 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 66, 41, 43 }, + { 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, __, 56, 57 }, + { 58, 59, 60, __, __, __, 61, __, __, __, 62, 63, 64, 65, 67 } }, { - {0, 0}, {15, 0}, {30, 0}, {45, 0}, {60, 0}, {75, 0}, {90, 0}, {105, 0}, {120, 0}, {135, 0}, {150, 0}, {165, 0}, {180, 0}, {195, 0}, {224, 0}, - {0,16}, {15,16}, {30,16}, {45,16}, {60,16}, {75,16}, {90,16}, {105,16}, {120,16}, {135,16}, {150,16}, {165,16}, {180,16}, {224,16}, - {0,32}, {15,32}, {30,32}, {45,32}, {60,32}, {75,32}, {90,32}, {105,32}, {120,32}, {135,32}, {150,32}, {165,32}, {180,32}, {195,16}, {224,32}, - {0,48}, {15,48}, {30,48}, {45,48}, {60,48}, {75,48}, {90,48}, {105,48}, {120,48}, {135,48}, {150,48}, {165,48}, {180,48}, {210,48}, - {0,64}, {15,64}, {30,64}, {90,64}, {150,64}, {165,64}, {180,64}, {195,64}, {210,64}, {224,64} + // LED Index to Physical Position + {0,0}, {15,0}, {29,0}, {44,0}, {59,0}, {73,0}, {88,0}, {103,0}, {118,0}, {132,0}, {147,0}, {162,0}, {176,0}, {198,0}, {224,0}, + {4,15}, {22,15}, {37,15}, {51,15}, {66,15}, {81,15}, {95,15}, {110,15}, {125,15}, {140,15}, {154,15}, {169,15}, {184,15}, {224,15}, + {6,30}, {26,30}, {40,30}, {55,30}, {70,30}, {84,30}, {99,30}, {114,30}, {129,30}, {143,30}, {158,30}, {173,30}, {187,30}, {204,23}, {224,30}, + {2,45}, {18,45}, {33,45}, {48,45}, {62,45}, {77,45}, {92,45}, {106,45}, {121,45}, {136,45}, {151,45}, {165,45}, {185,45}, {209,49}, + {2,60}, {20,60}, {39,60}, {94,60}, {147,60}, {162,60}, {176,60}, {195,64}, {209,64}, {224,64} }, { - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 + // RGB LED Index to Flag + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, + 1, 1, 1, 4, 1, 1, 1, 1, 1, 1 } }; -#endif + +#endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/q2/iso/iso.h b/keyboards/keychron/q2/iso/iso.h new file mode 100644 index 0000000000..db52563dc4 --- /dev/null +++ b/keyboards/keychron/q2/iso/iso.h @@ -0,0 +1,19 @@ +/* Copyright 2021 @ 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 <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#include "quantum.h" diff --git a/keyboards/keychron/q2/iso/keymaps/default/keymap.c b/keyboards/keychron/q2/iso/keymaps/default/keymap.c new file mode 100644 index 0000000000..3f2952f0b2 --- /dev/null +++ b/keyboards/keychron/q2/iso/keymaps/default/keymap.c @@ -0,0 +1,65 @@ +/* Copyright 2021 @ 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 <http://www.gnu.org/licenses/>. + */ + +#include QMK_KEYBOARD_H + +enum layers{ + MAC_BASE, + WIN_BASE, + _FN1, + _FN2, + _FN3 +}; + +#define KC_TASK LGUI(KC_TAB) +#define KC_FLXP LGUI(KC_E) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [MAC_BASE] = LAYOUT_iso_68( + 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_INS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, + KC_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_HOME, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LOPT, KC_LCMD, KC_SPC, KC_RCMD, MO(_FN1), MO(_FN3), KC_LEFT, KC_DOWN, KC_RGHT), + + [WIN_BASE] = LAYOUT_iso_68( + 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_INS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, + KC_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_HOME, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LWIN, KC_LALT, KC_SPC, KC_RALT, MO(_FN2), MO(_FN3), KC_LEFT, KC_DOWN, KC_RGHT), + + [_FN1] = LAYOUT_iso_68( + KC_GRV, KC_BRID, KC_BRIU, _______, _______, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, + RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_RMOD,RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [_FN2] = LAYOUT_iso_68( + KC_GRV, 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_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_RMOD,RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [_FN3] = LAYOUT_iso_68( + KC_TILD, 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_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_RMOD,RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) +}; diff --git a/keyboards/keychron/q2/iso/keymaps/keychron/keymap.c b/keyboards/keychron/q2/iso/keymaps/keychron/keymap.c new file mode 100644 index 0000000000..989f74929d --- /dev/null +++ b/keyboards/keychron/q2/iso/keymaps/keychron/keymap.c @@ -0,0 +1,71 @@ +/* Copyright 2021 @ 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 <http://www.gnu.org/licenses/>. + */ + +#include QMK_KEYBOARD_H +#include "keychron_common.h" + +enum layers{ + MAC_BASE, + WIN_BASE, + _FN1, + _FN2, + _FN3 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [MAC_BASE] = LAYOUT_iso_68( + 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_INS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, + KC_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_HOME, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LOPTN, KC_LCMMD, KC_SPC, KC_RCMMD, MO(_FN1), MO(_FN3), KC_LEFT, KC_DOWN, KC_RGHT), + + [WIN_BASE] = LAYOUT_iso_68( + 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_INS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, + KC_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_HOME, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LWIN, KC_LALT, KC_SPC, KC_RALT, MO(_FN2), MO(_FN3), KC_LEFT, KC_DOWN, KC_RGHT), + + [_FN1] = LAYOUT_iso_68( + KC_GRV, KC_BRID, KC_BRIU, KC_MCTL, KC_LPAD, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, + RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_RMOD, RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [_FN2] = LAYOUT_iso_68( + KC_GRV, 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_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_RMOD, RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [_FN3] = LAYOUT_iso_68( + KC_TILD, 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_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_RMOD, RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) +}; + +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/q2/iso/keymaps/keychron/rules.mk b/keyboards/keychron/q2/iso/keymaps/keychron/rules.mk new file mode 100644 index 0000000000..495e8907b4 --- /dev/null +++ b/keyboards/keychron/q2/iso/keymaps/keychron/rules.mk @@ -0,0 +1,4 @@ +VIA_ENABLE = yes + +VPATH += keyboards/keychron/common +SRC += keychron_common.c diff --git a/keyboards/keychron/q2/iso/keymaps/via/keymap.c b/keyboards/keychron/q2/iso/keymaps/via/keymap.c new file mode 100644 index 0000000000..3f2952f0b2 --- /dev/null +++ b/keyboards/keychron/q2/iso/keymaps/via/keymap.c @@ -0,0 +1,65 @@ +/* Copyright 2021 @ 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 <http://www.gnu.org/licenses/>. + */ + +#include QMK_KEYBOARD_H + +enum layers{ + MAC_BASE, + WIN_BASE, + _FN1, + _FN2, + _FN3 +}; + +#define KC_TASK LGUI(KC_TAB) +#define KC_FLXP LGUI(KC_E) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [MAC_BASE] = LAYOUT_iso_68( + 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_INS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, + KC_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_HOME, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LOPT, KC_LCMD, KC_SPC, KC_RCMD, MO(_FN1), MO(_FN3), KC_LEFT, KC_DOWN, KC_RGHT), + + [WIN_BASE] = LAYOUT_iso_68( + 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_INS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, + KC_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_HOME, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LWIN, KC_LALT, KC_SPC, KC_RALT, MO(_FN2), MO(_FN3), KC_LEFT, KC_DOWN, KC_RGHT), + + [_FN1] = LAYOUT_iso_68( + KC_GRV, KC_BRID, KC_BRIU, _______, _______, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, + RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_RMOD,RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [_FN2] = LAYOUT_iso_68( + KC_GRV, 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_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_RMOD,RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [_FN3] = LAYOUT_iso_68( + KC_TILD, 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_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_RMOD,RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) +}; diff --git a/keyboards/keychron/q2/iso/keymaps/via/rules.mk b/keyboards/keychron/q2/iso/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/keychron/q2/iso/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/keychron/q2/rev_0112/readme.md b/keyboards/keychron/q2/iso/readme.md index 29404e03ca..29404e03ca 100644 --- a/keyboards/keychron/q2/rev_0112/readme.md +++ b/keyboards/keychron/q2/iso/readme.md diff --git a/keyboards/keychron/q2/rev_0110/rules.mk b/keyboards/keychron/q2/iso/rules.mk index 38d48f0b27..38d48f0b27 100644 --- a/keyboards/keychron/q2/rev_0110/rules.mk +++ b/keyboards/keychron/q2/iso/rules.mk diff --git a/keyboards/keychron/q2/rev_0113/config.h b/keyboards/keychron/q2/iso_encoder/config.h index 8dd123e3bb..aa779918af 100644 --- a/keyboards/keychron/q2/rev_0113/config.h +++ b/keyboards/keychron/q2/iso_encoder/config.h @@ -24,6 +24,5 @@ /* Encoder used pins */ #define ENCODERS_PAD_A { A10 } #define ENCODERS_PAD_B { B5 } - -/* Specifies the number of pulses the encoder registers between each detent */ #define ENCODER_RESOLUTION 4 +#define ENCODER_DEFAULT_POS 0x3 diff --git a/keyboards/keychron/q2/iso_encoder/info.json b/keyboards/keychron/q2/iso_encoder/info.json new file mode 100644 index 0000000000..38ea233ea1 --- /dev/null +++ b/keyboards/keychron/q2/iso_encoder/info.json @@ -0,0 +1,89 @@ +{ + "keyboard_name": "Q2", + "manufacturer": "Keychron", + "url": "https://github.com/Keychron", + "maintainer": "lalalademaxiya1", + "usb": { + "vid": "0x3434", + "pid": "0x0113", + "device_version": "1.0.0" + }, + "layouts": { + "LAYOUT_iso_68": { + "layout": [ + {"matrix":[0, 0], "x":0, "y":0.25}, + {"matrix":[0, 1], "x":1, "y":0.25}, + {"matrix":[0, 2], "x":2, "y":0.25}, + {"matrix":[0, 3], "x":3, "y":0.25}, + {"matrix":[0, 4], "x":4, "y":0.25}, + {"matrix":[0, 5], "x":5, "y":0.25}, + {"matrix":[0, 6], "x":6, "y":0.25}, + {"matrix":[0, 7], "x":7, "y":0.25}, + {"matrix":[0, 8], "x":8, "y":0.25}, + {"matrix":[0, 9], "x":9, "y":0.25}, + {"matrix":[0,10], "x":10, "y":0.25}, + {"matrix":[0,11], "x":11, "y":0.25}, + {"matrix":[0,12], "x":12, "y":0.25}, + {"matrix":[0,13], "x":13, "y":0.25, "w":2}, + {"matrix":[0,14], "x":15.25, "y":0}, + + {"matrix":[1, 0], "x":0, "y":1.25, "w":1.5}, + {"matrix":[1, 1], "x":1.5, "y":1.25}, + {"matrix":[1, 2], "x":2.5, "y":1.25}, + {"matrix":[1, 3], "x":3.5, "y":1.25}, + {"matrix":[1, 4], "x":4.5, "y":1.25}, + {"matrix":[1, 5], "x":5.5, "y":1.25}, + {"matrix":[1, 6], "x":6.5, "y":1.25}, + {"matrix":[1, 7], "x":7.5, "y":1.25}, + {"matrix":[1, 8], "x":8.5, "y":1.25}, + {"matrix":[1, 9], "x":9.5, "y":1.25}, + {"matrix":[1,10], "x":10.5, "y":1.25}, + {"matrix":[1,11], "x":11.5, "y":1.25}, + {"matrix":[1,12], "x":12.5, "y":1.25}, + {"matrix":[1,14], "x":15.25, "y":1.25}, + + {"matrix":[2, 0], "x":0, "y":2.25, "w":1.75}, + {"matrix":[2, 1], "x":1.75, "y":2.25}, + {"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, 5], "x":5.75, "y":2.25}, + {"matrix":[2, 6], "x":6.75, "y":2.25}, + {"matrix":[2, 7], "x":7.75, "y":2.25}, + {"matrix":[2, 8], "x":8.75, "y":2.25}, + {"matrix":[2, 9], "x":9.75, "y":2.25}, + {"matrix":[2,10], "x":10.75, "y":2.25}, + {"matrix":[2,11], "x":11.75, "y":2.25}, + {"matrix":[2,13], "x":12.75, "y":2.25}, + {"matrix":[1,13], "x":13.75, "y":1.25, "w":1.25, "h":2}, + {"matrix":[2,14], "x":15.25, "y":2.25}, + + {"matrix":[3, 0], "x":0, "y":3.25, "w":1.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":[3, 4], "x":4.25, "y":3.25}, + {"matrix":[3, 5], "x":5.25, "y":3.25}, + {"matrix":[3, 6], "x":6.25, "y":3.25}, + {"matrix":[3, 7], "x":7.25, "y":3.25}, + {"matrix":[3, 8], "x":8.25, "y":3.25}, + {"matrix":[3, 9], "x":9.25, "y":3.25}, + {"matrix":[3,10], "x":10.25, "y":3.25}, + {"matrix":[3,11], "x":11.25, "y":3.25}, + {"matrix":[3,13], "x":12.25, "y":3.25, "w":1.75}, + {"matrix":[3,14], "x":14.25, "y":3.5}, + + {"matrix":[4, 0], "x":0, "y":4.25, "w":1.25}, + {"matrix":[4, 1], "x":1.25, "y":4.25, "w":1.25}, + {"matrix":[4, 2], "x":2.5, "y":4.25, "w":1.25}, + {"matrix":[4, 6], "x":3.75, "y":4.25, "w":6.25}, + {"matrix":[4,10], "x":10, "y":4.25}, + {"matrix":[4,11], "x":11, "y":4.25}, + {"matrix":[4,12], "x":12, "y":4.25}, + {"matrix":[4,13], "x":13.25, "y":4.5}, + {"matrix":[2,12], "x":14.25, "y":4.5}, + {"matrix":[4,14], "x":15.25, "y":4.5} + ] + } + } +} diff --git a/keyboards/keychron/q2/rev_0113/rev_0113.c b/keyboards/keychron/q2/iso_encoder/iso_encoder.c index 2aa3ab2a6d..af7b818149 100644 --- a/keyboards/keychron/q2/rev_0113/rev_0113.c +++ b/keyboards/keychron/q2/iso_encoder/iso_encoder.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "quantum.h" +#include "iso_encoder.h" #ifdef RGB_MATRIX_ENABLE const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { @@ -98,41 +98,33 @@ const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { {1, F_16, D_16, E_16} }; +#define __ NO_LED + led_config_t g_led_config = { - { - { 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, 42, 28 }, - { 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 66, 41, 43 }, - { 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, NO_LED, 56, 57 }, - { 58, 59, 60, NO_LED, NO_LED, NO_LED, 61, NO_LED, NO_LED, NO_LED, 62, 63, 64, 65, 67 } + { + // 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, 42, 28 }, + { 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 66, 41, 43 }, + { 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, __, 56, 57 }, + { 58, 59, 60, __, __, __, 61, __, __, __, 62, 63, 64, 65, 67 } }, { - {0, 0}, {15, 0}, {30, 0}, {45, 0}, {60, 0}, {75, 0}, {90, 0}, {105, 0}, {120, 0}, {135, 0}, {150, 0}, {165, 0}, {180, 0}, {195, 0}, {224, 0}, - {0,16}, {15,16}, {30,16}, {45,16}, {60,16}, {75,16}, {90,16}, {105,16}, {120,16}, {135,16}, {150,16}, {165,16}, {180,16}, {224,16}, - {0,32}, {15,32}, {30,32}, {45,32}, {60,32}, {75,32}, {90,32}, {105,32}, {120,32}, {135,32}, {150,32}, {165,32}, {180,32}, {195,16}, {224,32}, - {0,48}, {15,48}, {30,48}, {45,48}, {60,48}, {75,48}, {90,48}, {105,48}, {120,48}, {135,48}, {150,48}, {165,48}, {180,48}, {210,48}, - {0,64}, {15,64}, {30,64}, {90,64}, {150,64}, {165,64}, {180,64}, {195,64}, {210,64}, {224,64} + // LED Index to Physical Position + {0,0}, {15,0}, {29,0}, {44,0}, {59,0}, {73,0}, {88,0}, {103,0}, {118,0}, {132,0}, {147,0}, {162,0}, {176,0}, {198,0}, {224,0}, + {4,15}, {22,15}, {37,15}, {51,15}, {66,15}, {81,15}, {95,15}, {110,15}, {125,15}, {140,15}, {154,15}, {169,15}, {184,15}, {224,15}, + {6,30}, {26,30}, {40,30}, {55,30}, {70,30}, {84,30}, {99,30}, {114,30}, {129,30}, {143,30}, {158,30}, {173,30}, {187,30}, {204,23}, {224,30}, + {2,45}, {18,45}, {33,45}, {48,45}, {62,45}, {77,45}, {92,45}, {106,45}, {121,45}, {136,45}, {151,45}, {165,45}, {185,45}, {209,49}, + {2,60}, {20,60}, {39,60}, {94,60}, {147,60}, {162,60}, {176,60}, {195,64}, {209,64}, {224,64} }, { - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 + // RGB LED Index to Flag + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, + 1, 1, 1, 4, 1, 1, 1, 1, 1, 1 } }; -#endif -#ifdef ENCODER_ENABLE -bool encoder_update_kb(uint8_t index, bool clockwise) { - if (!encoder_update_user(index, clockwise)) { return false; } - if (index == 0) { - if (clockwise) { - tap_code_delay(KC_VOLU, 10); - } else { - tap_code_delay(KC_VOLD, 10); - } - } - return true; -} -#endif +#endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/q2/iso_encoder/iso_encoder.h b/keyboards/keychron/q2/iso_encoder/iso_encoder.h new file mode 100644 index 0000000000..db52563dc4 --- /dev/null +++ b/keyboards/keychron/q2/iso_encoder/iso_encoder.h @@ -0,0 +1,19 @@ +/* Copyright 2021 @ 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 <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#include "quantum.h" diff --git a/keyboards/keychron/q2/iso_encoder/keymaps/default/keymap.c b/keyboards/keychron/q2/iso_encoder/keymaps/default/keymap.c new file mode 100644 index 0000000000..61ace12361 --- /dev/null +++ b/keyboards/keychron/q2/iso_encoder/keymaps/default/keymap.c @@ -0,0 +1,75 @@ +/* Copyright 2021 @ 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 <http://www.gnu.org/licenses/>. + */ + +#include QMK_KEYBOARD_H + +enum layers{ + MAC_BASE, + WIN_BASE, + _FN1, + _FN2, + _FN3 +}; + +#define KC_TASK LGUI(KC_TAB) +#define KC_FLXP LGUI(KC_E) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [MAC_BASE] = LAYOUT_iso_68( + 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_MUTE, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, + KC_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_HOME, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LOPT, KC_LCMD, KC_SPC, KC_RCMD, MO(_FN1), MO(_FN3), KC_LEFT, KC_DOWN, KC_RGHT), + + [WIN_BASE] = LAYOUT_iso_68( + 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_MUTE, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, + KC_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_HOME, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LWIN, KC_LALT, KC_SPC, KC_RALT, MO(_FN2), MO(_FN3), KC_LEFT, KC_DOWN, KC_RGHT), + + [_FN1] = LAYOUT_iso_68( + KC_GRV, KC_BRID, KC_BRIU, _______, _______, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, + RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_RMOD,RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [_FN2] = LAYOUT_iso_68( + KC_GRV, 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_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_RMOD,RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [_FN3] = LAYOUT_iso_68( + KC_TILD, 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_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_RMOD,RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [MAC_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [WIN_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [_FN1] = { ENCODER_CCW_CW(_______, _______) }, + [_FN2] = { ENCODER_CCW_CW(_______, _______) }, + [_FN3] = { ENCODER_CCW_CW(_______, _______) }, +}; +#endif diff --git a/keyboards/keychron/q2/rev_0113/keymaps/default/rules.mk b/keyboards/keychron/q2/iso_encoder/keymaps/default/rules.mk index a40474b4d5..a40474b4d5 100644 --- a/keyboards/keychron/q2/rev_0113/keymaps/default/rules.mk +++ b/keyboards/keychron/q2/iso_encoder/keymaps/default/rules.mk diff --git a/keyboards/keychron/q2/rev_0113/keymaps/dhertz/keymap.c b/keyboards/keychron/q2/iso_encoder/keymaps/dhertz/keymap.c index 0d4f7e6a22..0d4f7e6a22 100644 --- a/keyboards/keychron/q2/rev_0113/keymaps/dhertz/keymap.c +++ b/keyboards/keychron/q2/iso_encoder/keymaps/dhertz/keymap.c diff --git a/keyboards/keychron/q2/rev_0113/keymaps/dhertz/rules.mk b/keyboards/keychron/q2/iso_encoder/keymaps/dhertz/rules.mk index 199bad85f3..199bad85f3 100644 --- a/keyboards/keychron/q2/rev_0113/keymaps/dhertz/rules.mk +++ b/keyboards/keychron/q2/iso_encoder/keymaps/dhertz/rules.mk diff --git a/keyboards/keychron/q2/iso_encoder/keymaps/keychron/keymap.c b/keyboards/keychron/q2/iso_encoder/keymaps/keychron/keymap.c new file mode 100644 index 0000000000..f2da1cb57b --- /dev/null +++ b/keyboards/keychron/q2/iso_encoder/keymaps/keychron/keymap.c @@ -0,0 +1,81 @@ +/* Copyright 2021 @ 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 <http://www.gnu.org/licenses/>. + */ + +#include QMK_KEYBOARD_H +#include "keychron_common.h" + +enum layers{ + MAC_BASE, + WIN_BASE, + _FN1, + _FN2, + _FN3 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [MAC_BASE] = LAYOUT_iso_68( + 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_MUTE, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, + KC_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_HOME, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LOPTN, KC_LCMMD, KC_SPC, KC_RCMMD, MO(_FN1), MO(_FN3), KC_LEFT, KC_DOWN, KC_RGHT), + + [WIN_BASE] = LAYOUT_iso_68( + 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_MUTE, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, + KC_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_HOME, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LWIN, KC_LALT, KC_SPC, KC_RALT, MO(_FN2), MO(_FN3), KC_LEFT, KC_DOWN, KC_RGHT), + + [_FN1] = LAYOUT_iso_68( + KC_GRV, KC_BRID, KC_BRIU, KC_MCTL, KC_LPAD, 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, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [_FN2] = LAYOUT_iso_68( + KC_GRV, 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, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [_FN3] = LAYOUT_iso_68( + KC_TILD, 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_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_RMOD, RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [MAC_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [WIN_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [_FN1] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI) }, + [_FN2] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI) }, + [_FN3] = { ENCODER_CCW_CW(_______, _______) }, +}; +#endif + +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/q2/iso_encoder/keymaps/keychron/rules.mk b/keyboards/keychron/q2/iso_encoder/keymaps/keychron/rules.mk new file mode 100644 index 0000000000..9cf1a9b56c --- /dev/null +++ b/keyboards/keychron/q2/iso_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/q2/iso_encoder/keymaps/via/keymap.c b/keyboards/keychron/q2/iso_encoder/keymaps/via/keymap.c new file mode 100644 index 0000000000..ba7dfb331d --- /dev/null +++ b/keyboards/keychron/q2/iso_encoder/keymaps/via/keymap.c @@ -0,0 +1,75 @@ +/* Copyright 2021 @ 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 <http://www.gnu.org/licenses/>. + */ + +#include QMK_KEYBOARD_H + +enum layers{ + MAC_BASE, + WIN_BASE, + _FN1, + _FN2, + _FN3 +}; + +#define KC_TASK LGUI(KC_TAB) +#define KC_FLXP LGUI(KC_E) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [MAC_BASE] = LAYOUT_iso_68( + 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_MUTE, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, + KC_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_HOME, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LOPT, KC_LCMD, KC_SPC, KC_RCMD, MO(_FN1), MO(_FN3), KC_LEFT, KC_DOWN, KC_RGHT), + + [WIN_BASE] = LAYOUT_iso_68( + 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_MUTE, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, + KC_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_HOME, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LWIN, KC_LALT, KC_SPC, KC_RALT, MO(_FN2), MO(_FN3), KC_LEFT, KC_DOWN, KC_RGHT), + + [_FN1] = LAYOUT_iso_68( + KC_GRV, KC_BRID, KC_BRIU, _______, _______, 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, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [_FN2] = LAYOUT_iso_68( + KC_GRV, 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, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [_FN3] = LAYOUT_iso_68( + KC_TILD, 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_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_RMOD,RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [MAC_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [WIN_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [_FN1] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI) }, + [_FN2] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI) }, + [_FN3] = { ENCODER_CCW_CW(_______, _______) }, +}; +#endif diff --git a/keyboards/keychron/q2/iso_encoder/keymaps/via/rules.mk b/keyboards/keychron/q2/iso_encoder/keymaps/via/rules.mk new file mode 100644 index 0000000000..f1adcab005 --- /dev/null +++ b/keyboards/keychron/q2/iso_encoder/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/keychron/q2/rev_0113/readme.md b/keyboards/keychron/q2/iso_encoder/readme.md index 1d808cbb73..1d808cbb73 100644 --- a/keyboards/keychron/q2/rev_0113/readme.md +++ b/keyboards/keychron/q2/iso_encoder/readme.md diff --git a/keyboards/keychron/q2/rev_0111/rules.mk b/keyboards/keychron/q2/iso_encoder/rules.mk index 9332d29432..9332d29432 100644 --- a/keyboards/keychron/q2/rev_0111/rules.mk +++ b/keyboards/keychron/q2/iso_encoder/rules.mk diff --git a/keyboards/keychron/q2/q2.c b/keyboards/keychron/q2/q2.c index 03d1ee7db5..7a8edd8016 100644 --- a/keyboards/keychron/q2/q2.c +++ b/keyboards/keychron/q2/q2.c @@ -24,6 +24,8 @@ const matrix_row_t matrix_mask[] = { 0b1111111111101111, }; +#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) { @@ -31,3 +33,5 @@ bool dip_switch_update_kb(uint8_t index, bool active) { } return true; } + +#endif // DIP_SWITCH_ENABLE diff --git a/keyboards/keychron/q2/q2.h b/keyboards/keychron/q2/q2.h index 22bd1afe8e..a256ceae6a 100644 --- a/keyboards/keychron/q2/q2.h +++ b/keyboards/keychron/q2/q2.h @@ -18,12 +18,12 @@ #include "quantum.h" -#if defined(KEYBOARD_keychron_q2_rev_0110) -# include "rev_0110.h" -#elif defined(KEYBOARD_keychron_q2_rev_0111) -# include "rev_0111.h" -#elif defined(KEYBOARD_keychron_q2_rev_0112) -# include "rev_0112.h" -#elif defined(KEYBOARD_keychron_q2_rev_0113) -# include "rev_0113.h" +#if defined(KEYBOARD_keychron_q2_ansi) +# include "ansi.h" +#elif defined(KEYBOARD_keychron_q2_ansi_encoder) +# include "ansi_encoder.h" +#elif defined(KEYBOARD_keychron_q2_iso) +# include "iso.h" +#elif defined(KEYBOARD_keychron_q2_iso_encoder) +# include "iso_encoder.h" #endif diff --git a/keyboards/keychron/q2/readme.md b/keyboards/keychron/q2/readme.md index bdceb98d48..7488df99f1 100644 --- a/keyboards/keychron/q2/readme.md +++ b/keyboards/keychron/q2/readme.md @@ -8,11 +8,11 @@ A customizable 65% keyboard. Make example for this keyboard (after setting up your build environment): - make keychron/q2/rev_0110:default + make keychron/q2/ansi:default Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) - make keychron/q2/rev_0110:default:flash + make keychron/q2/ansi:default:flash **Reset Key**: Hold down the key located at *K00*, commonly programmed as *Esc* while plugging in the keyboard. diff --git a/keyboards/keychron/q2/rev_0110/info.json b/keyboards/keychron/q2/rev_0110/info.json deleted file mode 100644 index 65e6c22519..0000000000 --- a/keyboards/keychron/q2/rev_0110/info.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "keyboard_name": "Q2", - "manufacturer": "Keychron", - "url": "https://github.com/Keychron", - "maintainer": "lalalademaxiya1", - "usb": { - "vid": "0x3434", - "pid": "0x0110", - "device_version": "1.0.0" - }, - "layouts": { - "LAYOUT_ansi_67": { - "layout": [ - {"label":"Esc", "x":0, "y":0.25}, - {"label":"1!", "x":1, "y":0.25}, - {"label":"2@", "x":2, "y":0.25}, - {"label":"3#", "x":3, "y":0.25}, - {"label":"4$", "x":4, "y":0.25}, - {"label":"5%", "x":5, "y":0.25}, - {"label":"6^", "x":6, "y":0.25}, - {"label":"7&", "x":7, "y":0.25}, - {"label":"8*", "x":8, "y":0.25}, - {"label":"9(", "x":9, "y":0.25}, - {"label":"0)", "x":10, "y":0.25}, - {"label":"-_", "x":11, "y":0.25}, - {"label":"=+", "x":12, "y":0.25}, - {"label":"Backspace", "x":13, "y":0.25, "w":2}, - {"label":"Insert", "x":15.25, "y":0}, - - {"label":"Tab", "x":0, "y":1.25, "w":1.5}, - {"label":"Q", "x":1.5, "y":1.25}, - {"label":"W", "x":2.5, "y":1.25}, - {"label":"E", "x":3.5, "y":1.25}, - {"label":"R", "x":4.5, "y":1.25}, - {"label":"T", "x":5.5, "y":1.25}, - {"label":"Y", "x":6.5, "y":1.25}, - {"label":"U", "x":7.5, "y":1.25}, - {"label":"I", "x":8.5, "y":1.25}, - {"label":"O", "x":9.5, "y":1.25}, - {"label":"P", "x":10.5, "y":1.25}, - {"label":"[{", "x":11.5, "y":1.25}, - {"label":"]}", "x":12.5, "y":1.25}, - {"label":"\\|", "x":13.5, "y":1.25, "w":1.5}, - {"label":"Delete", "x":15.25, "y":1.25}, - - {"label":"Caps Lock", "x":0, "y":2.25, "w":1.75}, - {"label":"A", "x":1.75, "y":2.25}, - {"label":"S", "x":2.75, "y":2.25}, - {"label":"D", "x":3.75, "y":2.25}, - {"label":"F", "x":4.75, "y":2.25}, - {"label":"G", "x":5.75, "y":2.25}, - {"label":"H", "x":6.75, "y":2.25}, - {"label":"J", "x":7.75, "y":2.25}, - {"label":"K", "x":8.75, "y":2.25}, - {"label":"L", "x":9.75, "y":2.25}, - {"label":";:", "x":10.75, "y":2.25}, - {"label":"'\"", "x":11.75, "y":2.25}, - {"label":"Enter", "x":12.75, "y":2.25, "w":2.25}, - {"label":"Home", "x":15.25, "y":2.25}, - - {"label":"Shift", "x":0, "y":3.25, "w":2.25}, - {"label":"Z", "x":2.25, "y":3.25}, - {"label":"X", "x":3.25, "y":3.25}, - {"label":"C", "x":4.25, "y":3.25}, - {"label":"V", "x":5.25, "y":3.25}, - {"label":"B", "x":6.25, "y":3.25}, - {"label":"N", "x":7.25, "y":3.25}, - {"label":"M", "x":8.25, "y":3.25}, - {"label":",<", "x":9.25, "y":3.25}, - {"label":".>", "x":10.25, "y":3.25}, - {"label":"/?", "x":11.25, "y":3.25}, - {"label":"Shift", "x":12.25, "y":3.25, "w":1.75}, - {"label":"Up", "x":14.25, "y":3.5}, - - {"label":"Ctrl", "x":0, "y":4.25, "w":1.25}, - {"label":"Win", "x":1.25, "y":4.25, "w":1.25}, - {"label":"Alt", "x":2.5, "y":4.25, "w":1.25}, - {"label":"Space", "x":3.75, "y":4.25, "w":6.25}, - {"label":"Alt", "x":10, "y":4.25}, - {"label":"Fn1", "x":11, "y":4.25}, - {"label":"Fn2", "x":12, "y":4.25}, - {"label":"Left", "x":13.25, "y":4.5}, - {"label":"Down", "x":14.25, "y":4.5}, - {"label":"Right", "x":15.25, "y":4.5} - ] - } - } -} diff --git a/keyboards/keychron/q2/rev_0110/keymaps/default/keymap.c b/keyboards/keychron/q2/rev_0110/keymaps/default/keymap.c deleted file mode 100644 index 429157eef2..0000000000 --- a/keyboards/keychron/q2/rev_0110/keymaps/default/keymap.c +++ /dev/null @@ -1,94 +0,0 @@ -/* Copyright 2021 @ 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 <http://www.gnu.org/licenses/>. - */ - -#include QMK_KEYBOARD_H - -enum layers{ - MAC_BASE, - WIN_BASE, - _FN1, - _FN2, - _FN3 -}; - -enum custom_keycodes { - KC_MISSION_CONTROL = SAFE_RANGE, - KC_LAUNCHPAD -}; - -#define KC_WAVE S(KC_GRV) -#define KC_TASK LGUI(KC_TAB) -#define KC_FLXP LGUI(KC_E) -#define KC_MCTL KC_MISSION_CONTROL -#define KC_LPAD KC_LAUNCHPAD - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [MAC_BASE] = LAYOUT_ansi_67( - 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_INS, - 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_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, KC_SPC, KC_RCMD, MO(_FN1), MO(_FN3), KC_LEFT, KC_DOWN, KC_RGHT), - - [WIN_BASE] = LAYOUT_ansi_67( - 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_INS, - 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_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_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN2), MO(_FN3), KC_LEFT, KC_DOWN, KC_RGHT), - - [_FN1] = LAYOUT_ansi_67( - KC_GRV, 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_TRNS, KC_TRNS, - RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, RGB_RMOD,RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - [_FN2] = LAYOUT_ansi_67( - KC_GRV, KC_BRID, KC_BRIU, KC_TASK, KC_FLXP, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, - RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, RGB_RMOD,RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - [_FN3] = LAYOUT_ansi_67( - KC_WAVE, 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_TRNS, - RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, RGB_RMOD,RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) -}; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case KC_MISSION_CONTROL: - if (record->event.pressed) { - host_consumer_send(0x29F); - } else { - host_consumer_send(0); - } - return false; // Skip all further processing of this key - case KC_LAUNCHPAD: - if (record->event.pressed) { - host_consumer_send(0x2A0); - } else { - host_consumer_send(0); - } - return false; // Skip all further processing of this key - default: - return true; // Process all other keycodes normally - } -} diff --git a/keyboards/keychron/q2/rev_0110/keymaps/via/keymap.c b/keyboards/keychron/q2/rev_0110/keymaps/via/keymap.c deleted file mode 100644 index b23c92e95e..0000000000 --- a/keyboards/keychron/q2/rev_0110/keymaps/via/keymap.c +++ /dev/null @@ -1,112 +0,0 @@ -/* Copyright 2021 @ 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 <http://www.gnu.org/licenses/>. - */ - -#include QMK_KEYBOARD_H - -enum layers{ - MAC_BASE, - WIN_BASE, - _FN1, - _FN2, - _FN3 -}; - -enum custom_keycodes { - KC_MISSION_CONTROL = USER00, - KC_LAUNCHPAD, - KC_TASK, - KC_FLXP -}; - -#define KC_WAVE S(KC_GRV) -#define KC_MCTL KC_MISSION_CONTROL -#define KC_LPAD KC_LAUNCHPAD - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [MAC_BASE] = LAYOUT_ansi_67( - 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_INS, - 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_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, KC_SPC, KC_RCMD, MO(_FN1), MO(_FN3), KC_LEFT, KC_DOWN, KC_RGHT), - - [WIN_BASE] = LAYOUT_ansi_67( - 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_INS, - 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_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_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN2), MO(_FN3), KC_LEFT, KC_DOWN, KC_RGHT), - - [_FN1] = LAYOUT_ansi_67( - KC_GRV, 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_TRNS, KC_TRNS, - RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, RGB_RMOD,RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - [_FN2] = LAYOUT_ansi_67( - KC_GRV, KC_BRID, KC_BRIU, KC_TASK, KC_FLXP, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, - RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, RGB_RMOD,RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - [_FN3] = LAYOUT_ansi_67( - KC_WAVE, 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_TRNS, - RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, RGB_RMOD,RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) -}; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case KC_MISSION_CONTROL: - if (record->event.pressed) { - host_consumer_send(0x29F); - } else { - host_consumer_send(0); - } - return false; // Skip all further processing of this key - case KC_LAUNCHPAD: - if (record->event.pressed) { - host_consumer_send(0x2A0); - } else { - host_consumer_send(0); - } - return false; // Skip all further processing of this key - case KC_TASK: - if (record->event.pressed) { - register_code(KC_LWIN); - register_code(KC_TAB); - } else { - unregister_code(KC_LWIN); - unregister_code(KC_TAB); - } - return false; // Skip all further processing of this key - case KC_FLXP: - if (record->event.pressed) { - register_code(KC_LWIN); - register_code(KC_E); - } else { - unregister_code(KC_LWIN); - unregister_code(KC_E); - } - return false; // Skip all further processing of this key - default: - return true; // Process all other keycodes normally - } -} diff --git a/keyboards/keychron/q2/rev_0110/keymaps/via/rules.mk b/keyboards/keychron/q2/rev_0110/keymaps/via/rules.mk deleted file mode 100644 index bee21da528..0000000000 --- a/keyboards/keychron/q2/rev_0110/keymaps/via/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -VIA_ENABLE = yes -MOUSEKEY_ENABLE = no
\ No newline at end of file diff --git a/keyboards/keychron/q2/rev_0110/rev_0110.h b/keyboards/keychron/q2/rev_0110/rev_0110.h deleted file mode 100644 index 669a79d310..0000000000 --- a/keyboards/keychron/q2/rev_0110/rev_0110.h +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright 2021 @ 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 <http://www.gnu.org/licenses/>. - */ - -#pragma once - -#include "quantum.h" - -#define XXX KC_NO - -#define LAYOUT_ansi_67( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E,\ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E,\ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E,\ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, \ - K40, K41, K42, K46, K4A, K4B, K4C, K4D, K2C, K4E \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, }, \ - { K30, XXX, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D, K3E, }, \ - { K40, K41, K42, XXX, XXX, XXX, K46, XXX, XXX, XXX, K4A, K4B, K4C, K4D, K4E, } \ -} diff --git a/keyboards/keychron/q2/rev_0111/info.json b/keyboards/keychron/q2/rev_0111/info.json deleted file mode 100644 index 875937baec..0000000000 --- a/keyboards/keychron/q2/rev_0111/info.json +++ /dev/null @@ -1,165 +0,0 @@ -{ - "keyboard_name": "Q2", - "manufacturer": "Keychron", - "url": "https://github.com/Keychron", - "maintainer": "lalalademaxiya1", - "usb": { - "vid": "0x3434", - "pid": "0x0111", - "device_version": "1.0.0" - }, - "layouts": { - "LAYOUT_ansi_67": { - "layout": [ - {"label":"Esc", "x":0, "y":0.25}, - {"label":"1!", "x":1, "y":0.25}, - {"label":"2@", "x":2, "y":0.25}, - {"label":"3#", "x":3, "y":0.25}, - {"label":"4$", "x":4, "y":0.25}, - {"label":"5%", "x":5, "y":0.25}, - {"label":"6^", "x":6, "y":0.25}, - {"label":"7&", "x":7, "y":0.25}, - {"label":"8*", "x":8, "y":0.25}, - {"label":"9(", "x":9, "y":0.25}, - {"label":"0)", "x":10, "y":0.25}, - {"label":"-_", "x":11, "y":0.25}, - {"label":"=+", "x":12, "y":0.25}, - {"label":"Backspace", "x":13, "y":0.25, "w":2}, - {"label":"Mute", "x":15.25, "y":0}, - - {"label":"Tab", "x":0, "y":1.25, "w":1.5}, - {"label":"Q", "x":1.5, "y":1.25}, - {"label":"W", "x":2.5, "y":1.25}, - {"label":"E", "x":3.5, "y":1.25}, - {"label":"R", "x":4.5, "y":1.25}, - {"label":"T", "x":5.5, "y":1.25}, - {"label":"Y", "x":6.5, "y":1.25}, - {"label":"U", "x":7.5, "y":1.25}, - {"label":"I", "x":8.5, "y":1.25}, - {"label":"O", "x":9.5, "y":1.25}, - {"label":"P", "x":10.5, "y":1.25}, - {"label":"[{", "x":11.5, "y":1.25}, - {"label":"]}", "x":12.5, "y":1.25}, - {"label":"\\|", "x":13.5, "y":1.25, "w":1.5}, - {"label":"Delete", "x":15.25, "y":1.25}, - - {"label":"Caps Lock", "x":0, "y":2.25, "w":1.75}, - {"label":"A", "x":1.75, "y":2.25}, - {"label":"S", "x":2.75, "y":2.25}, - {"label":"D", "x":3.75, "y":2.25}, - {"label":"F", "x":4.75, "y":2.25}, - {"label":"G", "x":5.75, "y":2.25}, - {"label":"H", "x":6.75, "y":2.25}, - {"label":"J", "x":7.75, "y":2.25}, - {"label":"K", "x":8.75, "y":2.25}, - {"label":"L", "x":9.75, "y":2.25}, - {"label":";:", "x":10.75, "y":2.25}, - {"label":"'\"", "x":11.75, "y":2.25}, - {"label":"Enter", "x":12.75, "y":2.25, "w":2.25}, - {"label":"Home", "x":15.25, "y":2.25}, - - {"label":"Shift", "x":0, "y":3.25, "w":2.25}, - {"label":"Z", "x":2.25, "y":3.25}, - {"label":"X", "x":3.25, "y":3.25}, - {"label":"C", "x":4.25, "y":3.25}, - {"label":"V", "x":5.25, "y":3.25}, - {"label":"B", "x":6.25, "y":3.25}, - {"label":"N", "x":7.25, "y":3.25}, - {"label":"M", "x":8.25, "y":3.25}, - {"label":",<", "x":9.25, "y":3.25}, - {"label":".>", "x":10.25, "y":3.25}, - {"label":"/?", "x":11.25, "y":3.25}, - {"label":"Shift", "x":12.25, "y":3.25, "w":1.75}, - {"label":"Up", "x":14.25, "y":3.5}, - - {"label":"Ctrl", "x":0, "y":4.25, "w":1.25}, - {"label":"Win", "x":1.25, "y":4.25, "w":1.25}, - {"label":"Alt", "x":2.5, "y":4.25, "w":1.25}, - {"label":"Space", "x":3.75, "y":4.25, "w":6.25}, - {"label":"Alt", "x":10, "y":4.25}, - {"label":"Fn1", "x":11, "y":4.25}, - {"label":"Fn2", "x":12, "y":4.25}, - {"label":"Left", "x":13.25, "y":4.5}, - {"label":"Down", "x":14.25, "y":4.5}, - {"label":"Right", "x":15.25, "y":4.5} - ] - }, - "LAYOUT_all": { - "layout": [ - {"label":"Esc", "x":0, "y":0.75}, - {"label":"1!", "x":1, "y":0.75}, - {"label":"2@", "x":2, "y":0.75}, - {"label":"3#", "x":3, "y":0.75}, - {"label":"4$", "x":4, "y":0.75}, - {"label":"5%", "x":5, "y":0.75}, - {"label":"6^", "x":6, "y":0.75}, - {"label":"7&", "x":7, "y":0.75}, - {"label":"8*", "x":8, "y":0.75}, - {"label":"9(", "x":9, "y":0.75}, - {"label":"0)", "x":10, "y":0.75}, - {"label":"-_", "x":11, "y":0.75}, - {"label":"=+", "x":12, "y":0.75}, - {"label":"Backspace", "x":13, "y":0.75, "w":2}, - {"label":"CCW", "x":15.15, "y":0, "w":0.6, "h":0.5}, - {"label":"Mute", "x":15.25, "y":0.5}, - {"label":"CW", "x":15.75, "y":0, "w":0.6, "h":0.5}, - - {"label":"Tab", "x":0, "y":1.75, "w":1.5}, - {"label":"Q", "x":1.5, "y":1.75}, - {"label":"W", "x":2.5, "y":1.75}, - {"label":"E", "x":3.5, "y":1.75}, - {"label":"R", "x":4.5, "y":1.75}, - {"label":"T", "x":5.5, "y":1.75}, - {"label":"Y", "x":6.5, "y":1.75}, - {"label":"U", "x":7.5, "y":1.75}, - {"label":"I", "x":8.5, "y":1.75}, - {"label":"O", "x":9.5, "y":1.75}, - {"label":"P", "x":10.5, "y":1.75}, - {"label":"[{", "x":11.5, "y":1.75}, - {"label":"]}", "x":12.5, "y":1.75}, - {"label":"\\|", "x":13.5, "y":1.75, "w":1.5}, - {"label":"Delete", "x":15.25, "y":1.75}, - - {"label":"Caps Lock", "x":0, "y":2.75, "w":1.75}, - {"label":"A", "x":1.75, "y":2.75}, - {"label":"S", "x":2.75, "y":2.75}, - {"label":"D", "x":3.75, "y":2.75}, - {"label":"F", "x":4.75, "y":2.75}, - {"label":"G", "x":5.75, "y":2.75}, - {"label":"H", "x":6.75, "y":2.75}, - {"label":"J", "x":7.75, "y":2.75}, - {"label":"K", "x":8.75, "y":2.75}, - {"label":"L", "x":9.75, "y":2.75}, - {"label":";:", "x":10.75, "y":2.75}, - {"label":"'\"", "x":11.75, "y":2.75}, - {"label":"Enter", "x":12.75, "y":2.75, "w":2.25}, - {"label":"Home", "x":15.25, "y":2.75}, - - {"label":"Shift", "x":0, "y":3.75, "w":2.25}, - {"label":"Z", "x":2.25, "y":3.75}, - {"label":"X", "x":3.25, "y":3.75}, - {"label":"C", "x":4.25, "y":3.75}, - {"label":"V", "x":5.25, "y":3.75}, - {"label":"B", "x":6.25, "y":3.75}, - {"label":"N", "x":7.25, "y":3.75}, - {"label":"M", "x":8.25, "y":3.75}, - {"label":",<", "x":9.25, "y":3.75}, - {"label":".>", "x":10.25, "y":3.75}, - {"label":"/?", "x":11.25, "y":3.75}, - {"label":"Shift", "x":12.25, "y":3.75, "w":1.75}, - {"label":"Up", "x":14.25, "y":4}, - - {"label":"Ctrl", "x":0, "y":4.75, "w":1.25}, - {"label":"Win", "x":1.25, "y":4.75, "w":1.25}, - {"label":"Alt", "x":2.5, "y":4.75, "w":1.25}, - {"label":"Space", "x":3.75, "y":4.75, "w":6.25}, - {"label":"Alt", "x":10, "y":4.75}, - {"label":"Fn1", "x":11, "y":4.75}, - {"label":"Fn2", "x":12, "y":4.75}, - {"label":"Left", "x":13.25, "y":5}, - {"label":"Down", "x":14.25, "y":5}, - {"label":"Right", "x":15.25, "y":5} - ] - } - } -} diff --git a/keyboards/keychron/q2/rev_0111/keymaps/default/keymap.c b/keyboards/keychron/q2/rev_0111/keymaps/default/keymap.c deleted file mode 100644 index 3079050204..0000000000 --- a/keyboards/keychron/q2/rev_0111/keymaps/default/keymap.c +++ /dev/null @@ -1,104 +0,0 @@ -/* Copyright 2021 @ 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 <http://www.gnu.org/licenses/>. - */ - -#include QMK_KEYBOARD_H - -enum layers{ - MAC_BASE, - WIN_BASE, - _FN1, - _FN2, - _FN3 -}; - -enum custom_keycodes { - KC_MISSION_CONTROL = SAFE_RANGE, - KC_LAUNCHPAD -}; - -#define KC_WAVE S(KC_GRV) -#define KC_TASK LGUI(KC_TAB) -#define KC_FLXP LGUI(KC_E) -#define KC_MCTL KC_MISSION_CONTROL -#define KC_LPAD KC_LAUNCHPAD - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [MAC_BASE] = LAYOUT_ansi_67( - 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_MUTE, - 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_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, KC_SPC, KC_RCMD, MO(_FN1), MO(_FN3), KC_LEFT, KC_DOWN, KC_RGHT), - - [WIN_BASE] = LAYOUT_ansi_67( - 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_MUTE, - 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_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_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN2), MO(_FN3), KC_LEFT, KC_DOWN, KC_RGHT), - - [_FN1] = LAYOUT_ansi_67( - KC_GRV, 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_TRNS, KC_TRNS, - RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, RGB_RMOD,RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - [_FN2] = LAYOUT_ansi_67( - KC_GRV, KC_BRID, KC_BRIU, KC_TASK, KC_FLXP, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, - RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, RGB_RMOD,RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - [_FN3] = LAYOUT_ansi_67( - KC_WAVE, 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_TRNS, - RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, RGB_RMOD,RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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] = { - [MAC_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, - [WIN_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, - [_FN1] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, - [_FN2] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, - [_FN3] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, -}; -#endif - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case KC_MISSION_CONTROL: - if (record->event.pressed) { - host_consumer_send(0x29F); - } else { - host_consumer_send(0); - } - return false; // Skip all further processing of this key - case KC_LAUNCHPAD: - if (record->event.pressed) { - host_consumer_send(0x2A0); - } else { - host_consumer_send(0); - } - return false; // Skip all further processing of this key - default: - return true; // Process all other keycodes normally - } -} diff --git a/keyboards/keychron/q2/rev_0111/keymaps/via/keymap.c b/keyboards/keychron/q2/rev_0111/keymaps/via/keymap.c deleted file mode 100644 index b6a5b5ff31..0000000000 --- a/keyboards/keychron/q2/rev_0111/keymaps/via/keymap.c +++ /dev/null @@ -1,122 +0,0 @@ -/* Copyright 2021 @ 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 <http://www.gnu.org/licenses/>. - */ - -#include QMK_KEYBOARD_H - -enum layers{ - MAC_BASE, - WIN_BASE, - _FN1, - _FN2, - _FN3 -}; - -enum custom_keycodes { - KC_MISSION_CONTROL = USER00, - KC_LAUNCHPAD, - KC_TASK, - KC_FLXP -}; - -#define KC_WAVE S(KC_GRV) -#define KC_MCTL KC_MISSION_CONTROL -#define KC_LPAD KC_LAUNCHPAD - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [MAC_BASE] = 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_BSPC, KC_VOLD, KC_MUTE, KC_VOLU, - 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_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, KC_SPC, KC_RCMD, MO(_FN1), MO(_FN3), KC_LEFT, KC_DOWN, KC_RGHT), - - [WIN_BASE] = 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_BSPC, KC_VOLD, KC_MUTE, KC_VOLU, - 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_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_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN2), MO(_FN3), KC_LEFT, KC_DOWN, KC_RGHT), - - [_FN1] = LAYOUT_all( - KC_GRV, 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, RGB_RMOD,RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - [_FN2] = LAYOUT_all( - KC_GRV, KC_BRID, KC_BRIU, KC_TASK, KC_FLXP, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, RGB_RMOD,RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - [_FN3] = LAYOUT_all( - KC_WAVE, 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_TRNS, KC_TRNS, KC_TRNS, - RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, RGB_RMOD,RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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] = { - [MAC_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, - [WIN_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, - [_FN1] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, - [_FN2] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, - [_FN3] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, -}; -#endif - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case KC_MISSION_CONTROL: - if (record->event.pressed) { - host_consumer_send(0x29F); - } else { - host_consumer_send(0); - } - return false; // Skip all further processing of this key - case KC_LAUNCHPAD: - if (record->event.pressed) { - host_consumer_send(0x2A0); - } else { - host_consumer_send(0); - } - return false; // Skip all further processing of this key - case KC_TASK: - if (record->event.pressed) { - register_code(KC_LWIN); - register_code(KC_TAB); - } else { - unregister_code(KC_LWIN); - unregister_code(KC_TAB); - } - return false; // Skip all further processing of this key - case KC_FLXP: - if (record->event.pressed) { - register_code(KC_LWIN); - register_code(KC_E); - } else { - unregister_code(KC_LWIN); - unregister_code(KC_E); - } - return false; // Skip all further processing of this key - default: - return true; // Process all other keycodes normally - } -} diff --git a/keyboards/keychron/q2/rev_0111/rev_0111.h b/keyboards/keychron/q2/rev_0111/rev_0111.h deleted file mode 100644 index 5033db61fc..0000000000 --- a/keyboards/keychron/q2/rev_0111/rev_0111.h +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright 2021 @ 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 <http://www.gnu.org/licenses/>. - */ - -#pragma once - -#include "quantum.h" - -#define XXX KC_NO - -#define LAYOUT_all( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K47, K0E, K48, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E,\ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E,\ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, \ - K40, K41, K42, K46, K4A, K4B, K4C, K4D, K2C, K4E \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, }, \ - { K30, XXX, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D, K3E, }, \ - { K40, K41, K42, XXX, XXX, XXX, K46, K47, K48, XXX, K4A, K4B, K4C, K4D, K4E, } \ -} -#define LAYOUT_ansi_67( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E,\ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E,\ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E,\ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, \ - K40, K41, K42, K46, K4A, K4B, K4C, K4D, K2C, K4E \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, }, \ - { K30, XXX, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D, K3E, }, \ - { K40, K41, K42, XXX, XXX, XXX, K46, XXX, XXX, XXX, K4A, K4B, K4C, K4D, K4E, } \ -} diff --git a/keyboards/keychron/q2/rev_0112/info.json b/keyboards/keychron/q2/rev_0112/info.json deleted file mode 100644 index 3670c87688..0000000000 --- a/keyboards/keychron/q2/rev_0112/info.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "keyboard_name": "Q2", - "manufacturer": "Keychron", - "url": "https://github.com/Keychron", - "maintainer": "lalalademaxiya1", - "usb": { - "vid": "0x3434", - "pid": "0x0112", - "device_version": "1.0.0" - }, - "layouts": { - "LAYOUT_iso_68": { - "layout": [ - {"label":"Esc", "x":0, "y":0.25}, - {"label":"1!", "x":1, "y":0.25}, - {"label":"2\"", "x":2, "y":0.25}, - {"label":"3\u00a3", "x":3, "y":0.25}, - {"label":"4$", "x":4, "y":0.25}, - {"label":"5%", "x":5, "y":0.25}, - {"label":"6^", "x":6, "y":0.25}, - {"label":"7&", "x":7, "y":0.25}, - {"label":"8*", "x":8, "y":0.25}, - {"label":"9(", "x":9, "y":0.25}, - {"label":"0)", "x":10, "y":0.25}, - {"label":"-_", "x":11, "y":0.25}, - {"label":"=+", "x":12, "y":0.25}, - {"label":"Backspace", "x":13, "y":0.25, "w":2}, - {"label":"Insert", "x":15.25, "y":0}, - - {"label":"Tab", "x":0, "y":1.25, "w":1.5}, - {"label":"Q", "x":1.5, "y":1.25}, - {"label":"W", "x":2.5, "y":1.25}, - {"label":"E", "x":3.5, "y":1.25}, - {"label":"R", "x":4.5, "y":1.25}, - {"label":"T", "x":5.5, "y":1.25}, - {"label":"Y", "x":6.5, "y":1.25}, - {"label":"U", "x":7.5, "y":1.25}, - {"label":"I", "x":8.5, "y":1.25}, - {"label":"O", "x":9.5, "y":1.25}, - {"label":"P", "x":10.5, "y":1.25}, - {"label":"[{", "x":11.5, "y":1.25}, - {"label":"]}", "x":12.5, "y":1.25}, - {"label":"Delete", "x":15.25, "y":1.25}, - - {"label":"Caps Lock", "x":0, "y":2.25, "w":1.75}, - {"label":"A", "x":1.75, "y":2.25}, - {"label":"S", "x":2.75, "y":2.25}, - {"label":"D", "x":3.75, "y":2.25}, - {"label":"F", "x":4.75, "y":2.25}, - {"label":"G", "x":5.75, "y":2.25}, - {"label":"H", "x":6.75, "y":2.25}, - {"label":"J", "x":7.75, "y":2.25}, - {"label":"K", "x":8.75, "y":2.25}, - {"label":"L", "x":9.75, "y":2.25}, - {"label":";:", "x":10.75, "y":2.25}, - {"label":"'@", "x":11.75, "y":2.25}, - {"label":"#~", "x":12.75, "y":2.25}, - {"label":"Enter", "x":13.75, "y":1.25, "w":1.25, "h":2}, - {"label":"Home", "x":15.25, "y":2.25}, - - {"label":"Shift", "x":0, "y":3.25, "w":1.25}, - {"label":"\\|", "x":1.25, "y":3.25}, - {"label":"Z", "x":2.25, "y":3.25}, - {"label":"X", "x":3.25, "y":3.25}, - {"label":"C", "x":4.25, "y":3.25}, - {"label":"V", "x":5.25, "y":3.25}, - {"label":"B", "x":6.25, "y":3.25}, - {"label":"N", "x":7.25, "y":3.25}, - {"label":"M", "x":8.25, "y":3.25}, - {"label":",<", "x":9.25, "y":3.25}, - {"label":".>", "x":10.25, "y":3.25}, - {"label":"/?", "x":11.25, "y":3.25}, - {"label":"Shift", "x":12.25, "y":3.25, "w":1.75}, - {"label":"Up", "x":14.25, "y":3.5}, - - {"label":"Ctrl", "x":0, "y":4.25, "w":1.25}, - {"label":"Win", "x":1.25, "y":4.25, "w":1.25}, - {"label":"Alt", "x":2.5, "y":4.25, "w":1.25}, - {"label":"Space", "x":3.75, "y":4.25, "w":6.25}, - {"label":"Alt", "x":10, "y":4.25}, - {"label":"Fn1", "x":11, "y":4.25}, - {"label":"Fn2", "x":12, "y":4.25}, - {"label":"Left", "x":13.25, "y":4.5}, - {"label":"Down", "x":14.25, "y":4.5}, - {"label":"Right", "x":15.25, "y":4.5} - ] - } - } -} diff --git a/keyboards/keychron/q2/rev_0112/keymaps/default/keymap.c b/keyboards/keychron/q2/rev_0112/keymaps/default/keymap.c deleted file mode 100644 index 21a837c1a0..0000000000 --- a/keyboards/keychron/q2/rev_0112/keymaps/default/keymap.c +++ /dev/null @@ -1,94 +0,0 @@ -/* Copyright 2021 @ 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 <http://www.gnu.org/licenses/>. - */ - -#include QMK_KEYBOARD_H - -enum layers{ - MAC_BASE, - WIN_BASE, - _FN1, - _FN2, - _FN3 -}; - -enum custom_keycodes { - KC_MISSION_CONTROL = SAFE_RANGE, - KC_LAUNCHPAD -}; - -#define KC_WAVE S(KC_GRV) -#define KC_TASK LGUI(KC_TAB) -#define KC_FLXP LGUI(KC_E) -#define KC_MCTL KC_MISSION_CONTROL -#define KC_LPAD KC_LAUNCHPAD - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [MAC_BASE] = LAYOUT_iso_68( - 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_INS, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, - KC_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_HOME, - KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, - KC_LCTL, KC_LOPT, KC_LCMD, KC_SPC, KC_RCMD, MO(_FN1), MO(_FN3), KC_LEFT, KC_DOWN, KC_RGHT), - - [WIN_BASE] = LAYOUT_iso_68( - 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_INS, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, - KC_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_HOME, - KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN2), MO(_FN3), KC_LEFT, KC_DOWN, KC_RGHT), - - [_FN1] = LAYOUT_iso_68( - KC_GRV, 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_TRNS, KC_TRNS, - RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, RGB_RMOD,RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - [_FN2] = LAYOUT_iso_68( - KC_GRV, KC_BRID, KC_BRIU, KC_TASK, KC_FLXP, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, - RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, RGB_RMOD,RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - [_FN3] = LAYOUT_iso_68( - KC_WAVE, 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_TRNS, - RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, RGB_RMOD,RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) -}; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case KC_MISSION_CONTROL: - if (record->event.pressed) { - host_consumer_send(0x29F); - } else { - host_consumer_send(0); - } - return false; // Skip all further processing of this key - case KC_LAUNCHPAD: - if (record->event.pressed) { - host_consumer_send(0x2A0); - } else { - host_consumer_send(0); - } - return false; // Skip all further processing of this key - default: - return true; // Process all other keycodes normally - } -} diff --git a/keyboards/keychron/q2/rev_0112/keymaps/via/keymap.c b/keyboards/keychron/q2/rev_0112/keymaps/via/keymap.c deleted file mode 100644 index 9eb7288dc1..0000000000 --- a/keyboards/keychron/q2/rev_0112/keymaps/via/keymap.c +++ /dev/null @@ -1,112 +0,0 @@ -/* Copyright 2021 @ 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 <http://www.gnu.org/licenses/>. - */ - -#include QMK_KEYBOARD_H - -enum layers{ - MAC_BASE, - WIN_BASE, - _FN1, - _FN2, - _FN3 -}; - -enum custom_keycodes { - KC_MISSION_CONTROL = USER00, - KC_LAUNCHPAD, - KC_TASK, - KC_FLXP -}; - -#define KC_WAVE S(KC_GRV) -#define KC_MCTL KC_MISSION_CONTROL -#define KC_LPAD KC_LAUNCHPAD - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [MAC_BASE] = LAYOUT_iso_68( - 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_INS, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, - KC_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_HOME, - KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, - KC_LCTL, KC_LOPT, KC_LCMD, KC_SPC, KC_RCMD, MO(_FN1), MO(_FN3), KC_LEFT, KC_DOWN, KC_RGHT), - - [WIN_BASE] = LAYOUT_iso_68( - 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_INS, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, - KC_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_HOME, - KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN2), MO(_FN3), KC_LEFT, KC_DOWN, KC_RGHT), - - [_FN1] = LAYOUT_iso_68( - KC_GRV, 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_TRNS, KC_TRNS, - RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, RGB_RMOD,RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - [_FN2] = LAYOUT_iso_68( - KC_GRV, KC_BRID, KC_BRIU, KC_TASK, KC_FLXP, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, - RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, RGB_RMOD,RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - [_FN3] = LAYOUT_iso_68( - KC_WAVE, 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_TRNS, - RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, RGB_RMOD,RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) -}; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case KC_MISSION_CONTROL: - if (record->event.pressed) { - host_consumer_send(0x29F); - } else { - host_consumer_send(0); - } - return false; // Skip all further processing of this key - case KC_LAUNCHPAD: - if (record->event.pressed) { - host_consumer_send(0x2A0); - } else { - host_consumer_send(0); - } - return false; // Skip all further processing of this key - case KC_TASK: - if (record->event.pressed) { - register_code(KC_LWIN); - register_code(KC_TAB); - } else { - unregister_code(KC_LWIN); - unregister_code(KC_TAB); - } - return false; // Skip all further processing of this key - case KC_FLXP: - if (record->event.pressed) { - register_code(KC_LWIN); - register_code(KC_E); - } else { - unregister_code(KC_LWIN); - unregister_code(KC_E); - } - return false; // Skip all further processing of this key - default: - return true; // Process all other keycodes normally - } -} diff --git a/keyboards/keychron/q2/rev_0112/keymaps/via/rules.mk b/keyboards/keychron/q2/rev_0112/keymaps/via/rules.mk deleted file mode 100644 index bee21da528..0000000000 --- a/keyboards/keychron/q2/rev_0112/keymaps/via/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -VIA_ENABLE = yes -MOUSEKEY_ENABLE = no
\ No newline at end of file diff --git a/keyboards/keychron/q2/rev_0112/rev_0112.h b/keyboards/keychron/q2/rev_0112/rev_0112.h deleted file mode 100644 index 2ab66fb847..0000000000 --- a/keyboards/keychron/q2/rev_0112/rev_0112.h +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright 2021 @ 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 <http://www.gnu.org/licenses/>. - */ - -#pragma once - -#include "quantum.h" - -#define XXX KC_NO - -#define LAYOUT_iso_68( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E,\ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E,\ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K1D, K2E,\ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, \ - K40, K41, K42, K46, K4A, K4B, K4C, K4D, K2C, K4E \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D, K3E, }, \ - { K40, K41, K42, XXX, XXX, XXX, K46, XXX, XXX, XXX, K4A, K4B, K4C, K4D, K4E, } \ -} - diff --git a/keyboards/keychron/q2/rev_0113/info.json b/keyboards/keychron/q2/rev_0113/info.json deleted file mode 100644 index 297096aac3..0000000000 --- a/keyboards/keychron/q2/rev_0113/info.json +++ /dev/null @@ -1,167 +0,0 @@ -{ - "keyboard_name": "Q2", - "manufacturer": "Keychron", - "url": "https://github.com/Keychron", - "maintainer": "lalalademaxiya1", - "usb": { - "vid": "0x3434", - "pid": "0x0113", - "device_version": "1.0.0" - }, - "layouts": { - "LAYOUT_iso_68": { - "layout": [ - {"label":"Esc", "x":0, "y":0.25}, - {"label":"1!", "x":1, "y":0.25}, - {"label":"2\"", "x":2, "y":0.25}, - {"label":"3\u00a3", "x":3, "y":0.25}, - {"label":"4$", "x":4, "y":0.25}, - {"label":"5%", "x":5, "y":0.25}, - {"label":"6^", "x":6, "y":0.25}, - {"label":"7&", "x":7, "y":0.25}, - {"label":"8*", "x":8, "y":0.25}, - {"label":"9(", "x":9, "y":0.25}, - {"label":"0)", "x":10, "y":0.25}, - {"label":"-_", "x":11, "y":0.25}, - {"label":"=+", "x":12, "y":0.25}, - {"label":"Backspace", "x":13, "y":0.25, "w":2}, - {"label":"Mute", "x":15.25, "y":0}, - - {"label":"Tab", "x":0, "y":1.25, "w":1.5}, - {"label":"Q", "x":1.5, "y":1.25}, - {"label":"W", "x":2.5, "y":1.25}, - {"label":"E", "x":3.5, "y":1.25}, - {"label":"R", "x":4.5, "y":1.25}, - {"label":"T", "x":5.5, "y":1.25}, - {"label":"Y", "x":6.5, "y":1.25}, - {"label":"U", "x":7.5, "y":1.25}, - {"label":"I", "x":8.5, "y":1.25}, - {"label":"O", "x":9.5, "y":1.25}, - {"label":"P", "x":10.5, "y":1.25}, - {"label":"[{", "x":11.5, "y":1.25}, - {"label":"]}", "x":12.5, "y":1.25}, - {"label":"Delete", "x":15.25, "y":1.25}, - - {"label":"Caps Lock", "x":0, "y":2.25, "w":1.75}, - {"label":"A", "x":1.75, "y":2.25}, - {"label":"S", "x":2.75, "y":2.25}, - {"label":"D", "x":3.75, "y":2.25}, - {"label":"F", "x":4.75, "y":2.25}, - {"label":"G", "x":5.75, "y":2.25}, - {"label":"H", "x":6.75, "y":2.25}, - {"label":"J", "x":7.75, "y":2.25}, - {"label":"K", "x":8.75, "y":2.25}, - {"label":"L", "x":9.75, "y":2.25}, - {"label":";:", "x":10.75, "y":2.25}, - {"label":"'@", "x":11.75, "y":2.25}, - {"label":"#~", "x":12.75, "y":2.25}, - {"label":"Enter", "x":13.75, "y":1.25, "w":1.25, "h":2}, - {"label":"Home", "x":15.25, "y":2.25}, - - {"label":"Shift", "x":0, "y":3.25, "w":1.25}, - {"label":"\\|", "x":1.25, "y":3.25}, - {"label":"Z", "x":2.25, "y":3.25}, - {"label":"X", "x":3.25, "y":3.25}, - {"label":"C", "x":4.25, "y":3.25}, - {"label":"V", "x":5.25, "y":3.25}, - {"label":"B", "x":6.25, "y":3.25}, - {"label":"N", "x":7.25, "y":3.25}, - {"label":"M", "x":8.25, "y":3.25}, - {"label":",<", "x":9.25, "y":3.25}, - {"label":".>", "x":10.25, "y":3.25}, - {"label":"/?", "x":11.25, "y":3.25}, - {"label":"Shift", "x":12.25, "y":3.25, "w":1.75}, - {"label":"Up", "x":14.25, "y":3.5}, - - {"label":"Ctrl", "x":0, "y":4.25, "w":1.25}, - {"label":"Win", "x":1.25, "y":4.25, "w":1.25}, - {"label":"Alt", "x":2.5, "y":4.25, "w":1.25}, - {"label":"Space", "x":3.75, "y":4.25, "w":6.25}, - {"label":"Alt", "x":10, "y":4.25}, - {"label":"Fn1", "x":11, "y":4.25}, - {"label":"Fn2", "x":12, "y":4.25}, - {"label":"Left", "x":13.25, "y":4.5}, - {"label":"Down", "x":14.25, "y":4.5}, - {"label":"Right", "x":15.25, "y":4.5} - ] - }, - "LAYOUT_all": { - "layout": [ - {"label":"Esc", "x":0, "y":0.75}, - {"label":"1!", "x":1, "y":0.75}, - {"label":"2\"", "x":2, "y":0.75}, - {"label":"3\u00a3", "x":3, "y":0.75}, - {"label":"4$", "x":4, "y":0.75}, - {"label":"5%", "x":5, "y":0.75}, - {"label":"6^", "x":6, "y":0.75}, - {"label":"7&", "x":7, "y":0.75}, - {"label":"8*", "x":8, "y":0.75}, - {"label":"9(", "x":9, "y":0.75}, - {"label":"0)", "x":10, "y":0.75}, - {"label":"-_", "x":11, "y":0.75}, - {"label":"=+", "x":12, "y":0.75}, - {"label":"Backspace", "x":13, "y":0.75, "w":2}, - {"label":"CCW", "x":15.15, "y":0, "w":0.6, "h":0.5}, - {"label":"Mute", "x":15.25, "y":0.5}, - {"label":"CW", "x":15.75, "y":0, "w":0.6, "h":0.5}, - - {"label":"Tab", "x":0, "y":1.75, "w":1.5}, - {"label":"Q", "x":1.5, "y":1.75}, - {"label":"W", "x":2.5, "y":1.75}, - {"label":"E", "x":3.5, "y":1.75}, - {"label":"R", "x":4.5, "y":1.75}, - {"label":"T", "x":5.5, "y":1.75}, - {"label":"Y", "x":6.5, "y":1.75}, - {"label":"U", "x":7.5, "y":1.75}, - {"label":"I", "x":8.5, "y":1.75}, - {"label":"O", "x":9.5, "y":1.75}, - {"label":"P", "x":10.5, "y":1.75}, - {"label":"[{", "x":11.5, "y":1.75}, - {"label":"]}", "x":12.5, "y":1.75}, - {"label":"Delete", "x":15.25, "y":1.75}, - - {"label":"Caps Lock", "x":0, "y":2.75, "w":1.75}, - {"label":"A", "x":1.75, "y":2.75}, - {"label":"S", "x":2.75, "y":2.75}, - {"label":"D", "x":3.75, "y":2.75}, - {"label":"F", "x":4.75, "y":2.75}, - {"label":"G", "x":5.75, "y":2.75}, - {"label":"H", "x":6.75, "y":2.75}, - {"label":"J", "x":7.75, "y":2.75}, - {"label":"K", "x":8.75, "y":2.75}, - {"label":"L", "x":9.75, "y":2.75}, - {"label":";:", "x":10.75, "y":2.75}, - {"label":"'@", "x":11.75, "y":2.75}, - {"label":"#~", "x":12.75, "y":2.75}, - {"label":"Enter", "x":13.75, "y":1.75, "w":1.25, "h":2}, - {"label":"Home", "x":15.25, "y":2.75}, - - {"label":"Shift", "x":0, "y":3.75, "w":1.25}, - {"label":"\\|", "x":1.25, "y":3.75}, - {"label":"Z", "x":2.25, "y":3.75}, - {"label":"X", "x":3.25, "y":3.75}, - {"label":"C", "x":4.25, "y":3.75}, - {"label":"V", "x":5.25, "y":3.75}, - {"label":"B", "x":6.25, "y":3.75}, - {"label":"N", "x":7.25, "y":3.75}, - {"label":"M", "x":8.25, "y":3.75}, - {"label":",<", "x":9.25, "y":3.75}, - {"label":".>", "x":10.25, "y":3.75}, - {"label":"/?", "x":11.25, "y":3.75}, - {"label":"Shift", "x":12.25, "y":3.75, "w":1.75}, - {"label":"Up", "x":14.25, "y":4}, - - {"label":"Ctrl", "x":0, "y":4.75, "w":1.25}, - {"label":"Win", "x":1.25, "y":4.75, "w":1.25}, - {"label":"Alt", "x":2.5, "y":4.75, "w":1.25}, - {"label":"Space", "x":3.75, "y":4.75, "w":6.25}, - {"label":"Alt", "x":10, "y":4.75}, - {"label":"Fn1", "x":11, "y":4.75}, - {"label":"Fn2", "x":12, "y":4.75}, - {"label":"Left", "x":13.25, "y":5}, - {"label":"Down", "x":14.25, "y":5}, - {"label":"Right", "x":15.25, "y":5} - ] - } - } -} diff --git a/keyboards/keychron/q2/rev_0113/keymaps/default/keymap.c b/keyboards/keychron/q2/rev_0113/keymaps/default/keymap.c deleted file mode 100644 index 7fb7303601..0000000000 --- a/keyboards/keychron/q2/rev_0113/keymaps/default/keymap.c +++ /dev/null @@ -1,104 +0,0 @@ -/* Copyright 2021 @ 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 <http://www.gnu.org/licenses/>. - */ - -#include QMK_KEYBOARD_H - -enum layers{ - MAC_BASE, - WIN_BASE, - _FN1, - _FN2, - _FN3 -}; - -enum custom_keycodes { - KC_MISSION_CONTROL = SAFE_RANGE, - KC_LAUNCHPAD -}; - -#define KC_WAVE S(KC_GRV) -#define KC_TASK LGUI(KC_TAB) -#define KC_FLXP LGUI(KC_E) -#define KC_MCTL KC_MISSION_CONTROL -#define KC_LPAD KC_LAUNCHPAD - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [MAC_BASE] = LAYOUT_iso_68( - 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_MUTE, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, - KC_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_HOME, - KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, - KC_LCTL, KC_LOPT, KC_LCMD, KC_SPC, KC_RCMD, MO(_FN1), MO(_FN3), KC_LEFT, KC_DOWN, KC_RGHT), - - [WIN_BASE] = LAYOUT_iso_68( - 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_MUTE, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, - KC_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_HOME, - KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN2), MO(_FN3), KC_LEFT, KC_DOWN, KC_RGHT), - - [_FN1] = LAYOUT_iso_68( - KC_GRV, 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_TRNS, KC_TRNS, - RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, RGB_RMOD,RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - [_FN2] = LAYOUT_iso_68( - KC_GRV, KC_BRID, KC_BRIU, KC_TASK, KC_FLXP, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, - RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, RGB_RMOD,RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - [_FN3] = LAYOUT_iso_68( - KC_WAVE, 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_TRNS, - RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, RGB_RMOD,RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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] = { - [MAC_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, - [WIN_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, - [_FN1] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, - [_FN2] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, - [_FN3] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, -}; -#endif - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case KC_MISSION_CONTROL: - if (record->event.pressed) { - host_consumer_send(0x29F); - } else { - host_consumer_send(0); - } - return false; // Skip all further processing of this key - case KC_LAUNCHPAD: - if (record->event.pressed) { - host_consumer_send(0x2A0); - } else { - host_consumer_send(0); - } - return false; // Skip all further processing of this key - default: - return true; // Process all other keycodes normally - } -} diff --git a/keyboards/keychron/q2/rev_0113/keymaps/via/keymap.c b/keyboards/keychron/q2/rev_0113/keymaps/via/keymap.c deleted file mode 100644 index 268173b060..0000000000 --- a/keyboards/keychron/q2/rev_0113/keymaps/via/keymap.c +++ /dev/null @@ -1,154 +0,0 @@ -/* Copyright 2021 @ 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 <http://www.gnu.org/licenses/>. - */ - -#include QMK_KEYBOARD_H - -enum layers{ - MAC_BASE, - WIN_BASE, - _FN1, - _FN2, - _FN3 -}; - -enum custom_keycodes { - KC_MISSION_CONTROL = USER00, - KC_LAUNCHPAD, - KC_TASK, - KC_FLXP -}; - -#define KC_WAVE S(KC_GRV) -#define KC_MCTL KC_MISSION_CONTROL -#define KC_LPAD KC_LAUNCHPAD - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [MAC_BASE] = 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_BSPC, KC_VOLD, KC_MUTE, KC_VOLU, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, - KC_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_HOME, - KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, - KC_LCTL, KC_LOPT, KC_LCMD, KC_SPC, KC_RCMD, MO(_FN1), MO(_FN3), KC_LEFT, KC_DOWN, KC_RGHT), - - [WIN_BASE] = 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_BSPC, KC_VOLD, KC_MUTE, KC_VOLU, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, - KC_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_HOME, - KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN2), MO(_FN3), KC_LEFT, KC_DOWN, KC_RGHT), - - [_FN1] = LAYOUT_all( - KC_GRV, 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, RGB_RMOD,RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - [_FN2] = LAYOUT_all( - KC_GRV, KC_BRID, KC_BRIU, KC_TASK, KC_FLXP, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, RGB_RMOD,RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - [_FN3] = LAYOUT_all( - KC_WAVE, 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_TRNS, KC_TRNS, KC_TRNS, - RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, RGB_RMOD,RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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(VIA_ENABLE) && defined(ENCODER_ENABLE) - -#define ENCODERS 1 -static uint8_t encoder_state[ENCODERS] = {0}; -static keypos_t encoder_cw[ENCODERS] = {{ 8, 4 }}; -static keypos_t encoder_ccw[ENCODERS] = {{ 7, 4 }}; - -void encoder_action_register(uint8_t index, bool clockwise) { - keyevent_t encoder_event = (keyevent_t) { - .key = clockwise ? encoder_cw[index] : encoder_ccw[index], - .pressed = true, - .time = (timer_read() | 1) - }; - encoder_state[index] = (clockwise ^ 1) | (clockwise << 1); - action_exec(encoder_event); -} - -void encoder_action_unregister(void) { - for (int index = 0; index < ENCODERS; ++index) { - if (encoder_state[index]) { - keyevent_t encoder_event = (keyevent_t) { - .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], - .pressed = false, - .time = (timer_read() | 1) - }; - encoder_state[index] = 0; - action_exec(encoder_event); - } - } -} - -void matrix_scan_user(void) { - encoder_action_unregister(); -} - -bool encoder_update_user(uint8_t index, bool clockwise) { - encoder_action_register(index, clockwise); - return false; -}; - -#endif - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case KC_MISSION_CONTROL: - if (record->event.pressed) { - host_consumer_send(0x29F); - } else { - host_consumer_send(0); - } - return false; // Skip all further processing of this key - case KC_LAUNCHPAD: - if (record->event.pressed) { - host_consumer_send(0x2A0); - } else { - host_consumer_send(0); - } - return false; // Skip all further processing of this key - case KC_TASK: - if (record->event.pressed) { - register_code(KC_LWIN); - register_code(KC_TAB); - } else { - unregister_code(KC_LWIN); - unregister_code(KC_TAB); - } - return false; // Skip all further processing of this key - case KC_FLXP: - if (record->event.pressed) { - register_code(KC_LWIN); - register_code(KC_E); - } else { - unregister_code(KC_LWIN); - unregister_code(KC_E); - } - return false; // Skip all further processing of this key - default: - return true; // Process all other keycodes normally - } -} diff --git a/keyboards/keychron/q2/rev_0113/keymaps/via/rules.mk b/keyboards/keychron/q2/rev_0113/keymaps/via/rules.mk deleted file mode 100644 index bee21da528..0000000000 --- a/keyboards/keychron/q2/rev_0113/keymaps/via/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -VIA_ENABLE = yes -MOUSEKEY_ENABLE = no
\ No newline at end of file diff --git a/keyboards/keychron/q2/rev_0113/rev_0113.h b/keyboards/keychron/q2/rev_0113/rev_0113.h deleted file mode 100644 index 3b0b2d3377..0000000000 --- a/keyboards/keychron/q2/rev_0113/rev_0113.h +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright 2021 @ 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 <http://www.gnu.org/licenses/>. - */ - -#pragma once - -#include "quantum.h" - -#define XXX KC_NO - -#define LAYOUT_all( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K47, K0E, K48,\ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E,\ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K1D, K2E,\ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, \ - K40, K41, K42, K46, K4A, K4B, K4C, K4D, K2C, K4E \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D, K3E, }, \ - { K40, K41, K42, XXX, XXX, XXX, K46, K47, K48, XXX, K4A, K4B, K4C, K4D, K4E, } \ -} -#define LAYOUT_iso_68( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E,\ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E,\ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K1D, K2E,\ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, \ - K40, K41, K42, K46, K4A, K4B, K4C, K4D, K2C, K4E \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D, K3E, }, \ - { K40, K41, K42, XXX, XXX, XXX, K46, XXX, XXX, XXX, K4A, K4B, K4C, K4D, K4E, } \ -} |