diff options
Diffstat (limited to 'keyboards/whitefox')
| -rw-r--r-- | keyboards/whitefox/keymaps/billypython/config.h | 3 | ||||
| -rw-r--r-- | keyboards/whitefox/keymaps/billypython/keymap.c | 52 | ||||
| -rw-r--r-- | keyboards/whitefox/keymaps/billypython/rules.mk | 5 | ||||
| -rw-r--r-- | keyboards/whitefox/keymaps/konstantin/rules.mk | 5 |
4 files changed, 12 insertions, 53 deletions
diff --git a/keyboards/whitefox/keymaps/billypython/config.h b/keyboards/whitefox/keymaps/billypython/config.h index d1c3002d2..275f8effb 100644 --- a/keyboards/whitefox/keymaps/billypython/config.h +++ b/keyboards/whitefox/keymaps/billypython/config.h | |||
| @@ -2,9 +2,6 @@ | |||
| 2 | 2 | ||
| 3 | #define FORCE_NKRO | 3 | #define FORCE_NKRO |
| 4 | 4 | ||
| 5 | #undef IS_COMMAND | ||
| 6 | #define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RCTL))) | ||
| 7 | |||
| 8 | #define MAGIC_KEY_LAYER0_ALT1 BSLS | 5 | #define MAGIC_KEY_LAYER0_ALT1 BSLS |
| 9 | #define MAGIC_KEY_BOOTLOADER ESC | 6 | #define MAGIC_KEY_BOOTLOADER ESC |
| 10 | 7 | ||
diff --git a/keyboards/whitefox/keymaps/billypython/keymap.c b/keyboards/whitefox/keymaps/billypython/keymap.c index 8096885cf..dfc7d6a96 100644 --- a/keyboards/whitefox/keymaps/billypython/keymap.c +++ b/keyboards/whitefox/keymaps/billypython/keymap.c | |||
| @@ -2,18 +2,11 @@ | |||
| 2 | 2 | ||
| 3 | #define TOP LCTL(KC_HOME) | 3 | #define TOP LCTL(KC_HOME) |
| 4 | #define BOTTOM LCTL(KC_END) | 4 | #define BOTTOM LCTL(KC_END) |
| 5 | #define DSKTP_L LCTL(LGUI(KC_LEFT)) | ||
| 6 | #define DSKTP_R LCTL(LGUI(KC_RGHT)) | ||
| 7 | 5 | ||
| 8 | #define FN MO(L_FN) | 6 | #define FN MO(L_FN) |
| 9 | #define FN_CAPS LT(L_FN, KC_CAPS) | 7 | #define FN_CAPS LT(L_FN, KC_CAPS) |
| 10 | #define FN_FNLK TT(L_FN) | 8 | #define FN_FNLK TT(L_FN) |
| 11 | 9 | ||
| 12 | #define DESKTOP TD(TD_DESKTOP) | ||
| 13 | #define FN_RCTL TD(TD_FN_RCTL) | ||
| 14 | #define RAL_LAL TD(TD_RAL_LAL) | ||
| 15 | #define RAL_RGU TD(TD_RAL_RGU) | ||
| 16 | #define RCT_RSF TD(TD_RCT_RSF) | ||
| 17 | #define RSF_RCT TD(TD_RSF_RCT) | 10 | #define RSF_RCT TD(TD_RSF_RCT) |
| 18 | 11 | ||
| 19 | #define COMMA UC(0x002C) | 12 | #define COMMA UC(0x002C) |
| @@ -62,37 +55,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 62 | } | 55 | } |
| 63 | } | 56 | } |
| 64 | 57 | ||
| 65 | struct { | ||
| 66 | bool fn_on; // Layer state when tap dance started | ||
| 67 | bool started; | ||
| 68 | } td_fn_rctrl_data; | ||
| 69 | |||
| 70 | void td_fn_rctrl_each(qk_tap_dance_state_t *state, void *user_data) { | ||
| 71 | if (!td_fn_rctrl_data.started) { | ||
| 72 | td_fn_rctrl_data.fn_on = IS_LAYER_ON(L_FN); | ||
| 73 | td_fn_rctrl_data.started = true; | ||
| 74 | } | ||
| 75 | // Single tap → Fn, double tap → RCtrl, triple tap etc. → Fn+RCtrl | ||
| 76 | if (state->count == 1 || state->count == 3) { | ||
| 77 | layer_on(L_FN); | ||
| 78 | } else if (state->count == 2) { | ||
| 79 | if (!td_fn_rctrl_data.fn_on) { | ||
| 80 | layer_off(L_FN); | ||
| 81 | } | ||
| 82 | register_code(KC_RCTL); | ||
| 83 | } | ||
| 84 | } | ||
| 85 | |||
| 86 | void td_fn_rctrl_reset(qk_tap_dance_state_t *state, void *user_data) { | ||
| 87 | if ((state->count == 1 || state->count > 2) && !td_fn_rctrl_data.fn_on) { | ||
| 88 | layer_off(L_FN); | ||
| 89 | } | ||
| 90 | if (state->count >= 2) { | ||
| 91 | unregister_code(KC_RCTL); | ||
| 92 | } | ||
| 93 | td_fn_rctrl_data.started = false; | ||
| 94 | } | ||
| 95 | |||
| 96 | #define ACTION_TAP_DANCE_DOUBLE_MODS(mod1, mod2) { \ | 58 | #define ACTION_TAP_DANCE_DOUBLE_MODS(mod1, mod2) { \ |
| 97 | .fn = { td_double_mods_each, NULL, td_double_mods_reset }, \ | 59 | .fn = { td_double_mods_each, NULL, td_double_mods_reset }, \ |
| 98 | .user_data = &(qk_tap_dance_pair_t){ mod1, mod2 }, \ | 60 | .user_data = &(qk_tap_dance_pair_t){ mod1, mod2 }, \ |
| @@ -122,20 +84,10 @@ void td_double_mods_reset(qk_tap_dance_state_t *state, void *user_data) { | |||
| 122 | } | 84 | } |
| 123 | 85 | ||
| 124 | enum tap_dance { | 86 | enum tap_dance { |
| 125 | TD_DESKTOP, | ||
| 126 | TD_FN_RCTL, | ||
| 127 | TD_RAL_LAL, | ||
| 128 | TD_RAL_RGU, | ||
| 129 | TD_RCT_RSF, | ||
| 130 | TD_RSF_RCT, | 87 | TD_RSF_RCT, |
| 131 | }; | 88 | }; |
| 132 | 89 | ||
| 133 | qk_tap_dance_action_t tap_dance_actions[] = { | 90 | qk_tap_dance_action_t tap_dance_actions[] = { |
| 134 | [TD_DESKTOP] = ACTION_TAP_DANCE_DOUBLE(LCTL(LGUI(KC_D)), LCTL(LGUI(KC_F4))), // Add/close virtual desktop | ||
| 135 | [TD_FN_RCTL] = ACTION_TAP_DANCE_FN_ADVANCED(td_fn_rctrl_each, NULL, td_fn_rctrl_reset), | ||
| 136 | [TD_RAL_LAL] = ACTION_TAP_DANCE_DOUBLE_MODS(KC_RALT, KC_LALT), | ||
| 137 | [TD_RAL_RGU] = ACTION_TAP_DANCE_DOUBLE_MODS(KC_RALT, KC_RGUI), | ||
| 138 | [TD_RCT_RSF] = ACTION_TAP_DANCE_DOUBLE_MODS(KC_RCTL, KC_RSFT), | ||
| 139 | [TD_RSF_RCT] = ACTION_TAP_DANCE_DOUBLE_MODS(KC_RSFT, KC_RCTL), | 91 | [TD_RSF_RCT] = ACTION_TAP_DANCE_DOUBLE_MODS(KC_RSFT, KC_RCTL), |
| 140 | }; | 92 | }; |
| 141 | 93 | ||
| @@ -150,7 +102,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 150 | * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ | 102 | * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ |
| 151 | * │ LShift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │SftCtl│ ↑ │PgD│ | 103 | * │ LShift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │SftCtl│ ↑ │PgD│ |
| 152 | * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ | 104 | * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ |
| 153 | * │LCtl│LGui│LAlt│ Space │AlGu│FnLk│ │ ← │ ↓ │ → │ | 105 | * │LCtl│LGui│LAlt│ Space │RAlt│FnLk│ │ ← │ ↓ │ → │ |
| 154 | * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ | 106 | * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ |
| 155 | */ | 107 | */ |
| 156 | [L_BASE] = LAYOUT_truefox( \ | 108 | [L_BASE] = LAYOUT_truefox( \ |
| @@ -158,7 +110,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 158 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSPC, KC_DEL, \ | 110 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSPC, KC_DEL, \ |
| 159 | FN_CAPS,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, KC_PGUP, \ | 111 | FN_CAPS,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, KC_PGUP, \ |
| 160 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,RSF_RCT, KC_UP, KC_PGDN, \ | 112 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,RSF_RCT, KC_UP, KC_PGDN, \ |
| 161 | KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, RAL_RGU,FN_FNLK, KC_LEFT,KC_DOWN,KC_RGHT \ | 113 | KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,FN_FNLK, KC_LEFT,KC_DOWN,KC_RGHT \ |
| 162 | ), | 114 | ), |
| 163 | 115 | ||
| 164 | /* Function layer | 116 | /* Function layer |
diff --git a/keyboards/whitefox/keymaps/billypython/rules.mk b/keyboards/whitefox/keymaps/billypython/rules.mk index abf92c2c4..c42f6e705 100644 --- a/keyboards/whitefox/keymaps/billypython/rules.mk +++ b/keyboards/whitefox/keymaps/billypython/rules.mk | |||
| @@ -1,10 +1,15 @@ | |||
| 1 | AUDIO_ENABLE = no | ||
| 1 | BACKLIGHT_ENABLE = no | 2 | BACKLIGHT_ENABLE = no |
| 3 | BLUETOOTH_ENABLE = no | ||
| 2 | BOOTMAGIC_ENABLE = no | 4 | BOOTMAGIC_ENABLE = no |
| 3 | COMMAND_ENABLE = yes | 5 | COMMAND_ENABLE = yes |
| 4 | CONSOLE_ENABLE = yes | 6 | CONSOLE_ENABLE = yes |
| 5 | EXTRAKEY_ENABLE = yes | 7 | EXTRAKEY_ENABLE = yes |
| 8 | MIDI_ENABLE = no | ||
| 6 | MOUSEKEY_ENABLE = yes | 9 | MOUSEKEY_ENABLE = yes |
| 7 | NKRO_ENABLE = yes | 10 | NKRO_ENABLE = yes |
| 11 | RGBLIGHT_ENABLE = no | ||
| 12 | SLEEP_LIGHT_ENABLE = no | ||
| 8 | TAP_DANCE_ENABLE = yes | 13 | TAP_DANCE_ENABLE = yes |
| 9 | UNICODE_ENABLE = yes | 14 | UNICODE_ENABLE = yes |
| 10 | VISUALIZER_ENABLE = no | 15 | VISUALIZER_ENABLE = no |
diff --git a/keyboards/whitefox/keymaps/konstantin/rules.mk b/keyboards/whitefox/keymaps/konstantin/rules.mk index abf92c2c4..c42f6e705 100644 --- a/keyboards/whitefox/keymaps/konstantin/rules.mk +++ b/keyboards/whitefox/keymaps/konstantin/rules.mk | |||
| @@ -1,10 +1,15 @@ | |||
| 1 | AUDIO_ENABLE = no | ||
| 1 | BACKLIGHT_ENABLE = no | 2 | BACKLIGHT_ENABLE = no |
| 3 | BLUETOOTH_ENABLE = no | ||
| 2 | BOOTMAGIC_ENABLE = no | 4 | BOOTMAGIC_ENABLE = no |
| 3 | COMMAND_ENABLE = yes | 5 | COMMAND_ENABLE = yes |
| 4 | CONSOLE_ENABLE = yes | 6 | CONSOLE_ENABLE = yes |
| 5 | EXTRAKEY_ENABLE = yes | 7 | EXTRAKEY_ENABLE = yes |
| 8 | MIDI_ENABLE = no | ||
| 6 | MOUSEKEY_ENABLE = yes | 9 | MOUSEKEY_ENABLE = yes |
| 7 | NKRO_ENABLE = yes | 10 | NKRO_ENABLE = yes |
| 11 | RGBLIGHT_ENABLE = no | ||
| 12 | SLEEP_LIGHT_ENABLE = no | ||
| 8 | TAP_DANCE_ENABLE = yes | 13 | TAP_DANCE_ENABLE = yes |
| 9 | UNICODE_ENABLE = yes | 14 | UNICODE_ENABLE = yes |
| 10 | VISUALIZER_ENABLE = no | 15 | VISUALIZER_ENABLE = no |
