diff options
| author | Konstantin Đorđević <vomindoraan@gmail.com> | 2019-09-03 17:42:05 +0200 |
|---|---|---|
| committer | Drashna Jaelre <drashna@live.com> | 2019-09-03 08:42:05 -0700 |
| commit | d633cf3ccbf1aed229ef92bdc2f2a1f4f67dd0ad (patch) | |
| tree | 469db5ce07f2ee43f5c06b2b19d146e687213ee3 /users/konstantin | |
| parent | 55bae0a5b48a004288013f2fa7cbfd49dfb16273 (diff) | |
| download | qmk_firmware-d633cf3ccbf1aed229ef92bdc2f2a1f4f67dd0ad.tar.gz qmk_firmware-d633cf3ccbf1aed229ef92bdc2f2a1f4f67dd0ad.zip | |
[Keymap] Update personal userspace and keymaps (#6654)
* Enable Fn layer tap dances only if LAYER_FN is defined
* Update KBD6X keymap spacing to match LAYOUT spacing
* Add regular FNLK to userspace, update keymap comment labels
* Rename KC_BRK → BREAK, KC_SYSR → SYSRQ in userspace
* Change mousekey positions in KBD6X
* Disable Console in KBD6X to reduce firmware size
* Return false in process_record_* only when overriding existing keys
* Fix Caps light not working after LSFT_FN
* Refactor Fn/Caps light, fix sequencing issues
Diffstat (limited to 'users/konstantin')
| -rw-r--r-- | users/konstantin/konstantin.c | 15 | ||||
| -rw-r--r-- | users/konstantin/konstantin.h | 6 | ||||
| -rw-r--r-- | users/konstantin/tap_dance.c | 3 | ||||
| -rw-r--r-- | users/konstantin/tap_dance.h | 12 |
4 files changed, 19 insertions, 17 deletions
diff --git a/users/konstantin/konstantin.c b/users/konstantin/konstantin.c index c56c9490f..98b11b3a9 100644 --- a/users/konstantin/konstantin.c +++ b/users/konstantin/konstantin.c | |||
| @@ -40,7 +40,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 40 | if (record->event.pressed && record->tap.count == TAPPING_TOGGLE) { | 40 | if (record->event.pressed && record->tap.count == TAPPING_TOGGLE) { |
| 41 | fn_lock = !IS_LAYER_ON(L_FN); // Fn layer will be toggled after this | 41 | fn_lock = !IS_LAYER_ON(L_FN); // Fn layer will be toggled after this |
| 42 | } | 42 | } |
| 43 | return true; | 43 | break; |
| 44 | #endif | 44 | #endif |
| 45 | 45 | ||
| 46 | case KC_ESC: | 46 | case KC_ESC: |
| @@ -58,7 +58,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 58 | } | 58 | } |
| 59 | #endif | 59 | #endif |
| 60 | } | 60 | } |
| 61 | return true; | 61 | break; |
| 62 | 62 | ||
| 63 | case CLEAR: | 63 | case CLEAR: |
| 64 | if (record->event.pressed) { | 64 | if (record->event.pressed) { |
| @@ -66,25 +66,24 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 66 | SEND_STRING(SS_LCTRL("a") SS_TAP(X_DELETE)); | 66 | SEND_STRING(SS_LCTRL("a") SS_TAP(X_DELETE)); |
| 67 | ) | 67 | ) |
| 68 | } | 68 | } |
| 69 | return false; | 69 | break; |
| 70 | 70 | ||
| 71 | case DST_P_R: | 71 | case DST_P_R: |
| 72 | kc = (get_mods() & DST_MOD_MASK) ? DST_REM : DST_PRV; | 72 | kc = (get_mods() & DST_MOD_MASK) ? DST_REM : DST_PRV; |
| 73 | CLEAN_MODS( | 73 | CLEAN_MODS( |
| 74 | (record->event.pressed ? register_code16 : unregister_code16)(kc); | 74 | (record->event.pressed ? register_code16 : unregister_code16)(kc); |
| 75 | ) | 75 | ) |
| 76 | return false; | 76 | break; |
| 77 | 77 | ||
| 78 | case DST_N_A: | 78 | case DST_N_A: |
| 79 | kc = (get_mods() & DST_MOD_MASK) ? DST_ADD : DST_NXT; | 79 | kc = (get_mods() & DST_MOD_MASK) ? DST_ADD : DST_NXT; |
| 80 | CLEAN_MODS( | 80 | CLEAN_MODS( |
| 81 | (record->event.pressed ? register_code16 : unregister_code16)(kc); | 81 | (record->event.pressed ? register_code16 : unregister_code16)(kc); |
| 82 | ) | 82 | ) |
| 83 | return false; | 83 | break; |
| 84 | |||
| 85 | default: | ||
| 86 | return true; | ||
| 87 | } | 84 | } |
| 85 | |||
| 86 | return true; | ||
| 88 | } | 87 | } |
| 89 | 88 | ||
| 90 | __attribute__((weak)) | 89 | __attribute__((weak)) |
diff --git a/users/konstantin/konstantin.h b/users/konstantin/konstantin.h index 84d90dda5..f42d5feaa 100644 --- a/users/konstantin/konstantin.h +++ b/users/konstantin/konstantin.h | |||
| @@ -13,6 +13,7 @@ | |||
| 13 | 13 | ||
| 14 | #ifdef LAYER_FN | 14 | #ifdef LAYER_FN |
| 15 | #define FN MO(L_FN) | 15 | #define FN MO(L_FN) |
| 16 | #define FNLK TG(L_FN) | ||
| 16 | #define FN_CAPS LT(L_FN, KC_CAPS) | 17 | #define FN_CAPS LT(L_FN, KC_CAPS) |
| 17 | #define FN_ESC LT(L_FN, KC_ESC) | 18 | #define FN_ESC LT(L_FN, KC_ESC) |
| 18 | #define FN_FNLK TT(L_FN) | 19 | #define FN_FNLK TT(L_FN) |
| @@ -22,9 +23,8 @@ | |||
| 22 | #define NUMPAD TG(L_NUMPAD) | 23 | #define NUMPAD TG(L_NUMPAD) |
| 23 | #endif | 24 | #endif |
| 24 | 25 | ||
| 25 | #define KC_SYSR LALT(KC_PSCR) | 26 | #define BREAK LCTL(KC_PAUS) |
| 26 | #undef KC_BRK | 27 | #define SYSRQ LALT(KC_PSCR) |
| 27 | #define KC_BRK LCTL(KC_PAUS) | ||
| 28 | 28 | ||
| 29 | #define MV_UP LCTL(KC_UP) | 29 | #define MV_UP LCTL(KC_UP) |
| 30 | #define MV_DOWN LCTL(KC_DOWN) | 30 | #define MV_DOWN LCTL(KC_DOWN) |
diff --git a/users/konstantin/tap_dance.c b/users/konstantin/tap_dance.c index b36bc3dcc..4ec8caa63 100644 --- a/users/konstantin/tap_dance.c +++ b/users/konstantin/tap_dance.c | |||
| @@ -111,8 +111,9 @@ qk_tap_dance_action_t tap_dance_actions[] = { | |||
| 111 | [TD_RCT_RSF] = ACTION_TAP_DANCE_DOUBLE_MOD(KC_RCTL, KC_RSFT), | 111 | [TD_RCT_RSF] = ACTION_TAP_DANCE_DOUBLE_MOD(KC_RCTL, KC_RSFT), |
| 112 | [TD_RSF_RCT] = ACTION_TAP_DANCE_DOUBLE_MOD(KC_RSFT, KC_RCTL), | 112 | [TD_RSF_RCT] = ACTION_TAP_DANCE_DOUBLE_MOD(KC_RSFT, KC_RCTL), |
| 113 | 113 | ||
| 114 | #ifdef LAYER_FN | ||
| 114 | [TD_LSFT_FN] = ACTION_TAP_DANCE_MOD_LAYER(KC_LSFT, L_FN), | 115 | [TD_LSFT_FN] = ACTION_TAP_DANCE_MOD_LAYER(KC_LSFT, L_FN), |
| 115 | [TD_RCTL_FN] = ACTION_TAP_DANCE_MOD_LAYER(KC_RCTL, L_FN), | 116 | [TD_RCTL_FN] = ACTION_TAP_DANCE_MOD_LAYER(KC_RCTL, L_FN), |
| 116 | |||
| 117 | [TD_FN_RCTL] = ACTION_TAP_DANCE_LAYER_MOD(L_FN, KC_RCTL), | 117 | [TD_FN_RCTL] = ACTION_TAP_DANCE_LAYER_MOD(L_FN, KC_RCTL), |
| 118 | #endif | ||
| 118 | }; | 119 | }; |
diff --git a/users/konstantin/tap_dance.h b/users/konstantin/tap_dance.h index 461d7ba8a..56889a19e 100644 --- a/users/konstantin/tap_dance.h +++ b/users/konstantin/tap_dance.h | |||
| @@ -8,10 +8,11 @@ | |||
| 8 | #define RCT_RSF TD(TD_RCT_RSF) | 8 | #define RCT_RSF TD(TD_RCT_RSF) |
| 9 | #define RSF_RCT TD(TD_RSF_RCT) | 9 | #define RSF_RCT TD(TD_RSF_RCT) |
| 10 | 10 | ||
| 11 | #define LSFT_FN TD(TD_LSFT_FN) | 11 | #ifdef LAYER_FN |
| 12 | #define RCTL_FN TD(TD_RCTL_FN) | 12 | #define LSFT_FN TD(TD_LSFT_FN) |
| 13 | 13 | #define RCTL_FN TD(TD_RCTL_FN) | |
| 14 | #define FN_RCTL TD(TD_FN_RCTL) | 14 | #define FN_RCTL TD(TD_FN_RCTL) |
| 15 | #endif | ||
| 15 | 16 | ||
| 16 | enum tap_dance { | 17 | enum tap_dance { |
| 17 | TD_DST_A_R, | 18 | TD_DST_A_R, |
| @@ -20,8 +21,9 @@ enum tap_dance { | |||
| 20 | TD_RCT_RSF, | 21 | TD_RCT_RSF, |
| 21 | TD_RSF_RCT, | 22 | TD_RSF_RCT, |
| 22 | 23 | ||
| 24 | #ifdef LAYER_FN | ||
| 23 | TD_LSFT_FN, | 25 | TD_LSFT_FN, |
| 24 | TD_RCTL_FN, | 26 | TD_RCTL_FN, |
| 25 | |||
| 26 | TD_FN_RCTL, | 27 | TD_FN_RCTL, |
| 28 | #endif | ||
| 27 | }; | 29 | }; |
