summaryrefslogtreecommitdiff
path: root/keyboards/input_club/ergodox_infinity
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2023-02-13 03:19:02 +1100
committerGitHub <noreply@github.com>2023-02-13 03:19:02 +1100
commitbbf7a20b33de2d203518687cb5cd1aa85005ea27 (patch)
treeee1a5c412a02021d085c81a26321c3424eca7022 /keyboards/input_club/ergodox_infinity
parentd10350cd2ceb2b9d80522cdec3ea908118f7fd35 (diff)
Refactor Leader key feature (#19632)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Diffstat (limited to 'keyboards/input_club/ergodox_infinity')
-rw-r--r--keyboards/input_club/ergodox_infinity/keymaps/not-quite-neo/keymap.c51
1 files changed, 21 insertions, 30 deletions
diff --git a/keyboards/input_club/ergodox_infinity/keymaps/not-quite-neo/keymap.c b/keyboards/input_club/ergodox_infinity/keymaps/not-quite-neo/keymap.c
index be1edfc019..a345e075d9 100644
--- a/keyboards/input_club/ergodox_infinity/keymaps/not-quite-neo/keymap.c
+++ b/keyboards/input_club/ergodox_infinity/keymaps/not-quite-neo/keymap.c
@@ -255,38 +255,29 @@ L06 -> <TBD>: UNSPECIFIED
};
+void leader_end_user(void) {
+ if (leader_sequence_one_key(KC_1)) {
+ // ¯\_(ツ)_/¯
+ unicode_input_start(); register_hex(0xaf); unicode_input_finish();
+ register_code (KC_RALT); TAP_ONCE (KC_MINS); unregister_code (KC_RALT);
+ register_code (KC_RSFT); TAP_ONCE (KC_8); unregister_code (KC_RSFT);
+ unicode_input_start (); register_hex(0x30c4); unicode_input_finish();
+ register_code (KC_RSFT); TAP_ONCE (KC_9); TAP_ONCE(KC_7); unregister_code (KC_RSFT);
+ unicode_input_start (); register_hex(0xaf); unicode_input_finish();
+ }
+
+ if (leader_sequence_one_key(KC_2)) {
+ // 凸(ツ)凸
+ unicode_input_start(); register_hex(0x51F8); unicode_input_finish();
+ register_code (KC_RSFT); TAP_ONCE (KC_8); unregister_code (KC_RSFT);
+ unicode_input_start (); register_hex(0x30c4); unicode_input_finish();
+ register_code (KC_RSFT); TAP_ONCE (KC_9); unregister_code (KC_RSFT);
+ unicode_input_start (); register_hex(0x51F8); unicode_input_finish();
+ }
+}
+
// Runs just one time when the keyboard initializes.
void matrix_init_user(void) {
set_unicode_input_mode(UNICODE_MODE_LINUX);
};
-
-
-LEADER_EXTERNS();
-
-// Runs constantly in the background, in a loop.
-void matrix_scan_user(void) {
- LEADER_DICTIONARY() {
- leading = false;
- leader_end();
-
- SEQ_ONE_KEY (KC_1) {
- // ¯\_(ツ)_/¯
- unicode_input_start(); register_hex(0xaf); unicode_input_finish();
- register_code (KC_RALT); TAP_ONCE (KC_MINS); unregister_code (KC_RALT);
- register_code (KC_RSFT); TAP_ONCE (KC_8); unregister_code (KC_RSFT);
- unicode_input_start (); register_hex(0x30c4); unicode_input_finish();
- register_code (KC_RSFT); TAP_ONCE (KC_9); TAP_ONCE(KC_7); unregister_code (KC_RSFT);
- unicode_input_start (); register_hex(0xaf); unicode_input_finish();
- }
-
- SEQ_ONE_KEY (KC_2) {
- // 凸(ツ)凸
- unicode_input_start(); register_hex(0x51F8); unicode_input_finish();
- register_code (KC_RSFT); TAP_ONCE (KC_8); unregister_code (KC_RSFT);
- unicode_input_start (); register_hex(0x30c4); unicode_input_finish();
- register_code (KC_RSFT); TAP_ONCE (KC_9); unregister_code (KC_RSFT);
- unicode_input_start (); register_hex(0x51F8); unicode_input_finish();
- }
- }
-}