summaryrefslogtreecommitdiffstats
path: root/users/konstantin
diff options
context:
space:
mode:
authorKonstantin Đorđević <vomindoraan@gmail.com>2019-01-28 09:04:47 +0100
committerKonstantin Đorđević <vomindoraan@gmail.com>2019-03-02 15:15:51 +0100
commit6f386ca6ae82be9212700dbfeb73517d077bef5a (patch)
treea8b14097f72224c92a83c94dd835c1e9a7887007 /users/konstantin
parent6e48ea082dc27ac25bd0422e974cefe7a00788f6 (diff)
Change how desktop commands work
Diffstat (limited to 'users/konstantin')
-rw-r--r--users/konstantin/konstantin.c12
-rw-r--r--users/konstantin/konstantin.h7
-rw-r--r--users/konstantin/tap_dance.c2
-rw-r--r--users/konstantin/tap_dance.h6
4 files changed, 22 insertions, 5 deletions
diff --git a/users/konstantin/konstantin.c b/users/konstantin/konstantin.c
index 47596279c3..bf92a503e6 100644
--- a/users/konstantin/konstantin.c
+++ b/users/konstantin/konstantin.c
@@ -28,6 +28,18 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
return false;
+ case DST_P_R:
+ (record->event.pressed ? register_code16 : unregister_code16)(
+ (get_mods() & MOD_MASK_CTRL) ? DST_RMV : DST_PRV
+ );
+ return false;
+
+ case DST_N_A:
+ (record->event.pressed ? register_code16 : unregister_code16)(
+ (get_mods() & MOD_MASK_CTRL) ? DST_ADD : DST_NXT
+ );
+ return false;
+
#ifdef LAYER_FN
static bool fn_lock;
diff --git a/users/konstantin/konstantin.h b/users/konstantin/konstantin.h
index f67f9f1b7e..3ca4f401e0 100644
--- a/users/konstantin/konstantin.h
+++ b/users/konstantin/konstantin.h
@@ -23,6 +23,11 @@
#define PRV_TAB LCTL(KC_PGUP)
#define NXT_TAB LCTL(KC_PGDN)
+#define DST_ADD LCTL(LGUI(KC_D))
+#define DST_RMV LCTL(LGUI(KC_F4))
+#define DST_PRV LCTL(LGUI(KC_LEFT))
+#define DST_NXT LCTL(LGUI(KC_RGHT))
+
#define LCT_CPS LCTL_T(KC_CAPS)
#ifdef SEND_STRING_CLEAN
@@ -37,6 +42,8 @@
enum keycodes_user {
CLEAR = SAFE_RANGE,
+ DST_P_R,
+ DST_N_A,
#ifdef LAYER_NUMPAD
NUMPAD,
#endif
diff --git a/users/konstantin/tap_dance.c b/users/konstantin/tap_dance.c
index b13f33c024..e3f1729467 100644
--- a/users/konstantin/tap_dance.c
+++ b/users/konstantin/tap_dance.c
@@ -82,7 +82,7 @@ void td_lsft_fn_reset(qk_tap_dance_state_t *state, void *user_data) {
}
qk_tap_dance_action_t tap_dance_actions[] = {
- [TD_DESKTOP] = ACTION_TAP_DANCE_DOUBLE(LCTL(LGUI(KC_D)), LCTL(LGUI(KC_F4))), // Add/close virtual desktop
+ [TD_DST_A_R] = ACTION_TAP_DANCE_DOUBLE(DST_ADD, DST_RMV),
[TD_RAL_LAL] = ACTION_TAP_DANCE_DOUBLE_MODS(KC_RALT, KC_LALT),
[TD_RAL_RGU] = ACTION_TAP_DANCE_DOUBLE_MODS(KC_RALT, KC_RGUI),
diff --git a/users/konstantin/tap_dance.h b/users/konstantin/tap_dance.h
index 922a635141..1757e9b113 100644
--- a/users/konstantin/tap_dance.h
+++ b/users/konstantin/tap_dance.h
@@ -2,9 +2,7 @@
#include "quantum.h"
-#define DESKTOP TD(TD_DESKTOP)
-#define DSKTP_L LCTL(LGUI(KC_LEFT))
-#define DSKTP_R LCTL(LGUI(KC_RGHT))
+#define DST_A_R TD(TD_DST_A_R)
#define RAL_LAL TD(TD_RAL_LAL)
#define RAL_RGU TD(TD_RAL_RGU)
@@ -14,7 +12,7 @@
#define LSFT_FN TD(TD_LSFT_FN)
enum tap_dance {
- TD_DESKTOP,
+ TD_DST_A_R,
TD_RAL_LAL,
TD_RAL_RGU,