summaryrefslogtreecommitdiffstats
path: root/users/konstantin
diff options
context:
space:
mode:
authorKonstantin Đorđević <vomindoraan@gmail.com>2019-09-03 17:42:05 +0200
committerDrashna Jaelre <drashna@live.com>2019-09-03 08:42:05 -0700
commitd633cf3ccbf1aed229ef92bdc2f2a1f4f67dd0ad (patch)
tree469db5ce07f2ee43f5c06b2b19d146e687213ee3 /users/konstantin
parent55bae0a5b48a004288013f2fa7cbfd49dfb16273 (diff)
[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.c15
-rw-r--r--users/konstantin/konstantin.h6
-rw-r--r--users/konstantin/tap_dance.c3
-rw-r--r--users/konstantin/tap_dance.h12
4 files changed, 19 insertions, 17 deletions
diff --git a/users/konstantin/konstantin.c b/users/konstantin/konstantin.c
index c56c9490fc..98b11b3a91 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) {
if (record->event.pressed && record->tap.count == TAPPING_TOGGLE) {
fn_lock = !IS_LAYER_ON(L_FN); // Fn layer will be toggled after this
}
- return true;
+ break;
#endif
case KC_ESC:
@@ -58,7 +58,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
#endif
}
- return true;
+ break;
case CLEAR:
if (record->event.pressed) {
@@ -66,25 +66,24 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
SEND_STRING(SS_LCTRL("a") SS_TAP(X_DELETE));
)
}
- return false;
+ break;
case DST_P_R:
kc = (get_mods() & DST_MOD_MASK) ? DST_REM : DST_PRV;
CLEAN_MODS(
(record->event.pressed ? register_code16 : unregister_code16)(kc);
)
- return false;
+ break;
case DST_N_A:
kc = (get_mods() & DST_MOD_MASK) ? DST_ADD : DST_NXT;
CLEAN_MODS(
(record->event.pressed ? register_code16 : unregister_code16)(kc);
)
- return false;
-
- default:
- return true;
+ break;
}
+
+ return true;
}
__attribute__((weak))
diff --git a/users/konstantin/konstantin.h b/users/konstantin/konstantin.h
index 84d90dda57..f42d5feaaa 100644
--- a/users/konstantin/konstantin.h
+++ b/users/konstantin/konstantin.h
@@ -13,6 +13,7 @@
#ifdef LAYER_FN
#define FN MO(L_FN)
+ #define FNLK TG(L_FN)
#define FN_CAPS LT(L_FN, KC_CAPS)
#define FN_ESC LT(L_FN, KC_ESC)
#define FN_FNLK TT(L_FN)
@@ -22,9 +23,8 @@
#define NUMPAD TG(L_NUMPAD)
#endif
-#define KC_SYSR LALT(KC_PSCR)
-#undef KC_BRK
-#define KC_BRK LCTL(KC_PAUS)
+#define BREAK LCTL(KC_PAUS)
+#define SYSRQ LALT(KC_PSCR)
#define MV_UP LCTL(KC_UP)
#define MV_DOWN LCTL(KC_DOWN)
diff --git a/users/konstantin/tap_dance.c b/users/konstantin/tap_dance.c
index b36bc3dcc8..4ec8caa63f 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[] = {
[TD_RCT_RSF] = ACTION_TAP_DANCE_DOUBLE_MOD(KC_RCTL, KC_RSFT),
[TD_RSF_RCT] = ACTION_TAP_DANCE_DOUBLE_MOD(KC_RSFT, KC_RCTL),
+#ifdef LAYER_FN
[TD_LSFT_FN] = ACTION_TAP_DANCE_MOD_LAYER(KC_LSFT, L_FN),
[TD_RCTL_FN] = ACTION_TAP_DANCE_MOD_LAYER(KC_RCTL, L_FN),
-
[TD_FN_RCTL] = ACTION_TAP_DANCE_LAYER_MOD(L_FN, KC_RCTL),
+#endif
};
diff --git a/users/konstantin/tap_dance.h b/users/konstantin/tap_dance.h
index 461d7ba8a9..56889a19ef 100644
--- a/users/konstantin/tap_dance.h
+++ b/users/konstantin/tap_dance.h
@@ -8,10 +8,11 @@
#define RCT_RSF TD(TD_RCT_RSF)
#define RSF_RCT TD(TD_RSF_RCT)
-#define LSFT_FN TD(TD_LSFT_FN)
-#define RCTL_FN TD(TD_RCTL_FN)
-
-#define FN_RCTL TD(TD_FN_RCTL)
+#ifdef LAYER_FN
+ #define LSFT_FN TD(TD_LSFT_FN)
+ #define RCTL_FN TD(TD_RCTL_FN)
+ #define FN_RCTL TD(TD_FN_RCTL)
+#endif
enum tap_dance {
TD_DST_A_R,
@@ -20,8 +21,9 @@ enum tap_dance {
TD_RCT_RSF,
TD_RSF_RCT,
+#ifdef LAYER_FN
TD_LSFT_FN,
TD_RCTL_FN,
-
TD_FN_RCTL,
+#endif
};