diff --git a/keyboards/keychron/q3/q3.c b/keyboards/keychron/q3/q3.c
index 1f79ecede361..fcf3e906f06c 100644
--- a/keyboards/keychron/q3/q3.c
+++ b/keyboards/keychron/q3/q3.c
@@ -36,6 +36,7 @@ bool dip_switch_update_kb(uint8_t index, bool active) {
return false;
}
if (index == 0) {
+ layer_state_set(1UL << (active ? 2 : 0));
default_layer_set(1UL << (active ? 2 : 0));
}
return true;
diff --git a/keyboards/keychron/q3/q3.h b/keyboards/keychron/q3/q3.h
index 905b6b8680a0..f42890c5f0a2 100644
--- a/keyboards/keychron/q3/q3.h
+++ b/keyboards/keychron/q3/q3.h
@@ -26,4 +26,6 @@
# include "rev_0122.h"
#elif defined(KEYBOARD_keychron_q3_rev_0123)
# include "rev_0123.h"
+#elif defined(KEYBOARD_keychron_q3_rev_0120_lhg)
+# include "rev_0120_lhg.h"
#endif
diff --git a/keyboards/keychron/q3/rev_0120_lhg/config.h b/keyboards/keychron/q3/rev_0120_lhg/config.h
new file mode 100644
index 000000000000..47bd5979ed71
--- /dev/null
+++ b/keyboards/keychron/q3/rev_0120_lhg/config.h
@@ -0,0 +1,47 @@
+/* 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 .
+ */
+
+#pragma once
+
+/* USB Device descriptor parameter */
+#define PRODUCT_ID 0x0120
+#define DEVICE_VER 0x0100
+
+/* key matrix pins */
+#define MATRIX_ROW_PINS { B5, B4, B3, A15, A14, A13 }
+#define MATRIX_COL_PINS { C14, C15, A0, A1, A2, A3, A4, A5, A6, A7, B0, B1, A8, A9, A10, H3 }
+
+/* We uses a pin with a stronger pull resistor than the internal MCU pins */
+// #define MATRIX_UNSELECT_DRIVE_HIGH
+
+/* RGB Matrix Configuration */
+#define DRIVER_1_LED_TOTAL 48
+#define DRIVER_2_LED_TOTAL 39
+#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
+
+/* Enable CapsLcok LED */
+#define CAPS_LOCK_LED_INDEX 50
+
+// setup 5 layers
+// 0: Mac
+// 1: Mac function
+// 2: Windows
+// 3: Left Handed Gaming
+// 4: Windows Function
+#define DYNAMIC_KEYMAP_LAYER_COUNT 5
+
+#define RGB_MATRIX_KEYPRESSES
+#define RGB_MATRIX_KEYRELEASES
diff --git a/keyboards/keychron/q3/rev_0120_lhg/info.json b/keyboards/keychron/q3/rev_0120_lhg/info.json
new file mode 100644
index 000000000000..f540d9e637c1
--- /dev/null
+++ b/keyboards/keychron/q3/rev_0120_lhg/info.json
@@ -0,0 +1,103 @@
+{
+ "keyboard_name": "Keychron Q3",
+ "url": "https://github.com/Keychron",
+ "maintainer": "lalalademaxiya1",
+ "layouts": {
+ "LAYOUT_ansi_87": {
+ "layout": [
+ {"label":"Esc", "x":0, "y":0},
+ {"label":"F1", "x":2, "y":0},
+ {"label":"F2", "x":3, "y":0},
+ {"label":"F3", "x":4, "y":0},
+ {"label":"F4", "x":5, "y":0},
+ {"label":"F5", "x":6.5, "y":0},
+ {"label":"F5", "x":7.5, "y":0},
+ {"label":"F7", "x":8.5, "y":0},
+ {"label":"F8", "x":9.5, "y":0},
+ {"label":"F9", "x":11, "y":0},
+ {"label":"F10", "x":12, "y":0},
+ {"label":"F11", "x":13, "y":0},
+ {"label":"F12", "x":14, "y":0},
+ {"label":"Print", "x":15.25, "y":0},
+ {"label":"Cortana", "x":16.25, "y":0},
+ {"label":"Light", "x":17.25, "y":0},
+
+ {"label":"`~", "x":0, "y":1.25},
+ {"label":"1!", "x":1, "y":1.25},
+ {"label":"2@", "x":2, "y":1.25},
+ {"label":"3#", "x":3, "y":1.25},
+ {"label":"4$", "x":4, "y":1.25},
+ {"label":"5%", "x":5, "y":1.25},
+ {"label":"6^", "x":6, "y":1.25},
+ {"label":"7&", "x":7, "y":1.25},
+ {"label":"8*", "x":8, "y":1.25},
+ {"label":"9(", "x":9, "y":1.25},
+ {"label":"0)", "x":10, "y":1.25},
+ {"label":"-_", "x":11, "y":1.25},
+ {"label":"=+", "x":12, "y":1.25},
+ {"label":"Backspace", "x":13, "y":1.25, "w":2},
+ {"label":"Insert", "x":15.25, "y":1.25},
+ {"label":"Home", "x":16.25, "y":1.25},
+ {"label":"Page Up", "x":17.25, "y":1.25},
+
+ {"label":"Tab", "x":0, "y":2.25, "w":1.5},
+ {"label":"Q", "x":1.5, "y":2.25},
+ {"label":"W", "x":2.5, "y":2.25},
+ {"label":"E", "x":3.5, "y":2.25},
+ {"label":"R", "x":4.5, "y":2.25},
+ {"label":"T", "x":5.5, "y":2.25},
+ {"label":"Y", "x":6.5, "y":2.25},
+ {"label":"U", "x":7.5, "y":2.25},
+ {"label":"I", "x":8.5, "y":2.25},
+ {"label":"O", "x":9.5, "y":2.25},
+ {"label":"P", "x":10.5, "y":2.25},
+ {"label":"[{", "x":11.5, "y":2.25},
+ {"label":"]}", "x":12.5, "y":2.25},
+ {"label":"\\|", "x":13.5, "y":2.25, "w":1.5},
+ {"label":"Delete", "x":15.25, "y":2.25},
+ {"label":"End", "x":16.25, "y":2.25},
+ {"label":"Page Down", "x":17.25, "y":2.25},
+
+ {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75},
+ {"label":"A", "x":1.75, "y":3.25},
+ {"label":"S", "x":2.75, "y":3.25},
+ {"label":"D", "x":3.75, "y":3.25},
+ {"label":"F", "x":4.75, "y":3.25},
+ {"label":"G", "x":5.75, "y":3.25},
+ {"label":"H", "x":6.75, "y":3.25},
+ {"label":"J", "x":7.75, "y":3.25},
+ {"label":"K", "x":8.75, "y":3.25},
+ {"label":"L", "x":9.75, "y":3.25},
+ {"label":";:", "x":10.75, "y":3.25},
+ {"label":"'\"", "x":11.75, "y":3.25},
+ {"label":"Enter", "x":12.75, "y":3.25, "w":2.25},
+
+ {"label":"Left Shift", "x":0, "y":4.25, "w":2.25},
+ {"label":"Z", "x":2.25, "y":4.25},
+ {"label":"X", "x":3.25, "y":4.25},
+ {"label":"C", "x":4.25, "y":4.25},
+ {"label":"V", "x":5.25, "y":4.25},
+ {"label":"B", "x":6.25, "y":4.25},
+ {"label":"N", "x":7.25, "y":4.25},
+ {"label":"M", "x":8.25, "y":4.25},
+ {"label":",<", "x":9.25, "y":4.25},
+ {"label":".>", "x":10.25, "y":4.25},
+ {"label":"/?", "x":11.25, "y":4.25},
+ {"label":"Right Shift", "x":12.25, "y":4.25, "w":2.75},
+ {"label":"Up", "x":16.25, "y":4.25},
+
+ {"label":"Left Ctrl", "x":0, "y":5.25, "w":1.25}
+ {"label":"Left Win", "x":1.25, "y":5.25, "w":1.25},
+ {"label":"Left Alt", "x":2.5, "y":5.25, "w":1.25},
+ {"label":"Space", "x":3.75, "y":5.25, "w":6.25},
+ {"label":"Right Alt", "x":10, "y":5.25, "w":1.25},
+ {"label":"Right Win", "x":11.25, "y":5.25, "w":1.25},
+ {"label":"Fn", "x":12.5, "y":5.25, "w":1.25},
+ {"label":"Right Ctrl", "x":13.75, "y":5.25, "w":1.25},
+ {"label":"Left", "x":15.25, "y":5.25},
+ {"label":"Down", "x":16.25, "y":5.25},
+ {"label":"Right", "x":17.25, "y":5.25}
+ ]
+ }
+ }
+}
diff --git a/keyboards/keychron/q3/rev_0120_lhg/keymaps/default/keymap.c b/keyboards/keychron/q3/rev_0120_lhg/keymaps/default/keymap.c
new file mode 100644
index 000000000000..281f4d5f7d3f
--- /dev/null
+++ b/keyboards/keychron/q3/rev_0120_lhg/keymaps/default/keymap.c
@@ -0,0 +1,161 @@
+/* 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 .
+ */
+
+#include QMK_KEYBOARD_H
+
+enum layers{
+ MAC_BASE,
+ MAC_FN,
+ WIN_BASE,
+ WIN_FN
+};
+
+enum custom_keycodes {
+ KC_MISSION_CONTROL = SAFE_RANGE,
+ KC_LAUNCHPAD,
+ KC_LOPTN,
+ KC_ROPTN,
+ KC_LCMMD,
+ KC_RCMMD,
+ KC_SIRI,
+ KC_TASK_VIEW,
+ KC_FILE_EXPLORER,
+ KC_SCREEN_SHOT,
+ KC_CORTANA
+};
+
+#define KC_MCTL KC_MISSION_CONTROL
+#define KC_LPAD KC_LAUNCHPAD
+#define KC_TASK KC_TASK_VIEW
+#define KC_FLXP KC_FILE_EXPLORER
+#define KC_SNAP KC_SCREEN_SHOT
+#define KC_CRTA KC_CORTANA
+
+typedef struct PACKED {
+ uint8_t len;
+ uint8_t keycode[3];
+} key_combination_t;
+
+key_combination_t key_comb_list[4] = {
+ {2, {KC_LWIN, KC_TAB}},
+ {2, {KC_LWIN, KC_E}},
+ {3, {KC_LSFT, KC_LCMD, KC_4}},
+ {2, {KC_LWIN, KC_C}}
+};
+
+static uint8_t mac_keycode[4] = { KC_LOPT, KC_ROPT, KC_LCMD, KC_RCMD };
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [MAC_BASE] = LAYOUT_ansi_87(
+ KC_ESC, KC_BRID, KC_BRIU, KC_MCTL, KC_LPAD, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_SNAP, KC_SIRI, RGB_MOD,
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN,
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
+ KC_LCTL, KC_LOPTN, KC_LCMMD, KC_SPC, KC_RCMMD, KC_ROPTN,MO(MAC_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
+
+ [MAC_FN] = LAYOUT_ansi_87(
+ KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, RGB_TOG,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, NK_TOGG, KC_TRNS, 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),
+
+ [WIN_BASE] = LAYOUT_ansi_87(
+ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_CRTA, RGB_MOD,
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN,
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
+ KC_LCTL, KC_LCMD, KC_LALT, KC_SPC, KC_RALT, KC_RWIN, MO(WIN_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
+
+ [WIN_FN] = LAYOUT_ansi_87(
+ KC_TRNS, 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,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, NK_TOGG, KC_TRNS, 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),
+};
+
+uint16_t prev;
+bool siri;
+
+void matrix_scan_user(void) {
+ if (siri) {
+ if (timer_elapsed(prev) >= 500) {
+ siri = false;
+ unregister_code(KC_LCMD);
+ unregister_code(KC_SPACE);
+ }
+ }
+}
+
+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_LOPTN:
+ case KC_ROPTN:
+ case KC_LCMMD:
+ case KC_RCMMD:
+ if (record->event.pressed) {
+ register_code(mac_keycode[keycode - KC_LOPTN]);
+ } else {
+ unregister_code(mac_keycode[keycode - KC_LOPTN]);
+ }
+ return false; // Skip all further processing of this key
+ case KC_SIRI:
+ if (record->event.pressed) {
+ register_code(KC_LCMD);
+ register_code(KC_SPACE);
+ prev = timer_read() | 1;
+ siri = true;
+ } else {
+ // Do something else when release
+ }
+ return false; // Skip all further processing of this key
+ case KC_TASK:
+ case KC_FLXP:
+ case KC_SNAP:
+ case KC_CRTA:
+ if (record->event.pressed) {
+ for (uint8_t i = 0; i < key_comb_list[keycode - KC_TASK].len; i++) {
+ register_code(key_comb_list[keycode - KC_TASK].keycode[i]);
+ }
+ } else {
+ for (uint8_t i = 0; i < key_comb_list[keycode - KC_TASK].len; i++) {
+ unregister_code(key_comb_list[keycode - KC_TASK].keycode[i]);
+ }
+ }
+ return false; // Skip all further processing of this key
+ default:
+ return true; // Process all other keycodes normally
+ }
+}
diff --git a/keyboards/keychron/q3/rev_0120_lhg/keymaps/via/keymap.c b/keyboards/keychron/q3/rev_0120_lhg/keymaps/via/keymap.c
new file mode 100644
index 000000000000..fa7af4d6116d
--- /dev/null
+++ b/keyboards/keychron/q3/rev_0120_lhg/keymaps/via/keymap.c
@@ -0,0 +1,237 @@
+/* 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 .
+ */
+
+#include QMK_KEYBOARD_H
+
+enum layers{
+ MAC_BASE,
+ MAC_FN,
+ WIN_BASE,
+ LEFT_HANDED_GAMING,
+ WIN_FN
+};
+
+enum custom_keycodes {
+ KC_MISSION_CONTROL = USER00,
+ KC_LAUNCHPAD,
+ KC_LOPTN,
+ KC_ROPTN,
+ KC_LCMMD,
+ KC_RCMMD,
+ KC_SIRI,
+ KC_TASK_VIEW,
+ KC_FILE_EXPLORER,
+ KC_SCREEN_SHOT,
+ KC_CORTANA
+};
+
+#define KC_MCTL KC_MISSION_CONTROL
+#define KC_LPAD KC_LAUNCHPAD
+#define KC_TASK KC_TASK_VIEW
+#define KC_FLXP KC_FILE_EXPLORER
+#define KC_SNAP KC_SCREEN_SHOT
+#define KC_CRTA KC_CORTANA
+
+typedef struct PACKED {
+ uint8_t len;
+ uint8_t keycode[3];
+} key_combination_t;
+
+key_combination_t key_comb_list[4] = {
+ {2, {KC_LWIN, KC_TAB}},
+ {2, {KC_LWIN, KC_E}},
+ {3, {KC_LSFT, KC_LCMD, KC_4}},
+ {2, {KC_LWIN, KC_C}}
+};
+
+static uint8_t mac_keycode[4] = { KC_LOPT, KC_ROPT, KC_LCMD, KC_RCMD };
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [MAC_BASE] = LAYOUT_ansi_87(
+ KC_ESC, KC_BRID, KC_BRIU, KC_MCTL, KC_LPAD, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_SNAP, KC_SIRI, RGB_MOD,
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN,
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
+ KC_LCTL, KC_LOPTN, KC_LCMMD, KC_SPC, KC_RCMMD, KC_ROPTN,MO(MAC_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
+
+ [MAC_FN] = LAYOUT_ansi_87(
+ KC_NO , 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_NO , KC_NO , RGB_TOG,
+ KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO ,
+ RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, NK_TOGG, KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO ,
+ KC_NO , RGB_RMOD, RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO ,
+ KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO ,
+ KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO ),
+
+ [WIN_BASE] = LAYOUT_ansi_87(
+ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_CRTA, RGB_MOD,
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN,
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
+ KC_LCTL, KC_LCMD, KC_LALT, KC_SPC, KC_RALT, KC_RWIN, MO(WIN_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
+
+ [LEFT_HANDED_GAMING] = LAYOUT_ansi_87(
+ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_CRTA, RGB_MOD,
+ KC_BSPC, KC_EQL, KC_MINS, KC_0, KC_9, KC_8, KC_7, KC_6, KC_5, KC_4, KC_3, KC_2, KC_1, KC_GRV, KC_INS, KC_HOME, KC_PGUP,
+ KC_RBRC, KC_LBRC, KC_UP, KC_O, KC_I, KC_U, KC_Y, KC_T, KC_R, KC_E, KC_W, KC_Q, KC_TAB, KC_TAB, KC_DEL, KC_END, KC_PGDN,
+ KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, KC_K, KC_J, KC_H, KC_G, KC_F, KC_A, KC_S, KC_D, KC_ENT,
+ KC_RSFT, KC_SLSH, KC_DOT, KC_COMM, KC_M, KC_N, KC_B, KC_V, KC_C, KC_X, KC_Z, KC_LSFT, KC_UP,
+ KC_RCTL, KC_LCMD, KC_RALT, KC_SPC, KC_LALT, KC_RWIN, MO(WIN_FN), KC_LCTL, KC_LEFT, KC_DOWN, KC_RGHT),
+
+ [WIN_FN] = LAYOUT_ansi_87(
+ KC_NO , 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_NO , KC_NO , RGB_TOG,
+ KC_NO , TO(WIN_BASE) , TO(LEFT_HANDED_GAMING) , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO ,
+ RGB_TOG, RGB_MOD , RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, NK_TOGG, KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO ,
+ KC_NO , RGB_RMOD, RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO ,
+ KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO ,
+ KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO ),
+
+};
+
+#define WHITE {0,0,255}
+#define ORANGE {23,255,255}
+#define BLUE {170,255,255}
+#define NO_COLOR {0,0,0}
+
+const uint8_t PROGMEM rgb_matrix_led_map[][DRIVER_LED_TOTAL][5] = {
+ { // MAC_BASE
+ NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR,
+ NO_COLOR, NO_COLOR , NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR,
+ NO_COLOR, NO_COLOR , NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR,
+ NO_COLOR, NO_COLOR , NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR ,
+ NO_COLOR , NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR , NO_COLOR,
+ NO_COLOR, NO_COLOR, NO_COLOR, WHITE , NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR , NO_COLOR, NO_COLOR, NO_COLOR
+ }, { // MAC_FN
+ NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR,
+ NO_COLOR, NO_COLOR , NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR,
+ NO_COLOR, NO_COLOR , NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR,
+ NO_COLOR, NO_COLOR , NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR ,
+ NO_COLOR , NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR , NO_COLOR,
+ NO_COLOR, NO_COLOR, NO_COLOR, WHITE , NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR , NO_COLOR, NO_COLOR, NO_COLOR
+ }, { // WIN_BASE
+ NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR,
+ NO_COLOR, NO_COLOR , NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR,
+ NO_COLOR, NO_COLOR , NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR,
+ NO_COLOR, NO_COLOR , NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR ,
+ NO_COLOR , NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR , NO_COLOR,
+ NO_COLOR, NO_COLOR, NO_COLOR, ORANGE , NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR , NO_COLOR, NO_COLOR, NO_COLOR
+ }, { // LEFT_HANDED_GAMING
+ NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR,
+ NO_COLOR, NO_COLOR , BLUE , NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR,
+ NO_COLOR, BLUE , BLUE , BLUE , NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, BLUE , NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR,
+ NO_COLOR, NO_COLOR , NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, BLUE , BLUE , BLUE , NO_COLOR ,
+ NO_COLOR , NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR , BLUE ,
+ NO_COLOR, NO_COLOR, NO_COLOR, BLUE , NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR , BLUE , BLUE , BLUE
+ }, { // WIN_FN
+ NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR,
+ NO_COLOR, NO_COLOR , NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR,
+ NO_COLOR, NO_COLOR , NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR,
+ NO_COLOR, NO_COLOR , NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR ,
+ NO_COLOR , NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR , NO_COLOR,
+ NO_COLOR, NO_COLOR, NO_COLOR, ORANGE , NO_COLOR, NO_COLOR, NO_COLOR, NO_COLOR , NO_COLOR, NO_COLOR, NO_COLOR
+ }
+};
+
+void set_layer_color(int layer) {
+
+ for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
+ HSV hsv = {
+ .h = pgm_read_byte(&rgb_matrix_led_map[layer][i][0]),
+ .s = pgm_read_byte(&rgb_matrix_led_map[layer][i][1]),
+ .v = pgm_read_byte(&rgb_matrix_led_map[layer][i][2]),
+ };
+ if (!hsv.h && !hsv.s && !hsv.v) {
+ //rgb_matrix_set_color( i, 0, 0, 0 );
+ } else {
+ RGB rgb = hsv_to_rgb( hsv );
+ float f = (float)rgb_matrix_config.hsv.v / UINT8_MAX;
+ rgb_matrix_set_color( i, f * rgb.r, f * rgb.g, f * rgb.b );
+ }
+ }
+}
+
+uint16_t prev;
+bool siri;
+
+void matrix_scan_user(void) {
+ if (siri) {
+ if (timer_elapsed(prev) >= 500) {
+ siri = false;
+ unregister_code(KC_LCMD);
+ unregister_code(KC_SPACE);
+ }
+ }
+}
+
+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_LOPTN:
+ case KC_ROPTN:
+ case KC_LCMMD:
+ case KC_RCMMD:
+ if (record->event.pressed) {
+ register_code(mac_keycode[keycode - KC_LOPTN]);
+ } else {
+ unregister_code(mac_keycode[keycode - KC_LOPTN]);
+ }
+ return false; // Skip all further processing of this key
+ case KC_SIRI:
+ if (record->event.pressed) {
+ register_code(KC_LCMD);
+ register_code(KC_SPACE);
+ prev = timer_read() | 1;
+ siri = true;
+ } else {
+ // Do something else when release
+ }
+ return false; // Skip all further processing of this key
+ case KC_TASK:
+ case KC_FLXP:
+ case KC_SNAP:
+ case KC_CRTA:
+ if (record->event.pressed) {
+ for (uint8_t i = 0; i < key_comb_list[keycode - KC_TASK].len; i++) {
+ register_code(key_comb_list[keycode - KC_TASK].keycode[i]);
+ }
+ } else {
+ for (uint8_t i = 0; i < key_comb_list[keycode - KC_TASK].len; i++) {
+ unregister_code(key_comb_list[keycode - KC_TASK].keycode[i]);
+ }
+ }
+ return false; // Skip all further processing of this key
+ default:
+ return true; // Process all other keycodes normally
+ }
+}
+
+void rgb_matrix_indicators_user(void) {
+ set_layer_color(biton32(layer_state));
+}
diff --git a/keyboards/keychron/q3/rev_0120_lhg/keymaps/via/rules.mk b/keyboards/keychron/q3/rev_0120_lhg/keymaps/via/rules.mk
new file mode 100644
index 000000000000..1f4364003cbf
--- /dev/null
+++ b/keyboards/keychron/q3/rev_0120_lhg/keymaps/via/rules.mk
@@ -0,0 +1,2 @@
+VIA_ENABLE = yes
+RGB_MATRIX_ENABLE = yes
diff --git a/keyboards/keychron/q3/rev_0120_lhg/readme.md b/keyboards/keychron/q3/rev_0120_lhg/readme.md
new file mode 100644
index 000000000000..1e7ea53e233e
--- /dev/null
+++ b/keyboards/keychron/q3/rev_0120_lhg/readme.md
@@ -0,0 +1 @@
+# The ANSI variant of the Keychron Q3
diff --git a/keyboards/keychron/q3/rev_0120_lhg/rev_0120_lhg.c b/keyboards/keychron/q3/rev_0120_lhg/rev_0120_lhg.c
new file mode 100644
index 000000000000..3958f5466d8f
--- /dev/null
+++ b/keyboards/keychron/q3/rev_0120_lhg/rev_0120_lhg.c
@@ -0,0 +1,154 @@
+/* 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 .
+ */
+
+#include "quantum.h"
+
+#ifdef RGB_MATRIX_ENABLE
+
+const ckled2001_led PROGMEM g_ckled2001_leds[DRIVER_LED_TOTAL] = {
+/* Refer to IS31 manual for these locations
+ * driver
+ * | R location
+ * | | G location
+ * | | | B location
+ * | | | | */
+ {0, I_1, G_1, H_1},
+ {0, I_2, G_2, H_2},
+ {0, I_3, G_3, H_3},
+ {0, I_4, G_4, H_4},
+ {0, I_5, G_5, H_5},
+ {0, I_6, G_6, H_6},
+ {0, I_7, G_7, H_7},
+ {0, I_8, G_8, H_8},
+ {0, I_9, G_9, H_9},
+ {0, I_10, G_10, H_10},
+ {0, I_11, G_11, H_11},
+ {0, I_12, G_12, H_12},
+ {0, I_13, G_13, H_13},
+ {0, I_15, G_15, H_15},
+ {0, I_16, G_16, H_16},
+ {1, I_15, G_15, H_15},
+
+ {0, C_1, A_1, B_1},
+ {0, C_2, A_2, B_2},
+ {0, C_3, A_3, B_3},
+ {0, C_4, A_4, B_4},
+ {0, C_5, A_5, B_5},
+ {0, C_6, A_6, B_6},
+ {0, C_7, A_7, B_7},
+ {0, C_8, A_8, B_8},
+ {0, C_9, A_9, B_9},
+ {0, C_10, A_10, B_10},
+ {0, C_11, A_11, B_11},
+ {0, C_12, A_12, B_12},
+ {0, C_13, A_13, B_13},
+ {0, C_14, A_14, B_14},
+ {0, C_15, A_15, B_15},
+ {0, C_16, A_16, B_16},
+ {1, I_16, G_16, H_16},
+
+ {0, F_1, D_1, E_1},
+ {0, F_2, D_2, E_2},
+ {0, F_3, D_3, E_3},
+ {0, F_4, D_4, E_4},
+ {0, F_5, D_5, E_5},
+ {0, F_6, D_6, E_6},
+ {0, F_7, D_7, E_7},
+ {0, F_8, D_8, E_8},
+ {0, F_9, D_9, E_9},
+ {0, F_10, D_10, E_10},
+ {0, F_11, D_11, E_11},
+ {0, F_12, D_12, E_12},
+ {0, F_13, D_13, E_13},
+ {0, F_14, D_14, E_14},
+ {0, F_15, D_15, E_15},
+ {0, F_16, D_16, E_16},
+ {1, I_13, G_13, H_13},
+
+ {1, I_1, G_1, H_1},
+ {1, I_2, G_2, H_2},
+ {1, I_3, G_3, H_3},
+ {1, I_4, G_4, H_4},
+ {1, I_5, G_5, H_5},
+ {1, I_6, G_6, H_6},
+ {1, I_7, G_7, H_7},
+ {1, I_8, G_8, H_8},
+ {1, I_9, G_9, H_9},
+ {1, I_10, G_10, H_10},
+ {1, I_11, G_11, H_11},
+ {1, I_12, G_12, H_12},
+ {1, I_14, G_14, H_14},
+
+ {1, C_1, A_1, B_1},
+ {1, C_3, A_3, B_3},
+ {1, C_4, A_4, B_4},
+ {1, C_5, A_5, B_5},
+ {1, C_6, A_6, B_6},
+ {1, C_7, A_7, B_7},
+ {1, C_8, A_8, B_8},
+ {1, C_9, A_9, B_9},
+ {1, C_10, A_10, B_10},
+ {1, C_11, A_11, B_11},
+ {1, C_12, A_12, B_12},
+ {1, C_14, A_14, B_14},
+ {1, C_16, A_16, B_16},
+
+ {1, F_1, D_1, E_1},
+ {1, F_2, D_2, E_2},
+ {1, F_3, D_3, E_3},
+ {1, F_7, D_7, E_7},
+ {1, F_11, D_11, E_11},
+ {1, F_12, D_12, E_12},
+ {1, F_13, D_13, E_13},
+ {1, F_14, D_14, E_14},
+ {1, F_15, D_15, E_15},
+ {1, F_16, D_16, E_16},
+ {1, C_15, A_15, B_15},
+};
+
+#define __ NO_LED
+
+led_config_t g_led_config = {
+ {
+ // Key Matrix to LED Index
+ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, __, 13, 14 },
+ { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 },
+ { 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48 },
+ { 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 49, 62, 15, 32 },
+ { 63, __, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, __, 74, 86, 75 },
+ { 76, 77, 78, __, __, __, 79, __, __, __, 80, 81, 82, 83, 84, 85 },
+ },
+ {
+ // LED Index to Physical Position
+ {0,0}, {26,0}, {39,0}, {52,0}, {65,0}, {85,0}, {98,0}, {111,0}, {124,0}, {143,0}, {156,0}, {169,0}, {182,0}, {198,0}, {211,0}, {224,0},
+ {0,15}, {13,15}, {26,15}, {39,15}, {52,15}, {65,15}, {78,15}, {91,15}, {104,15}, {117,15}, {130,15}, {143,15}, {156,15}, {176,15}, {198,15}, {211,15}, {224,15},
+ {3,28}, {20,28}, {33,28}, {46,28}, {59,28}, {72,28}, {85,28}, {98,28}, {111,28}, {124,28}, {137,28}, {150,28}, {163,28}, {179,28}, {198,28}, {211,28}, {224,28},
+ {5,40}, {23,40}, {36,40}, {49,40}, {62,40}, {75,40}, {88,40}, {101,40}, {114,40}, {127,40}, {140,40}, {153,40}, {174,40},
+ {8,52}, {29,52}, {42,52}, {55,52}, {68,52}, {81,52}, {94,52}, {107,52}, {120,52}, {133,52}, {146,52}, {171,52}, {211,52},
+ {2,64}, {18,64}, {34,64}, {83,64}, {131,64}, {148,64}, {164,64}, {180,64}, {198,64}, {211,64}, {224,64},
+ },
+ {
+ // RGB LED Index to Flag
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1,
+ 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1,
+ 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
+ 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
+ 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
+ }
+};
+
+#endif
diff --git a/keyboards/keychron/q3/rev_0120_lhg/rev_0120_lhg.h b/keyboards/keychron/q3/rev_0120_lhg/rev_0120_lhg.h
new file mode 100644
index 000000000000..24ac8936f991
--- /dev/null
+++ b/keyboards/keychron/q3/rev_0120_lhg/rev_0120_lhg.h
@@ -0,0 +1,37 @@
+/* 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 .
+ */
+
+#pragma once
+
+#include "quantum.h"
+
+#define XXX KC_NO
+
+#define LAYOUT_ansi_87( \
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, K0F, K3E, \
+ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K3F, \
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K3C, \
+ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \
+ K40, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4D, K4F, \
+ K50, K51, K52, K56, K5A, K5B, K5C, K5D, K5E, K5F, K4E \
+) { \
+ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, XXX, K0E, K0F }, \
+ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \
+ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \
+ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, \
+ { K40, XXX, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, XXX, K4D, K4E, K4F }, \
+ { K50, K51, K52, XXX, XXX, XXX, K56, XXX, XXX, XXX, K5A, K5B, K5C, K5D, K5E, K5F } \
+}
diff --git a/keyboards/keychron/q3/rev_0120_lhg/rules.mk b/keyboards/keychron/q3/rev_0120_lhg/rules.mk
new file mode 100644
index 000000000000..26d88a0545bb
--- /dev/null
+++ b/keyboards/keychron/q3/rev_0120_lhg/rules.mk
@@ -0,0 +1,26 @@
+# MCU name
+MCU = STM32L433
+
+# Bootloader selection
+BOOTLOADER = stm32-dfu
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
+MOUSEKEY_ENABLE = yes # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+NKRO_ENABLE = yes # Enable USB N-key Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
+AUDIO_ENABLE = no # Audio output
+ENCODER_ENABLE = no # Enable Encoder
+DIP_SWITCH_ENABLE = yes
+RGB_MATRIX_ENABLE = yes
+RGB_MATRIX_DRIVER = CKLED2001
+EEPROM_DRIVER = transient
+
+# Enter lower-power sleep mode when on the ChibiOS idle thread
+OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE