From bfcbcfe3c7efad948a026ad8c365007bb82d9b6a Mon Sep 17 00:00:00 2001 From: lalalademaxiya1 <66767061+lalalademaxiya1@users.noreply.github.com> Date: Fri, 30 Sep 2022 00:50:47 +0800 Subject: Update q0 for keychron (#18522) --- keyboards/keychron/q0/config.h | 10 +++++----- keyboards/keychron/q0/q0.c | 8 ++++---- keyboards/keychron/q0/rev_0130/rev_0130.c | 14 ++++++++------ 3 files changed, 17 insertions(+), 15 deletions(-) (limited to 'keyboards/keychron') diff --git a/keyboards/keychron/q0/config.h b/keyboards/keychron/q0/config.h index 40f506fe80..a04d31d3a2 100644 --- a/keyboards/keychron/q0/config.h +++ b/keyboards/keychron/q0/config.h @@ -34,18 +34,18 @@ #define DRIVER_COUNT 1 #define DRIVER_ADDR_1 0b1110100 -#define CONSTANT_CURRENT_STEP \ +#define CKLED2001_CURRENT_TUNE \ { 0xFF, 0xFF, 0x70, 0xFF, 0xFF, 0x70, 0xFF, 0xFF, 0x70, 0xFF, 0xFF, 0x70 } +#define RGB_MATRIX_CENTER \ + { 56, 16 } + /* NKRO */ #define FORCE_NKRO /* turn off effects when suspended */ #define RGB_DISABLE_WHEN_USB_SUSPENDED -/* 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) @@ -98,4 +98,4 @@ #define ENABLE_RGB_MATRIX_MULTISPLASH #define ENABLE_RGB_MATRIX_SOLID_SPLASH #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH -// #define RGB_MATRIX_KEYPRESSES \ No newline at end of file +// #define RGB_MATRIX_KEYPRESSES diff --git a/keyboards/keychron/q0/q0.c b/keyboards/keychron/q0/q0.c index c43157ac68..d17ab77f47 100644 --- a/keyboards/keychron/q0/q0.c +++ b/keyboards/keychron/q0/q0.c @@ -16,7 +16,7 @@ #include "q0.h" -#if defined(RGB_MATRIX_ENABLE) && defined(CAPS_LOCK_LED_INDEX) +#if defined(RGB_MATRIX_ENABLE) && defined(NUM_LOCK_LED_INDEX) bool process_record_kb(uint16_t keycode, keyrecord_t *record) { if (!process_record_user(keycode, record)) { @@ -45,11 +45,11 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { __attribute__((weak)) void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { // RGB_MATRIX_INDICATOR_SET_COLOR(index, red, green, blue); - if (host_keyboard_led_state().caps_lock) { - RGB_MATRIX_INDICATOR_SET_COLOR(CAPS_LOCK_LED_INDEX, 255, 255, 255); + if (host_keyboard_led_state().num_lock) { + RGB_MATRIX_INDICATOR_SET_COLOR(NUM_LOCK_LED_INDEX, 255, 255, 255); } else { if (!rgb_matrix_get_flags()) { - RGB_MATRIX_INDICATOR_SET_COLOR(CAPS_LOCK_LED_INDEX, 0, 0, 0); + RGB_MATRIX_INDICATOR_SET_COLOR(NUM_LOCK_LED_INDEX, 0, 0, 0); } } } diff --git a/keyboards/keychron/q0/rev_0130/rev_0130.c b/keyboards/keychron/q0/rev_0130/rev_0130.c index 468e3cf04f..64c4842086 100644 --- a/keyboards/keychron/q0/rev_0130/rev_0130.c +++ b/keyboards/keychron/q0/rev_0130/rev_0130.c @@ -18,6 +18,8 @@ #ifdef RGB_MATRIX_ENABLE +// clang-format off + const ckled2001_led PROGMEM g_ckled2001_leds[DRIVER_LED_TOTAL] = { /* Refer to CKLED manual for these locations * driver @@ -67,12 +69,12 @@ led_config_t g_led_config = { }, { // LED Index to Physical Position - {0,0}, {74,0}, {150,0}, {224,0}, - {0,13}, {74,13}, {150,13}, {224,13}, - {0,26}, {74,26}, {150,26}, - {0,38}, {74,38}, {150,38}, {224,32}, - {0,51}, {74,51}, {150,51}, - {36,64}, {150,64}, {224,58}, + {0,0}, {37,0}, {75,0}, {112,0}, + {0,6}, {37,6}, {75,6}, {112,6}, + {0,13}, {37,13}, {75,13}, + {0,19}, {37,19}, {75,19}, {112,16}, + {0,25}, {37,25}, {75,25}, + {18,32}, {75,32}, {112,29}, }, { // LED Index to Flag -- cgit v1.2.3 From b51b3681b7d38f86d8c5b2df152c44ad5d7a1bff Mon Sep 17 00:00:00 2001 From: Daniel Bast <2790401+dbast@users.noreply.github.com> Date: Thu, 29 Sep 2022 19:15:00 +0200 Subject: Fix keychron q2 iso default keymaps (#18501) --- keyboards/keychron/q2/rev_0112/keymaps/default/keymap.c | 2 +- keyboards/keychron/q2/rev_0112/keymaps/via/keymap.c | 2 +- keyboards/keychron/q2/rev_0113/keymaps/default/keymap.c | 2 +- keyboards/keychron/q2/rev_0113/keymaps/via/keymap.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'keyboards/keychron') diff --git a/keyboards/keychron/q2/rev_0112/keymaps/default/keymap.c b/keyboards/keychron/q2/rev_0112/keymaps/default/keymap.c index 75667b44c8..21a837c1a0 100644 --- a/keyboards/keychron/q2/rev_0112/keymaps/default/keymap.c +++ b/keyboards/keychron/q2/rev_0112/keymaps/default/keymap.c @@ -37,7 +37,7 @@ enum custom_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [MAC_BASE] = LAYOUT_iso_68( - 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, + 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, diff --git a/keyboards/keychron/q2/rev_0112/keymaps/via/keymap.c b/keyboards/keychron/q2/rev_0112/keymaps/via/keymap.c index 0a91857f1e..9eb7288dc1 100644 --- a/keyboards/keychron/q2/rev_0112/keymaps/via/keymap.c +++ b/keyboards/keychron/q2/rev_0112/keymaps/via/keymap.c @@ -37,7 +37,7 @@ enum custom_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [MAC_BASE] = LAYOUT_iso_68( - 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, + 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, diff --git a/keyboards/keychron/q2/rev_0113/keymaps/default/keymap.c b/keyboards/keychron/q2/rev_0113/keymaps/default/keymap.c index e3e6cf7376..a44e7e4cc9 100644 --- a/keyboards/keychron/q2/rev_0113/keymaps/default/keymap.c +++ b/keyboards/keychron/q2/rev_0113/keymaps/default/keymap.c @@ -37,7 +37,7 @@ enum custom_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [MAC_BASE] = LAYOUT_iso_68( - 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_MUTE, + 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, diff --git a/keyboards/keychron/q2/rev_0113/keymaps/via/keymap.c b/keyboards/keychron/q2/rev_0113/keymaps/via/keymap.c index 4e3b431bdf..268173b060 100644 --- a/keyboards/keychron/q2/rev_0113/keymaps/via/keymap.c +++ b/keyboards/keychron/q2/rev_0113/keymaps/via/keymap.c @@ -37,7 +37,7 @@ enum custom_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [MAC_BASE] = LAYOUT_all( - 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_VOLD, KC_MUTE, KC_VOLU, + 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, -- cgit v1.2.3