summaryrefslogtreecommitdiff
path: root/keyboards/keychron/q2
diff options
context:
space:
mode:
authorNick Brassel <nick@tzarc.org>2023-02-28 11:22:29 +1100
committerNick Brassel <nick@tzarc.org>2023-02-28 11:22:29 +1100
commitbacec14073b2e897d5a52caf12de5a6a1f7b4078 (patch)
treed4e3e57aac1a829a191831efd2e62c8a43217885 /keyboards/keychron/q2
parentd70e9b8659a7fbbd7069fd542bd07e67e04327a1 (diff)
parentb865b9e1706ad28ae4882bd2e0331e98808295fa (diff)
Merge remote-tracking branch 'upstream/develop'
Diffstat (limited to 'keyboards/keychron/q2')
-rw-r--r--keyboards/keychron/q2/ansi/keymaps/ladduro/keymap.c28
-rw-r--r--keyboards/keychron/q2/ansi/keymaps/via/keymap.c7
-rw-r--r--keyboards/keychron/q2/ansi_encoder/config.h3
-rw-r--r--keyboards/keychron/q2/ansi_encoder/info.json5
-rw-r--r--keyboards/keychron/q2/config.h7
-rw-r--r--keyboards/keychron/q2/iso_encoder/config.h3
-rw-r--r--keyboards/keychron/q2/iso_encoder/info.json5
-rw-r--r--keyboards/keychron/q2/jis_encoder/config.h3
-rw-r--r--keyboards/keychron/q2/jis_encoder/info.json5
9 files changed, 15 insertions, 51 deletions
diff --git a/keyboards/keychron/q2/ansi/keymaps/ladduro/keymap.c b/keyboards/keychron/q2/ansi/keymaps/ladduro/keymap.c
index cc83640b39..55ee7a9732 100644
--- a/keyboards/keychron/q2/ansi/keymaps/ladduro/keymap.c
+++ b/keyboards/keychron/q2/ansi/keymaps/ladduro/keymap.c
@@ -20,16 +20,9 @@
# include "rgb_matrix_user.h"
#endif
-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(
@@ -73,24 +66,3 @@ void matrix_init_user(void) {
rgb_matrix_init_user();
#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/ansi/keymaps/via/keymap.c b/keyboards/keychron/q2/ansi/keymaps/via/keymap.c
index f1b6b66ff8..ea386157bc 100644
--- a/keyboards/keychron/q2/ansi/keymaps/via/keymap.c
+++ b/keyboards/keychron/q2/ansi/keymaps/via/keymap.c
@@ -24,13 +24,6 @@ enum layers{
_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)
diff --git a/keyboards/keychron/q2/ansi_encoder/config.h b/keyboards/keychron/q2/ansi_encoder/config.h
index 25e444933c..b7e4b1e7f8 100644
--- a/keyboards/keychron/q2/ansi_encoder/config.h
+++ b/keyboards/keychron/q2/ansi_encoder/config.h
@@ -22,7 +22,4 @@
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
/* Encoder used pins */
-#define ENCODERS_PAD_A { A10 }
-#define ENCODERS_PAD_B { B5 }
-#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
index f3eddd9ecb..a2a12dc39c 100644
--- a/keyboards/keychron/q2/ansi_encoder/info.json
+++ b/keyboards/keychron/q2/ansi_encoder/info.json
@@ -8,6 +8,11 @@
"pid": "0x0111",
"device_version": "1.0.0"
},
+ "encoder": {
+ "rotary": [
+ {"pin_a": "A10", "pin_b": "B5"}
+ ]
+ },
"processor": "STM32L432",
"bootloader": "stm32-dfu",
"layouts": {
diff --git a/keyboards/keychron/q2/config.h b/keyboards/keychron/q2/config.h
index 51b5b72faa..e421906a68 100644
--- a/keyboards/keychron/q2/config.h
+++ b/keyboards/keychron/q2/config.h
@@ -16,10 +16,6 @@
#pragma once
-/* key matrix size */
-#define MATRIX_ROWS 5
-#define MATRIX_COLS 15
-
/* key matrix pins */
#define MATRIX_ROW_PINS { B4, B3, A15, A14, A13 }
#define MATRIX_COL_PINS { C14, C15, A0, A1, A2, A3, A4, A5, A6, A7, B0, B1, A8, A9, H3 }
@@ -32,9 +28,6 @@
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION ROW2COL
-/* Set 0 if debouncing isn't needed */
-#define DEBOUNCE 5
-
/* RGB Matrix Driver Configuration */
#define DRIVER_COUNT 2
#define DRIVER_ADDR_1 0b1110111
diff --git a/keyboards/keychron/q2/iso_encoder/config.h b/keyboards/keychron/q2/iso_encoder/config.h
index aa779918af..376b92b6fa 100644
--- a/keyboards/keychron/q2/iso_encoder/config.h
+++ b/keyboards/keychron/q2/iso_encoder/config.h
@@ -22,7 +22,4 @@
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
/* Encoder used pins */
-#define ENCODERS_PAD_A { A10 }
-#define ENCODERS_PAD_B { B5 }
-#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
index 36184a8807..028522c259 100644
--- a/keyboards/keychron/q2/iso_encoder/info.json
+++ b/keyboards/keychron/q2/iso_encoder/info.json
@@ -8,6 +8,11 @@
"pid": "0x0113",
"device_version": "1.0.0"
},
+ "encoder": {
+ "rotary": [
+ {"pin_a": "A10", "pin_b": "B5"}
+ ]
+ },
"processor": "STM32L432",
"bootloader": "stm32-dfu",
"layouts": {
diff --git a/keyboards/keychron/q2/jis_encoder/config.h b/keyboards/keychron/q2/jis_encoder/config.h
index e0ca950bc3..5e7ab55143 100644
--- a/keyboards/keychron/q2/jis_encoder/config.h
+++ b/keyboards/keychron/q2/jis_encoder/config.h
@@ -24,9 +24,6 @@
#define CKLED2001_CURRENT_TUNE { 0xC0, 0xC0, 0x5D, 0xC0, 0xC0, 0x5D, 0xC0, 0xC0, 0x5D, 0xC0, 0xC0, 0x5D }
/* Encoder Configuration */
-#define ENCODERS_PAD_A { A10 }
-#define ENCODERS_PAD_B { B5 }
-#define ENCODER_RESOLUTION 4
#define ENCODER_DEFAULT_POS 0x3
/* Enable caps-lock LED */
diff --git a/keyboards/keychron/q2/jis_encoder/info.json b/keyboards/keychron/q2/jis_encoder/info.json
index a0b5852b15..18e800703b 100644
--- a/keyboards/keychron/q2/jis_encoder/info.json
+++ b/keyboards/keychron/q2/jis_encoder/info.json
@@ -8,6 +8,11 @@
"pid": "0x0115",
"device_version": "1.0.0"
},
+ "encoder": {
+ "rotary": [
+ {"pin_a": "A10", "pin_b": "B5"}
+ ]
+ },
"processor": "STM32L432",
"bootloader": "stm32-dfu",
"layouts": {