diff options
author | Joel Challis <git@zvecr.com> | 2023-11-26 18:36:45 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-27 05:36:45 +1100 |
commit | 1ed03f498fa204178c2696c510ac6a2cd8524e2d (patch) | |
tree | b97c1f983b7e4b57c007d0feedadd3ad3e39062b /users/rmw | |
parent | 4908d4b1ca260efecf3613e6517aa3a6f2034876 (diff) |
Remove userspace keymaps (#22544)
Diffstat (limited to 'users/rmw')
-rw-r--r-- | users/rmw/encoder_functions.c | 53 | ||||
-rw-r--r-- | users/rmw/encoder_functions.h | 11 | ||||
-rw-r--r-- | users/rmw/rmw.c | 1 | ||||
-rw-r--r-- | users/rmw/rmw.h | 87 | ||||
-rw-r--r-- | users/rmw/rules.mk | 9 | ||||
-rw-r--r-- | users/rmw/tapdances.c | 389 | ||||
-rw-r--r-- | users/rmw/tapdances.h | 46 |
7 files changed, 0 insertions, 596 deletions
diff --git a/users/rmw/encoder_functions.c b/users/rmw/encoder_functions.c deleted file mode 100644 index 39032d0eba..0000000000 --- a/users/rmw/encoder_functions.c +++ /dev/null @@ -1,53 +0,0 @@ -// Encoder functions to mix and match! - -#include "encoder_functions.h" - -void enc_move_words(bool cw){ // Move whole words. Hold shift to select while moving. - if (cw) { - tap_code16(A(KC_RGHT)); - } else { - tap_code16(A(KC_LEFT)); - } -} -void enc_history_scrubbing(bool cw){ // Undo/Redo. - if (cw) { - tap_code16(G(S(KC_Z))); - } else { - tap_code16(G(KC_Z)); - } -} -void enc_scrolling(bool cw){ // Scrolling. - if (cw) { - tap_code(KC_MS_WH_DOWN); - } else { - tap_code(KC_MS_WH_UP); - } -} -void enc_scrolling_h(bool cw){ // Scrolling. - if (cw) { - tap_code(KC_MS_WH_RIGHT); - } else { - tap_code(KC_MS_WH_LEFT); - } -} -void enc_volume_knob(bool cw){ // Volume control. - if (cw) { - tap_code(KC_VOLU); - } else { - tap_code(KC_VOLD); - } -} -void enc_move_desktop(bool cw){ // Switch Desktops (Mac). - if (cw) { - tap_code16(C(KC_RIGHT)); - } else { - tap_code16(C(KC_LEFT)); - } -} -void enc_zoom(bool cw){ // Zoom in/zoom out. - if (cw) { - tap_code16(G(KC_PLUS)); - } else { - tap_code16(G(KC_MINUS)); - } -} diff --git a/users/rmw/encoder_functions.h b/users/rmw/encoder_functions.h deleted file mode 100644 index d80a78668a..0000000000 --- a/users/rmw/encoder_functions.h +++ /dev/null @@ -1,11 +0,0 @@ -#pragma once -#include QMK_KEYBOARD_H -#include "rmw.h" - -void enc_move_words(bool cw); -void enc_history_scrubbing(bool cw); -void enc_scrolling(bool cw); -void enc_scrolling_h(bool cw); -void enc_volume_knob(bool cw); -void enc_move_desktop(bool cw); -void enc_zoom(bool cw); diff --git a/users/rmw/rmw.c b/users/rmw/rmw.c deleted file mode 100644 index bb1c1984f5..0000000000 --- a/users/rmw/rmw.c +++ /dev/null @@ -1 +0,0 @@ -#include "rmw.h" diff --git a/users/rmw/rmw.h b/users/rmw/rmw.h deleted file mode 100644 index b4018d5570..0000000000 --- a/users/rmw/rmw.h +++ /dev/null @@ -1,87 +0,0 @@ -#pragma once -#include QMK_KEYBOARD_H - -#include "quantum.h" -#include "action.h" -#include "version.h" - -#ifdef TAP_DANCE_ENABLE -#include "tapdances.h" -#endif - -#ifdef ENCODER_ENABLE -#include "encoder_functions.h" -#endif - -enum user_layers { - QWERTY = 0 - ,MINIMAK4 - ,NUMPAD - ,EDIT - ,FSYM - ,JSYM - ,MEDIA - ,ADJUST -}; - - -// Custom keycodes -#define SFTENT SFT_T(KC_ENT) - -enum user_custom_keycodes_universal { - VRSN = SAFE_RANGE - ,OS_CSFT = OSM(MOD_LSFT | MOD_LCTL) - ,OS_GSFT = OSM(MOD_LSFT | MOD_LGUI) - ,OS_CALT = OSM(MOD_LCTL | MOD_LALT) - ,OS_ALT = OSM(MOD_LALT) - ,OS_CTL = OSM(MOD_LCTL) - ,NEW_SAFE_RANGE -}; - -#ifdef MACOSX - enum user_custom_keycodes { - FORM_GET = NEW_SAFE_RANGE - ,FORM_PUT - ,OS_CMD = OSM(MOD_LGUI) - ,R_UNDO = LGUI(KC_Z) - ,R_REDO = LGUI(KC_Y) - ,R_CUT = LGUI(KC_X) - ,R_COPY = LGUI(KC_C) - ,R_PASTE = LGUI(KC_V) - ,DEL_WRD = LALT(KC_BACKSPACE) - ,MVW_LEFT = LALT(KC_LEFT) - ,MVW_RIGHT = LALT(KC_RIGHT) - ,SELW_LEFT = LALT(S(KC_LEFT)) - ,SELW_RIGHT = LALT(S(KC_RIGHT)) - ,NEW_TAB = LGUI(KC_T) - ,TASK_MAN = LGUI(LALT(KC_ESCAPE)) - ,SEL_HOME = S(LGUI(KC_LEFT)) - ,SEL_END = S(LGUI(KC_RIGHT)) - ,R_HOME = LGUI(KC_LEFT) - ,R_END = LGUI(KC_RIGHT) - }; -#endif - -#ifdef WINDOWS - enum user_custom_keycodes { - FORM_GET = NEW_SAFE_RANGE - ,FORM_PUT - ,OS_WIN = OSM(MOD_LGUI) - ,R_UNDO = LCTL(KC_Z) - ,R_REDO = LCTL(KC_Y) - ,R_CUT = LCTL(KC_X) - ,R_COPY = LCTL(KC_C) - ,R_PASTE = LCTL(KC_V) - ,DEL_WRD = LALT(KC_BACKSPACE) - ,MVW_LEFT = LCTL(KC_LEFT) - ,MVW_RIGHT = LCTL(KC_RIGHT) - ,SELW_LEFT = LCTL(S(KC_LEFT)) - ,SELW_RIGHT = LCTL(S(KC_RIGHT)) - ,NEW_TAB = LCTL(KC_T) - ,TASK_MAN = LCTL(LALT(KC_ESCAPE)) - ,SEL_HOME = S(KC_HOME) - ,SEL_END = S(KC_END) - ,R_HOME = KC_HOME - ,R_END = KC_END -}; -#endif diff --git a/users/rmw/rules.mk b/users/rmw/rules.mk deleted file mode 100644 index 468745dbc2..0000000000 --- a/users/rmw/rules.mk +++ /dev/null @@ -1,9 +0,0 @@ -SRC += rmw.c - -ifdef TAP_DANCE_ENABLE -SRC += tapdances.c -endif - -ifdef ENCODER_ENABLE -SRC += encoder_functions.c -endif diff --git a/users/rmw/tapdances.c b/users/rmw/tapdances.c deleted file mode 100644 index 792bd83e55..0000000000 --- a/users/rmw/tapdances.c +++ /dev/null @@ -1,389 +0,0 @@ -// Useful tapdance functions! - -#include "tapdances.h" - -tap_dance_action_t tap_dance_actions[] = { - [SHCAP] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, caps, shift_reset) - ,[TDGUI] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, shiftgui, gui_reset) - ,[TDGUI2] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, guictl, ubermod_reset) - ,[SHENT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, shiftenter, shift_reset) - ,[SHNTC] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, shiftentercaps, shift_reset) - ,[GCA] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, ubermod_mac, ubermod_reset) // GUI->CTL->ALT - ,[AGC] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, ubermod2_mac, ubermod_reset) // ALT->GUI->CTL - ,[SGCA] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, shift_and_mac, CASG_reset) // SG->SC->SA - ,[GUCTL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, guictl, ubermod_reset) - ,[CAG] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, ubermod, ubermod_reset) // CTL->ALT->GUI - ,[ACG] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, ubermod2, ubermod_reset) // ALT->GUI->CTL - ,[SCAG] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, shift_and, CASG_reset) // SG->SC->SA - ,[DLTR] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, deleter, ubermod_reset) // backspace, backspace, alt backspace, gui backspace - ,[FRBK2] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, forward_back_mac, ubermod_reset) - ,[CTLALL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, ctrl_all_mac, ubermod_reset) // C->CG->CA->CAG - ,[CTLAND] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, ctrl_all, ubermod_reset) // C->CA->CG->CAG - ,[FRBK] = ACTION_TAP_DANCE_DOUBLE(KC_WWW_BACK,KC_WWW_FORWARD) -}; - -void caps(tap_dance_state_t *state, void *user_data) // Shift, Caps -{ if (state->count >= 2) {register_code(KC_CAPS); unregister_code(KC_CAPS);} - else if (state->pressed) {register_mods(MOD_LSFT);} else {set_oneshot_mods(MOD_LSFT);} - reset_tap_dance(state); -} - -void forward_back_mac(tap_dance_state_t *state, void *user_data) // G<-, then G-> -{ - if (state->count > 1) { - tap_code16(G(KC_RGHT)); - } - else { - tap_code16(G(KC_LEFT)); - } - reset_tap_dance(state); -} - -void shiftgui(tap_dance_state_t *state, void *user_data) // G->SG -{ - if (state->count > 1) { - if (state->pressed) { - register_mods(MOD_LSFT | MOD_LGUI); - } - else { - set_oneshot_mods(MOD_LSFT | MOD_LGUI); - } - } - else if (state->pressed) { - register_mods(MOD_LGUI); - } - else { - set_oneshot_mods(MOD_LGUI); - } - reset_tap_dance(state); -} - -void guictl(tap_dance_state_t *state, void *user_data) // G->GC -{ - if (state->count > 1) { - if (state->pressed) { - register_mods(MOD_LCTL | MOD_LGUI); - } - else { - set_oneshot_mods(MOD_LCTL | MOD_LGUI); - } - } - else if (state->pressed) { - register_mods(MOD_LGUI); - } - else { - set_oneshot_mods(MOD_LGUI); - } - reset_tap_dance(state); -} - -void deleter(tap_dance_state_t *state, void *user_data) // bkspc -> delwrd -> delline -{ - if (state->count > 3) { - tap_code16(G(KC_BSPC)); - } - else if (state->count > 2) { - tap_code16(A(KC_BSPC)); - } - else { - tap_code(KC_BSPC); - } - reset_tap_dance(state); -} - -void ubermod(tap_dance_state_t *state, void *user_data) // CTL->ALT->GUI -{ - if (state->count > 2) { - if (state->pressed) { - register_mods(MOD_LGUI); - } - else { - set_oneshot_mods(MOD_LGUI); - } - } - else if (state->count > 1) { - if (state->pressed) { - register_mods(MOD_LALT); - } - else { - set_oneshot_mods(MOD_LALT); - } - } - else if (state->pressed) { - register_mods(MOD_LCTL); - } - else { - set_oneshot_mods(MOD_LCTL); - } - reset_tap_dance(state); -} - -void ubermod_mac(tap_dance_state_t *state, void *user_data) // GUI->CTL->ALT -{ - if (state->count > 2) { - if (state->pressed) { - register_mods(MOD_LALT); - } - else { - set_oneshot_mods(MOD_LALT); - } - } - else if (state->count > 1) { - if (state->pressed) { - register_mods(MOD_LCTL); - } - else { - set_oneshot_mods(MOD_LCTL); - } - } - else if (state->pressed) { - register_mods(MOD_LGUI); - } - else { - set_oneshot_mods(MOD_LGUI); - } - reset_tap_dance(state); -} - -void ubermod2(tap_dance_state_t *state, void *user_data) // ALT->CTL->GUI -{ - if (state->count > 2) { - if (state->pressed) { - register_mods(MOD_LGUI); - } - else { - set_oneshot_mods(MOD_LGUI); - } - } - else if (state->count > 1) { - if (state->pressed) { - register_mods(MOD_LCTL); - } - else { - set_oneshot_mods(MOD_LCTL); - } - } - else if (state->pressed) { - register_mods(MOD_LALT); - } - else { - set_oneshot_mods(MOD_LALT); - } - reset_tap_dance(state); -} - -void ubermod2_mac(tap_dance_state_t *state, void *user_data) // ALT->GUI->CTL -{ - if (state->count > 2) { - if (state->pressed) { - register_mods(MOD_LCTL); - } - else { - set_oneshot_mods(MOD_LCTL); - } - } - else if (state->count > 1) { - if (state->pressed) { - register_mods(MOD_LGUI); - } - else { - set_oneshot_mods(MOD_LGUI); - } - } - else if (state->pressed) { - register_mods(MOD_LALT); - } - else { - set_oneshot_mods(MOD_LALT); - } - reset_tap_dance(state); -} - -void shift_reset(tap_dance_state_t *state, void *user_data) -{ - unregister_mods(MOD_LSFT); - // clear_oneshot_mods(); -} -void gui_reset(tap_dance_state_t *state, void *user_data) -{ - unregister_mods(MOD_LSFT | MOD_LGUI); -} -void CAS_reset(tap_dance_state_t *state, void *user_data) -{ - unregister_mods(MOD_LCTL | MOD_LSFT | MOD_LALT); -} -void CASG_reset(tap_dance_state_t *state, void *user_data) -{ - unregister_mods(MOD_LCTL | MOD_LSFT | MOD_LALT | MOD_LGUI); - // clear_oneshot_mods(); -} -void ubermod_reset(tap_dance_state_t *state, void *user_data) // AKA CAG_reset -{ - unregister_mods(MOD_LCTL | MOD_LALT | MOD_LGUI); -} - -void shiftenter(tap_dance_state_t *state, void *user_data) -{ - if (state->count > 1) { - tap_code(KC_ENT); - } - else if (state->pressed) { - register_mods(MOD_LSFT); - } - else { - set_oneshot_mods(MOD_LSFT); - } - reset_tap_dance(state); -} - -void shiftentercaps(tap_dance_state_t *state, void *user_data) -{ - if (state->count > 2) { - tap_code(KC_CAPS); - } - else if (state->count > 1) { - tap_code(KC_ENT); - } - else if (state->pressed) { - register_mods(MOD_LSFT); - } - else { - set_oneshot_mods(MOD_LSFT); - } - reset_tap_dance(state); -} - -void ctrl_all_mac(tap_dance_state_t *state, void *user_data) // C->CG->CAG -{ - if (state->count > 2) { - if (state->pressed) { - register_mods(MOD_LCTL | MOD_LALT | MOD_LGUI); - } - else { - set_oneshot_mods(MOD_LCTL | MOD_LGUI | MOD_LALT); - } - } - else if (state->count > 1) { - if (state->pressed) { - register_mods(MOD_LCTL | MOD_LGUI); - } - else { - set_oneshot_mods(MOD_LCTL | MOD_LGUI); - } - } - else if (state->pressed) { - register_mods(MOD_LCTL); - } - else { - set_oneshot_mods(MOD_LCTL); - } - reset_tap_dance(state); -} - -void ctrl_all(tap_dance_state_t *state, void *user_data) // C->CA->SC -{ - if (state->count > 2) { - if (state->pressed) { - register_mods(MOD_LCTL | MOD_LSFT); - } - else { - set_oneshot_mods(MOD_LCTL | MOD_LSFT); - } - } - else if (state->count > 1) { - if (state->pressed) { - register_mods(MOD_LCTL | MOD_LALT); - } - else { - set_oneshot_mods(MOD_LCTL | MOD_LALT); - } - } - else if (state->pressed) { - register_mods(MOD_LCTL); - } - else { - set_oneshot_mods(MOD_LCTL); - } - reset_tap_dance(state); -} - -void alt_all(tap_dance_state_t *state, void *user_data) // A->SA->AC -{ - if (state->count > 2) { - if (state->pressed) { - register_mods(MOD_LCTL | MOD_LALT); - } - else { - set_oneshot_mods(MOD_LALT | MOD_LCTL); - } - } - else if (state->count > 1) { - if (state->pressed) { - register_mods(MOD_LSFT | MOD_LALT); - } - else { - set_oneshot_mods(MOD_LALT | MOD_LSFT); - } - } - else if (state->pressed) { - register_mods(MOD_LALT); - } - else { - set_oneshot_mods(MOD_LALT); - } - reset_tap_dance(state); -} - -void shift_and(tap_dance_state_t *state, void *user_data) // SC->SA->SG -{ - if (state->count > 2) { - if (state->pressed) { - register_mods(MOD_LSFT | MOD_LGUI); - } - else { - set_oneshot_mods(MOD_LGUI | MOD_LSFT); - } - } - else if (state->count > 1) { - if (state->pressed) { - register_mods(MOD_LSFT | MOD_LALT); - } - else { - set_oneshot_mods(MOD_LALT | MOD_LSFT); - } - } - else if (state->pressed) { - register_mods(MOD_LCTL | MOD_LSFT); - } - else { - set_oneshot_mods(MOD_LSFT | MOD_LCTL); - } - reset_tap_dance(state); -} - -void shift_and_mac(tap_dance_state_t *state, void *user_data) // SG->SC->SA -{ - if (state->count > 1) { - if (state->pressed) { - register_mods(MOD_LSFT | MOD_LALT); - } - else { - set_oneshot_mods(MOD_LALT | MOD_LSFT); - } - } - else if (state->count > 2) { - if (state->pressed) { - register_mods(MOD_LCTL | MOD_LSFT); - } - else { - set_oneshot_mods(MOD_LSFT | MOD_LCTL); - } - } - else if (state->pressed) { - register_mods(MOD_LSFT | MOD_LGUI); - } - else { - set_oneshot_mods(MOD_LGUI | MOD_LSFT); - } - reset_tap_dance(state); -} diff --git a/users/rmw/tapdances.h b/users/rmw/tapdances.h deleted file mode 100644 index f358358cb6..0000000000 --- a/users/rmw/tapdances.h +++ /dev/null @@ -1,46 +0,0 @@ -#pragma once -#include "rmw.h" -#include "process_tap_dance.h" -#include "action.h" - -void caps(tap_dance_state_t *state, void *user_data); // Shift, Caps -void forward_back_mac(tap_dance_state_t *state, void *user_data); // G<-, then G-> -void shiftgui(tap_dance_state_t *state, void *user_data); // G->SG -void guictl(tap_dance_state_t *state, void *user_data); // G->GC -void deleter(tap_dance_state_t *state, void *user_data); // bkspc -> delwrd -> delline -void ubermod(tap_dance_state_t *state, void *user_data); // CTL->ALT->GUI -void ubermod_mac(tap_dance_state_t *state, void *user_data); // GUI->CTL->ALT -void ubermod2(tap_dance_state_t *state, void *user_data); // ALT->CTL->GUI -void ubermod2_mac(tap_dance_state_t *state, void *user_data); // ALT->GUI->CTL -void shift_reset(tap_dance_state_t *state, void *user_data); -void gui_reset(tap_dance_state_t *state, void *user_data); -void CAS_reset(tap_dance_state_t *state, void *user_data); -void CASG_reset(tap_dance_state_t *state, void *user_data); -void ubermod_reset(tap_dance_state_t *state, void *user_data); // AKA CAG_reset -void shiftenter(tap_dance_state_t *state, void *user_data); -void shiftentercaps(tap_dance_state_t *state, void *user_data); -void ctrl_all_mac(tap_dance_state_t *state, void *user_data); // C->CG->CAG -void ctrl_all(tap_dance_state_t *state, void *user_data); // C->CA->SC -void alt_all(tap_dance_state_t *state, void *user_data); // A->SA->AC -void shift_and(tap_dance_state_t *state, void *user_data); // SC->SA->SG -void shift_and_mac(tap_dance_state_t *state, void *user_data); // SG->SC->SA - -enum { - SHCAP = 0 - ,TDGUI - ,TDGUI2 - ,SHENT - ,SHNTC - ,GUCTL - ,FRBK - ,FRBK2 - ,GCA - ,AGC - ,SGCA - ,SCAG - ,CAG - ,ACG - ,CTLALL - ,CTLAND - ,DLTR -}; |