Change how desktop commands work
This commit is contained in:
parent
6e48ea082d
commit
6f386ca6ae
@ -58,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤
|
||||
* │ │Mut│VoD│VoU│Ply│Prv│Nxt│MW←│MW→│M4 │M5 │ │ │
|
||||
* └─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─┴───┘
|
||||
* │ │ │ MW↓ │MAcl2│ │
|
||||
* │DPR│DstNA│ MW↓ │MAcl2│ │
|
||||
* └───┴─────┴───────────────────────────┴─────┴───┘
|
||||
*/
|
||||
[L_FN] = LAYOUT(
|
||||
@ -66,7 +66,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
_______, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, _______, _______, _______, KC_BTN1, KC_MS_U, KC_BTN2, KC_BTN3, KC_DEL,
|
||||
_______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, _______, KC_WH_U, KC_MS_L, KC_MS_D, KC_MS_R, _______,
|
||||
_______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY, KC_MPRV, KC_MNXT, KC_WH_L, KC_WH_R, KC_BTN4, KC_BTN5, _______, _______,
|
||||
XXXXXXX, _______, _______, KC_WH_D, KC_ACL2, _______, XXXXXXX
|
||||
XXXXXXX, DST_P_R, DST_N_A, KC_WH_D, KC_ACL2, _______, XXXXXXX
|
||||
),
|
||||
|
||||
/* RCtrl layer
|
||||
@ -79,7 +79,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤
|
||||
* │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||
* └─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─┴───┘
|
||||
* │Dst│Dstp←│ │Dstp→│ │
|
||||
* │DtR│DstA │ │ │ │
|
||||
* └───┴─────┴───────────────────────────┴─────┴───┘
|
||||
*/
|
||||
[L_RCTRL] = LAYOUT(
|
||||
@ -87,6 +87,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
_______, TOP, MV_UP, BOTTOM, PRV_TAB, _______, _______, _______, _______, _______, _______, _______, _______, CLEAR,
|
||||
_______, MV_LEFT, MV_DOWN, MV_RGHT, NXT_TAB, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
XXXXXXX, DESKTOP, DSKTP_L, _______, DSKTP_R, _______, XXXXXXX
|
||||
XXXXXXX, DST_RMV, DST_ADD, _______, _______, _______, XXXXXXX
|
||||
),
|
||||
};
|
||||
|
@ -33,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤
|
||||
* │ │MA0│MA2│MW←│MW→│ │ │ │VoD│VoU│Mut│ App │PgU│Btm│
|
||||
* ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤
|
||||
* │ │Dstp│Dst←│ MW↓ │Dst→│ │ │Hom│PgD│End│
|
||||
* │ │DtPR│DtNA│ MW↓ │ │ │ │Hom│PgD│End│
|
||||
* └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘
|
||||
*/
|
||||
[L_FN] = LAYOUT_truefox( \
|
||||
@ -41,7 +41,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_BTN4, KC_BTN2, KC_MS_U, KC_BTN1, KC_BTN3, KC_BTN5, _______, UC_MOD, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, CLEAR, KC_INS, \
|
||||
_______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, TOP, \
|
||||
_______, KC_ACL0, KC_ACL2, KC_WH_L, KC_WH_R, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_APP, KC_PGUP, BOTTOM, \
|
||||
_______, DESKTOP, DSKTP_L, KC_WH_D, DSKTP_R, _______, KC_HOME, KC_PGDN, KC_END \
|
||||
_______, DST_P_R, DST_N_A, KC_WH_D, _______, _______, KC_HOME, KC_PGDN, KC_END \
|
||||
),
|
||||
|
||||
/* Numpad layer
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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
|
||||
|
@ -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),
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user