diff options
Diffstat (limited to 'keyboards/keychron/q1')
17 files changed, 72 insertions, 97 deletions
diff --git a/keyboards/keychron/q1/ansi/info.json b/keyboards/keychron/q1/ansi/info.json index 171344b4c0..63602d71c5 100644 --- a/keyboards/keychron/q1/ansi/info.json +++ b/keyboards/keychron/q1/ansi/info.json @@ -8,6 +8,8 @@ "pid": "0x0100", "device_version": "1.0.0" }, + "processor": "atmega32u4", + "bootloader": "atmel-dfu", "layouts": { "LAYOUT_ansi_82": { "layout": [ diff --git a/keyboards/keychron/q1/ansi/keymaps/teimor/tap_dance_mac_caps.c b/keyboards/keychron/q1/ansi/keymaps/teimor/tap_dance_mac_caps.c index d979820923..dfb0346ff1 100644 --- a/keyboards/keychron/q1/ansi/keymaps/teimor/tap_dance_mac_caps.c +++ b/keyboards/keychron/q1/ansi/keymaps/teimor/tap_dance_mac_caps.c @@ -19,7 +19,7 @@ static td_tap_t mac_caps_language_tap_state = {.is_press_action = true, .state = TD_NONE}; -void mac_caps_language_finished(qk_tap_dance_state_t *state, void *user_data) { +void mac_caps_language_finished(tap_dance_state_t *state, void *user_data) { mac_caps_language_tap_state.state = current_dance(state); switch (mac_caps_language_tap_state.state) { case TD_SINGLE_TAP: @@ -34,7 +34,7 @@ void mac_caps_language_finished(qk_tap_dance_state_t *state, void *user_data) { } } -void mac_caps_language_reset(qk_tap_dance_state_t *state, void *user_data) { +void mac_caps_language_reset(tap_dance_state_t *state, void *user_data) { switch (mac_caps_language_tap_state.state) { case TD_SINGLE_TAP: unregister_code(KC_SPACE); diff --git a/keyboards/keychron/q1/ansi/keymaps/teimor/tap_dance_mac_caps.h b/keyboards/keychron/q1/ansi/keymaps/teimor/tap_dance_mac_caps.h index a5f07a58a1..ef552a2c2c 100644 --- a/keyboards/keychron/q1/ansi/keymaps/teimor/tap_dance_mac_caps.h +++ b/keyboards/keychron/q1/ansi/keymaps/teimor/tap_dance_mac_caps.h @@ -19,5 +19,5 @@ #include "tap_dance_setup.h" -void mac_caps_language_finished(qk_tap_dance_state_t *state, void *user_data); -void mac_caps_language_reset(qk_tap_dance_state_t *state, void *user_data); +void mac_caps_language_finished(tap_dance_state_t *state, void *user_data); +void mac_caps_language_reset(tap_dance_state_t *state, void *user_data); diff --git a/keyboards/keychron/q1/ansi/keymaps/teimor/tap_dance_setup.c b/keyboards/keychron/q1/ansi/keymaps/teimor/tap_dance_setup.c index 6d879419bc..07257e556a 100644 --- a/keyboards/keychron/q1/ansi/keymaps/teimor/tap_dance_setup.c +++ b/keyboards/keychron/q1/ansi/keymaps/teimor/tap_dance_setup.c @@ -15,7 +15,7 @@ */ #include "tap_dance_setup.h" -td_state_t current_dance(qk_tap_dance_state_t *state) { +td_state_t current_dance(tap_dance_state_t *state) { if (state->count == 1) { if (state->interrupted || !state->pressed) return TD_SINGLE_TAP; /* Key has not been interrupted, but the key is still held. Means you w ant to send a 'HOLD'. */ diff --git a/keyboards/keychron/q1/ansi/keymaps/teimor/tap_dance_setup.h b/keyboards/keychron/q1/ansi/keymaps/teimor/tap_dance_setup.h index 05160c77f5..5d2f4acd57 100644 --- a/keyboards/keychron/q1/ansi/keymaps/teimor/tap_dance_setup.h +++ b/keyboards/keychron/q1/ansi/keymaps/teimor/tap_dance_setup.h @@ -35,4 +35,4 @@ typedef struct { td_state_t state; } td_tap_t; -td_state_t current_dance(qk_tap_dance_state_t *state); +td_state_t current_dance(tap_dance_state_t *state); diff --git a/keyboards/keychron/q1/ansi/keymaps/teimor/tap_dance_user.c b/keyboards/keychron/q1/ansi/keymaps/teimor/tap_dance_user.c index 1e9542d5ee..ed8120572e 100644 --- a/keyboards/keychron/q1/ansi/keymaps/teimor/tap_dance_user.c +++ b/keyboards/keychron/q1/ansi/keymaps/teimor/tap_dance_user.c @@ -20,7 +20,7 @@ // clang-format off -qk_tap_dance_action_t tap_dance_actions[] = { +tap_dance_action_t tap_dance_actions[] = { [MAC_CAPS_LANGUAGE_CHANGE] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, mac_caps_language_finished, mac_caps_language_reset), [WIN_CAPS_LANGUAGE_CHANGE] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, win_caps_language_finished, win_caps_language_reset) }; diff --git a/keyboards/keychron/q1/ansi/keymaps/teimor/tap_dance_win_caps.c b/keyboards/keychron/q1/ansi/keymaps/teimor/tap_dance_win_caps.c index fea72c5663..1c7c438d2e 100644 --- a/keyboards/keychron/q1/ansi/keymaps/teimor/tap_dance_win_caps.c +++ b/keyboards/keychron/q1/ansi/keymaps/teimor/tap_dance_win_caps.c @@ -19,7 +19,7 @@ static td_tap_t win_caps_language_tap_state = {.is_press_action = true, .state = TD_NONE}; -void win_caps_language_finished(qk_tap_dance_state_t *state, void *user_data) { +void win_caps_language_finished(tap_dance_state_t *state, void *user_data) { win_caps_language_tap_state.state = current_dance(state); switch (win_caps_language_tap_state.state) { case TD_SINGLE_TAP: @@ -34,7 +34,7 @@ void win_caps_language_finished(qk_tap_dance_state_t *state, void *user_data) { } } -void win_caps_language_reset(qk_tap_dance_state_t *state, void *user_data) { +void win_caps_language_reset(tap_dance_state_t *state, void *user_data) { switch (win_caps_language_tap_state.state) { case TD_SINGLE_TAP: unregister_code(KC_SPACE); diff --git a/keyboards/keychron/q1/ansi/keymaps/teimor/tap_dance_win_caps.h b/keyboards/keychron/q1/ansi/keymaps/teimor/tap_dance_win_caps.h index 34b734ec89..2289cce326 100644 --- a/keyboards/keychron/q1/ansi/keymaps/teimor/tap_dance_win_caps.h +++ b/keyboards/keychron/q1/ansi/keymaps/teimor/tap_dance_win_caps.h @@ -19,5 +19,5 @@ #include "tap_dance_setup.h" -void win_caps_language_finished(qk_tap_dance_state_t *state, void *user_data); -void win_caps_language_reset(qk_tap_dance_state_t *state, void *user_data); +void win_caps_language_finished(tap_dance_state_t *state, void *user_data); +void win_caps_language_reset(tap_dance_state_t *state, void *user_data); diff --git a/keyboards/keychron/q1/ansi/rules.mk b/keyboards/keychron/q1/ansi/rules.mk index 3ff731a72b..395b661685 100644 --- a/keyboards/keychron/q1/ansi/rules.mk +++ b/keyboards/keychron/q1/ansi/rules.mk @@ -1,9 +1,3 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # diff --git a/keyboards/keychron/q1/ansi_encoder/info.json b/keyboards/keychron/q1/ansi_encoder/info.json index ad9c258c38..8fdd64ed7a 100644 --- a/keyboards/keychron/q1/ansi_encoder/info.json +++ b/keyboards/keychron/q1/ansi_encoder/info.json @@ -8,6 +8,8 @@ "pid": "0x0101", "device_version": "1.0.0" }, + "processor": "atmega32u4", + "bootloader": "atmel-dfu", "layouts": { "LAYOUT_ansi_82": { "layout": [ diff --git a/keyboards/keychron/q1/ansi_encoder/rules.mk b/keyboards/keychron/q1/ansi_encoder/rules.mk index 6aad3136e5..f67fe2bf03 100644 --- a/keyboards/keychron/q1/ansi_encoder/rules.mk +++ b/keyboards/keychron/q1/ansi_encoder/rules.mk @@ -1,9 +1,3 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # diff --git a/keyboards/keychron/q1/config.h b/keyboards/keychron/q1/config.h index afdee15f61..4e56c43032 100644 --- a/keyboards/keychron/q1/config.h +++ b/keyboards/keychron/q1/config.h @@ -23,9 +23,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 0b1010000 diff --git a/keyboards/keychron/q1/iso/info.json b/keyboards/keychron/q1/iso/info.json index 8da7a886ef..d8f5205f5f 100644 --- a/keyboards/keychron/q1/iso/info.json +++ b/keyboards/keychron/q1/iso/info.json @@ -8,6 +8,8 @@ "pid": "0x0102", "device_version": "1.0.0" }, + "processor": "atmega32u4", + "bootloader": "atmel-dfu", "layouts": { "LAYOUT_iso_83": { "layout": [ diff --git a/keyboards/keychron/q1/iso/keymaps/victorsavu3/keymap.c b/keyboards/keychron/q1/iso/keymaps/victorsavu3/keymap.c index 8478ccbe57..b97e6bfb92 100644 --- a/keyboards/keychron/q1/iso/keymaps/victorsavu3/keymap.c +++ b/keyboards/keychron/q1/iso/keymaps/victorsavu3/keymap.c @@ -31,7 +31,7 @@ enum unicode_names { SAD, }; -const uint32_t PROGMEM unicode_map[] = { +const uint32_t unicode_map[] PROGMEM = { [GRIN] = 0x1F600, // ๐ [SAD] = 0x1F61E, // ๐ }; @@ -76,68 +76,62 @@ static bool wiggle_mouse; static uint16_t wiggle_timer; static uint16_t next_wiggle; +void leader_end_user(void) { + if (leader_sequence_one_key(QK_LEAD)) { + tap_code(KC_CAPS); + } -LEADER_EXTERNS(); + if (leader_sequence_four_keys(KC_I, KC_D, KC_L, KC_E)) { + wiggle_mouse = !wiggle_mouse; + wiggle_timer = timer_read(); + } -void matrix_scan_user(void) { - LEADER_DICTIONARY() { - leading = false; - leader_end(); - - SEQ_ONE_KEY(QK_LEAD) { - tap_code(KC_CAPS); - } - - SEQ_FOUR_KEYS(KC_I, KC_D, KC_L, KC_E) { - wiggle_mouse = !wiggle_mouse; - wiggle_timer = timer_read(); - } - - SEQ_TWO_KEYS(KC_O, KC_K) { - send_unicode_string("๐"); - } - - SEQ_THREE_KEYS(KC_S, KC_A, KC_D) { - send_unicode_string("๐"); - } - - SEQ_FIVE_KEYS(KC_C, KC_H, KC_E, KC_C, KC_K) { - send_unicode_string("โ
"); - } - - SEQ_FIVE_KEYS(KC_C, KC_R, KC_O, KC_S, KC_S) { - send_unicode_string("โ"); - } - - SEQ_FIVE_KEYS(KC_T, KC_H, KC_A, KC_N, KC_K) { - send_unicode_string("๐"); - } - - SEQ_FIVE_KEYS(KC_S, KC_M, KC_I, KC_L, KC_E) { - send_unicode_string("๐"); - } - - SEQ_FIVE_KEYS(KC_P, KC_A, KC_R, KC_T, KC_Y) { - send_unicode_string("๐"); - } - - SEQ_FOUR_KEYS(KC_E, KC_Y, KC_E, KC_S) { - send_unicode_string("(เฒ _เฒ )"); - } - - SEQ_FIVE_KEYS(KC_M, KC_A, KC_G, KC_I, KC_C) { - send_unicode_string("(เฒ _เฒ ) ๐ช โ โญ*.โซ.*โญโ "); - } - - SEQ_FIVE_KEYS(KC_T, KC_A, KC_B, KC_L, KC_E) { - send_unicode_string("(ใเฒ ็เฒ )ใๅฝกโปโโป"); - } - - SEQ_FIVE_KEYS(KC_S, KC_H, KC_R, KC_U, KC_G) { - send_unicode_string("ยฏ\\_(ใ)_/ยฏ"); - } + if (leader_sequence_two_keys(KC_O, KC_K)) { + send_unicode_string("๐"); + } + + if (leader_sequence_three_keys(KC_S, KC_A, KC_D)) { + send_unicode_string("๐"); + } + + if (leader_sequence_five_keys(KC_C, KC_H, KC_E, KC_C, KC_K)) { + send_unicode_string("โ
"); + } + + if (leader_sequence_five_keys(KC_C, KC_R, KC_O, KC_S, KC_S)) { + send_unicode_string("โ"); + } + + if (leader_sequence_five_keys(KC_T, KC_H, KC_A, KC_N, KC_K)) { + send_unicode_string("๐"); + } + + if (leader_sequence_five_keys(KC_S, KC_M, KC_I, KC_L, KC_E)) { + send_unicode_string("๐"); + } + + if (leader_sequence_five_keys(KC_P, KC_A, KC_R, KC_T, KC_Y)) { + send_unicode_string("๐"); + } + + if (leader_sequence_four_keys(KC_E, KC_Y, KC_E, KC_S)) { + send_unicode_string("(เฒ _เฒ )"); + } + + if (leader_sequence_five_keys(KC_M, KC_A, KC_G, KC_I, KC_C)) { + send_unicode_string("(เฒ _เฒ ) ๐ช โ โญ*.โซ.*โญโ "); } + if (leader_sequence_five_keys(KC_T, KC_A, KC_B, KC_L, KC_E)) { + send_unicode_string("(ใเฒ ็เฒ )ใๅฝกโปโโป"); + } + + if (leader_sequence_five_keys(KC_S, KC_H, KC_R, KC_U, KC_G)) { + send_unicode_string("ยฏ\\_(ใ)_/ยฏ"); + } +} + +void matrix_scan_user(void) { if (wiggle_mouse && timer_elapsed(wiggle_timer) > next_wiggle) { wiggle_timer = timer_read(); diff --git a/keyboards/keychron/q1/iso/rules.mk b/keyboards/keychron/q1/iso/rules.mk index 3ff731a72b..395b661685 100644 --- a/keyboards/keychron/q1/iso/rules.mk +++ b/keyboards/keychron/q1/iso/rules.mk @@ -1,9 +1,3 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # diff --git a/keyboards/keychron/q1/iso_encoder/info.json b/keyboards/keychron/q1/iso_encoder/info.json index fc5dc7abc4..573c43696f 100644 --- a/keyboards/keychron/q1/iso_encoder/info.json +++ b/keyboards/keychron/q1/iso_encoder/info.json @@ -8,6 +8,8 @@ "pid": "0x0103", "device_version": "1.0.2" }, + "processor": "atmega32u4", + "bootloader": "atmel-dfu", "layouts": { "LAYOUT_iso_83": { "layout": [ diff --git a/keyboards/keychron/q1/iso_encoder/rules.mk b/keyboards/keychron/q1/iso_encoder/rules.mk index 1dce5c5390..3eea458e72 100644 --- a/keyboards/keychron/q1/iso_encoder/rules.mk +++ b/keyboards/keychron/q1/iso_encoder/rules.mk @@ -1,9 +1,3 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # |