summaryrefslogtreecommitdiff
path: root/keyboards/splitkb/kyria/keymaps/corodiak/keymap.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/splitkb/kyria/keymaps/corodiak/keymap.c')
-rw-r--r--keyboards/splitkb/kyria/keymaps/corodiak/keymap.c65
1 files changed, 29 insertions, 36 deletions
diff --git a/keyboards/splitkb/kyria/keymaps/corodiak/keymap.c b/keyboards/splitkb/kyria/keymaps/corodiak/keymap.c
index 2a28d49752..c0ed9f133c 100644
--- a/keyboards/splitkb/kyria/keymaps/corodiak/keymap.c
+++ b/keyboards/splitkb/kyria/keymaps/corodiak/keymap.c
@@ -274,48 +274,41 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
};
-LEADER_EXTERNS();
-
-void matrix_scan_user(void) {
- LEADER_DICTIONARY() {
- leading = false;
- leader_end();
+void leader_end_user(void) {
+ // Set current OS indicator to macOs
+ if (leader_sequence_one_key(KC_M)) {
+ user_config.osIsWindows = false;
+ eeconfig_update_user(user_config.raw);
+ }
- // Set current OS indicator to macOs
- SEQ_ONE_KEY(KC_M) {
- user_config.osIsWindows = false;
- eeconfig_update_user(user_config.raw);
- }
+ // Set current OS indicator to Windows
+ if (leader_sequence_one_key(KC_W)) {
+ user_config.osIsWindows = true;
+ eeconfig_update_user(user_config.raw);
+ }
- // Set current OS indicator to Windows
- SEQ_ONE_KEY(KC_W) {
- user_config.osIsWindows = true;
- eeconfig_update_user(user_config.raw);
- }
-
- // Screenshot
- SEQ_ONE_KEY(KC_S) {
- if (user_config.osIsWindows == 1) {
- tap_code16(S(G(KC_S)));
- } else if (user_config.osIsWindows == 0) {
- tap_code16(S(G(KC_4)));
- }
+ // Screenshot
+ if (leader_sequence_one_key(KC_S)) {
+ if (user_config.osIsWindows == 1) {
+ tap_code16(S(G(KC_S)));
+ } else if (user_config.osIsWindows == 0) {
+ tap_code16(S(G(KC_4)));
}
+ }
- // Video
- SEQ_ONE_KEY(KC_V) {
- if (user_config.osIsWindows == 0) {
- tap_code16(S(G(KC_5)));
- }
+ // Video
+ if (leader_sequence_one_key(KC_V)) {
+ if (user_config.osIsWindows == 0) {
+ tap_code16(S(G(KC_5)));
}
+ }
- // Sleep
- SEQ_ONE_KEY(KC_P) {
- if (user_config.osIsWindows == 1) {
- SEND_STRING(SS_LGUI("x") "u" "h");
- } else if (user_config.osIsWindows == 0) {
- tap_code16(A(G(KC_PWR)));
- }
+ // Sleep
+ if (leader_sequence_one_key(KC_P)) {
+ if (user_config.osIsWindows == 1) {
+ SEND_STRING(SS_LGUI("x") "u" "h");
+ } else if (user_config.osIsWindows == 0) {
+ tap_code16(A(G(KC_PWR)));
}
}
}