aboutsummaryrefslogtreecommitdiff
path: root/keyboards/keychron/q2/rev_0112
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/keychron/q2/rev_0112')
-rw-r--r--keyboards/keychron/q2/rev_0112/config.h21
-rw-r--r--keyboards/keychron/q2/rev_0112/info.json83
-rw-r--r--keyboards/keychron/q2/rev_0112/keymaps/default/keymap.c94
-rw-r--r--keyboards/keychron/q2/rev_0112/keymaps/via/keymap.c112
-rw-r--r--keyboards/keychron/q2/rev_0112/keymaps/via/rules.mk2
-rw-r--r--keyboards/keychron/q2/rev_0112/readme.md1
-rw-r--r--keyboards/keychron/q2/rev_0112/rev_0112.c17
-rw-r--r--keyboards/keychron/q2/rev_0112/rev_0112.h36
-rw-r--r--keyboards/keychron/q2/rev_0112/rules.mk34
9 files changed, 400 insertions, 0 deletions
diff --git a/keyboards/keychron/q2/rev_0112/config.h b/keyboards/keychron/q2/rev_0112/config.h
new file mode 100644
index 000000000..b76640d65
--- /dev/null
+++ b/keyboards/keychron/q2/rev_0112/config.h
@@ -0,0 +1,21 @@
1/* Copyright 2021 @ Keychron (https://www.keychron.com)
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#pragma once
18
19/* USB Device descriptor parameter */
20#define PRODUCT_ID 0x0112
21#define DEVICE_VER 0x0100
diff --git a/keyboards/keychron/q2/rev_0112/info.json b/keyboards/keychron/q2/rev_0112/info.json
new file mode 100644
index 000000000..83a7addfe
--- /dev/null
+++ b/keyboards/keychron/q2/rev_0112/info.json
@@ -0,0 +1,83 @@
1{
2 "keyboard_name": "Keychron Q2",
3 "url": "https://github.com/Keychron",
4 "maintainer": "lalalademaxiya1",
5 "layouts": {
6 "LAYOUT_iso_68": {
7 "layout": [
8 {"label":"Insert", "x":15.25, "y":0},
9
10 {"label":"Esc", "x":0, "y":0.25},
11 {"label":"!", "x":1, "y":0.25},
12 {"label":"@", "x":2, "y":0.25},
13 {"label":"", "x":3, "y":0.25},
14 {"label":"$", "x":4, "y":0.25},
15 {"label":"%", "x":5, "y":0.25},
16 {"label":"^", "x":6, "y":0.25},
17 {"label":"&", "x":7, "y":0.25},
18 {"label":"*", "x":8, "y":0.25},
19 {"label":"(", "x":9, "y":0.25},
20 {"label":")", "x":10, "y":0.25},
21 {"label":"_", "x":11, "y":0.25},
22 {"label":"+", "x":12, "y":0.25},
23 {"label":"Backspace", "x":13, "y":0.25, "w":2},
24
25 {"label":"Tab", "x":0, "y":1.25, "w":1.5},
26 {"label":"Q", "x":1.5, "y":1.25},
27 {"label":"W", "x":2.5, "y":1.25},
28 {"label":"E", "x":3.5, "y":1.25},
29 {"label":"R", "x":4.5, "y":1.25},
30 {"label":"T", "x":5.5, "y":1.25},
31 {"label":"Y", "x":6.5, "y":1.25},
32 {"label":"U", "x":7.5, "y":1.25},
33 {"label":"I", "x":8.5, "y":1.25},
34 {"label":"O", "x":9.5, "y":1.25},
35 {"label":"P", "x":10.5, "y":1.25},
36 {"label":"{", "x":11.5, "y":1.25},
37 {"label":"}", "x":12.5, "y":1.25},
38 {"label":"Delete", "x":15.25, "y":1.25},
39
40 {"label":"Caps Lock", "x":0, "y":2.25, "w":1.75},
41 {"label":"A", "x":1.75, "y":2.25},
42 {"label":"S", "x":2.75, "y":2.25},
43 {"label":"D", "x":3.75, "y":2.25},
44 {"label":"F", "x":4.75, "y":2.25},
45 {"label":"G", "x":5.75, "y":2.25},
46 {"label":"H", "x":6.75, "y":2.25},
47 {"label":"J", "x":7.75, "y":2.25},
48 {"label":"K", "x":8.75, "y":2.25},
49 {"label":"L", "x":9.75, "y":2.25},
50 {"label":":", "x":10.75, "y":2.25},
51 {"label":"\"", "x":11.75, "y":2.25},
52 {"label":"#~", "x":12.75, "y":2.25},
53 {"label":"Enter", "x":13.75, "y":2.25, "w":1.25}
54 {"label":"Home", "x":15.25, "y":2.25},
55
56 {"label":"Shift", "x":0, "y":3.25, "w":1.25},
57 {"label":"|", "x":1.25, "y":3.25},
58 {"label":"Z", "x":2.25, "y":3.25},
59 {"label":"X", "x":3.25, "y":3.25},
60 {"label":"C", "x":4.25, "y":3.25},
61 {"label":"V", "x":5.25, "y":3.25},
62 {"label":"B", "x":6.25, "y":3.25},
63 {"label":"N", "x":7.25, "y":3.25},
64 {"label":"M", "x":8.25, "y":3.25},
65 {"label":"<", "x":9.25, "y":3.25},
66 {"label":">", "x":10.25, "y":3.25},
67 {"label":"?", "x":11.25, "y":3.25},
68 {"label":"Shift", "x":12.25, "y":3.25, "w":1.75},
69 {"label":"Up", "x":14.25, "y":3.5},
70
71 {"label":"Ctrl", "x":0, "y":4.25, "w":1.25},
72 {"label":"Win", "x":1.25, "y":4.25, "w":1.25},
73 {"label":"Alt", "x":2.5, "y":4.25, "w":1.25},
74 {"label":"Space", "x":3.75, "y":4.25, "w":6.25},
75 {"label":"Alt", "x":10, "y":4.25},
76 {"label":"Fn1", "x":11, "y":4.25},
77 {"label":"Fn2", "x":12, "y":4.25},
78 {"label":"Left", "x":13.25, "y":4.5},
79 {"label":"Down", "x":14.25, "y":4.5},
80 {"label":"Right", "x":15.25, "y":4.5} ]
81 }
82 }
83}
diff --git a/keyboards/keychron/q2/rev_0112/keymaps/default/keymap.c b/keyboards/keychron/q2/rev_0112/keymaps/default/keymap.c
new file mode 100644
index 000000000..75667b44c
--- /dev/null
+++ b/keyboards/keychron/q2/rev_0112/keymaps/default/keymap.c
@@ -0,0 +1,94 @@
1/* Copyright 2021 @ Keychron (https://www.keychron.com)
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include QMK_KEYBOARD_H
18
19enum layers{
20 MAC_BASE,
21 WIN_BASE,
22 _FN1,
23 _FN2,
24 _FN3
25};
26
27enum custom_keycodes {
28 KC_MISSION_CONTROL = SAFE_RANGE,
29 KC_LAUNCHPAD
30};
31
32#define KC_WAVE S(KC_GRV)
33#define KC_TASK LGUI(KC_TAB)
34#define KC_FLXP LGUI(KC_E)
35#define KC_MCTL KC_MISSION_CONTROL
36#define KC_LPAD KC_LAUNCHPAD
37
38const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
39 [MAC_BASE] = LAYOUT_iso_68(
40 KC_ESC, KC_1, KC_2, KC_F3, KC_F4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS,
41 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,
42 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,
43 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,
44 KC_LCTL, KC_LOPT, KC_LCMD, KC_SPC, KC_RCMD, MO(_FN1), MO(_FN3), KC_LEFT, KC_DOWN, KC_RGHT),
45
46 [WIN_BASE] = LAYOUT_iso_68(
47 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,
48 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,
49 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,
50 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,
51 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN2), MO(_FN3), KC_LEFT, KC_DOWN, KC_RGHT),
52
53 [_FN1] = LAYOUT_iso_68(
54 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,
55 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,
56 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,
57 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
58 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
59
60 [_FN2] = LAYOUT_iso_68(
61 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,
62 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,
63 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,
64 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
65 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
66
67 [_FN3] = LAYOUT_iso_68(
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,
69 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,
70 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,
71 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
72 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
73};
74
75bool process_record_user(uint16_t keycode, keyrecord_t *record) {
76 switch (keycode) {
77 case KC_MISSION_CONTROL:
78 if (record->event.pressed) {
79 host_consumer_send(0x29F);
80 } else {
81 host_consumer_send(0);
82 }
83 return false; // Skip all further processing of this key
84 case KC_LAUNCHPAD:
85 if (record->event.pressed) {
86 host_consumer_send(0x2A0);
87 } else {
88 host_consumer_send(0);
89 }
90 return false; // Skip all further processing of this key
91 default:
92 return true; // Process all other keycodes normally
93 }
94}
diff --git a/keyboards/keychron/q2/rev_0112/keymaps/via/keymap.c b/keyboards/keychron/q2/rev_0112/keymaps/via/keymap.c
new file mode 100644
index 000000000..0a91857f1
--- /dev/null
+++ b/keyboards/keychron/q2/rev_0112/keymaps/via/keymap.c
@@ -0,0 +1,112 @@
1/* Copyright 2021 @ Keychron (https://www.keychron.com)
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include QMK_KEYBOARD_H
18
19enum layers{
20 MAC_BASE,
21 WIN_BASE,
22 _FN1,
23 _FN2,
24 _FN3
25};
26
27enum custom_keycodes {
28 KC_MISSION_CONTROL = USER00,
29 KC_LAUNCHPAD,
30 KC_TASK,
31 KC_FLXP
32};
33
34#define KC_WAVE S(KC_GRV)
35#define KC_MCTL KC_MISSION_CONTROL
36#define KC_LPAD KC_LAUNCHPAD
37
38const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
39 [MAC_BASE] = LAYOUT_iso_68(
40 KC_ESC, KC_1, KC_2, KC_F3, KC_F4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS,
41 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,
42 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,
43 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,
44 KC_LCTL, KC_LOPT, KC_LCMD, KC_SPC, KC_RCMD, MO(_FN1), MO(_FN3), KC_LEFT, KC_DOWN, KC_RGHT),
45
46 [WIN_BASE] = LAYOUT_iso_68(
47 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,
48 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,
49 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,
50 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,
51 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN2), MO(_FN3), KC_LEFT, KC_DOWN, KC_RGHT),
52
53 [_FN1] = LAYOUT_iso_68(
54 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,
55 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,
56 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,
57 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
58 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
59
60 [_FN2] = LAYOUT_iso_68(
61 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,
62 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,
63 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,
64 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
65 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
66
67 [_FN3] = LAYOUT_iso_68(
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,
69 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,
70 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,
71 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
72 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
73};
74
75bool process_record_user(uint16_t keycode, keyrecord_t *record) {
76 switch (keycode) {
77 case KC_MISSION_CONTROL:
78 if (record->event.pressed) {
79 host_consumer_send(0x29F);
80 } else {
81 host_consumer_send(0);
82 }
83 return false; // Skip all further processing of this key
84 case KC_LAUNCHPAD:
85 if (record->event.pressed) {
86 host_consumer_send(0x2A0);
87 } else {
88 host_consumer_send(0);
89 }
90 return false; // Skip all further processing of this key
91 case KC_TASK:
92 if (record->event.pressed) {
93 register_code(KC_LWIN);
94 register_code(KC_TAB);
95 } else {
96 unregister_code(KC_LWIN);
97 unregister_code(KC_TAB);
98 }
99 return false; // Skip all further processing of this key
100 case KC_FLXP:
101 if (record->event.pressed) {
102 register_code(KC_LWIN);
103 register_code(KC_E);
104 } else {
105 unregister_code(KC_LWIN);
106 unregister_code(KC_E);
107 }
108 return false; // Skip all further processing of this key
109 default:
110 return true; // Process all other keycodes normally
111 }
112}
diff --git a/keyboards/keychron/q2/rev_0112/keymaps/via/rules.mk b/keyboards/keychron/q2/rev_0112/keymaps/via/rules.mk
new file mode 100644
index 000000000..bee21da52
--- /dev/null
+++ b/keyboards/keychron/q2/rev_0112/keymaps/via/rules.mk
@@ -0,0 +1,2 @@
1VIA_ENABLE = yes
2MOUSEKEY_ENABLE = no \ No newline at end of file
diff --git a/keyboards/keychron/q2/rev_0112/readme.md b/keyboards/keychron/q2/rev_0112/readme.md
new file mode 100644
index 000000000..29404e03c
--- /dev/null
+++ b/keyboards/keychron/q2/rev_0112/readme.md
@@ -0,0 +1 @@
# The ISO variant of the Keychron Q2
diff --git a/keyboards/keychron/q2/rev_0112/rev_0112.c b/keyboards/keychron/q2/rev_0112/rev_0112.c
new file mode 100644
index 000000000..d91a41fca
--- /dev/null
+++ b/keyboards/keychron/q2/rev_0112/rev_0112.c
@@ -0,0 +1,17 @@
1/* Copyright 2021 @ Keychron (https://www.keychron.com)
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include "quantum.h"
diff --git a/keyboards/keychron/q2/rev_0112/rev_0112.h b/keyboards/keychron/q2/rev_0112/rev_0112.h
new file mode 100644
index 000000000..2ab66fb84
--- /dev/null
+++ b/keyboards/keychron/q2/rev_0112/rev_0112.h
@@ -0,0 +1,36 @@
1/* Copyright 2021 @ Keychron (https://www.keychron.com)
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#pragma once
18
19#include "quantum.h"
20
21#define XXX KC_NO
22
23#define LAYOUT_iso_68( \
24 K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E,\
25 K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E,\
26 K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K1D, K2E,\
27 K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, \
28 K40, K41, K42, K46, K4A, K4B, K4C, K4D, K2C, K4E \
29) { \
30 { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, }, \
31 { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, }, \
32 { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, }, \
33 { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D, K3E, }, \
34 { K40, K41, K42, XXX, XXX, XXX, K46, XXX, XXX, XXX, K4A, K4B, K4C, K4D, K4E, } \
35}
36
diff --git a/keyboards/keychron/q2/rev_0112/rules.mk b/keyboards/keychron/q2/rev_0112/rules.mk
new file mode 100644
index 000000000..0d4e74501
--- /dev/null
+++ b/keyboards/keychron/q2/rev_0112/rules.mk
@@ -0,0 +1,34 @@
1# MCU name
2# MCU = STM32L432
3MCU = cortex-m4
4ARMV = 7
5MCU_FAMILY = STM32
6MCU_SERIES = STM32L4xx
7MCU_LDSCRIPT = STM32L432xB
8MCU_STARTUP = stm32l4xx
9BOARD = GENERIC_STM32_L433XC
10PLATFORM_NAME = platform_l432
11
12# Build Options
13# change yes to no to disable
14#
15BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
16MOUSEKEY_ENABLE = no # Mouse keys
17EXTRAKEY_ENABLE = yes # Audio control and System control
18CONSOLE_ENABLE = no # Console for debug
19COMMAND_ENABLE = no # Commands for debug and configuration
20NKRO_ENABLE = yes # Enable N-Key Rollover
21BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
22RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
23AUDIO_ENABLE = no # Audio output
24ENCODER_ENABLE = no # Enable Encoder
25DIP_SWITCH_ENABLE = yes
26EEPROM_DRIVER = i2c
27
28# Enter lower-power sleep mode when on the ChibiOS idle thread
29OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE
30
31# custom matrix setup
32CUSTOM_MATRIX = lite
33
34SRC += matrix.c