diff options
author | Danilo Vulicevic <danilo.vulicevic@yahoo.com> | 2018-11-07 02:04:02 +0100 |
---|---|---|
committer | MechMerlin <30334081+mechmerlin@users.noreply.github.com> | 2018-11-06 17:04:02 -0800 |
commit | a30dd2bb1711f5402007adf89af9b3adb758a7fb (patch) | |
tree | 27cce2d6a314a903eaf26242f1b3013b5c47da28 /keyboards/whitefox/keymaps | |
parent | fc477a1ee7a68cab4ae8fb7d7f0c8d6a4e6c8509 (diff) | |
download | qmk_firmware-a30dd2bb1711f5402007adf89af9b3adb758a7fb.tar.gz qmk_firmware-a30dd2bb1711f5402007adf89af9b3adb758a7fb.zip |
Add xd75/billypython keymap (#4381)
* Add xd75/billypython keymap
* Expand rules.mk
(cherry picked from commit 806fee94ae3a21b6ca7a34624101349b57d41b75)
* Expand billypython's rules.mk
* Remove unused stuff in whitefox/billypython
Diffstat (limited to 'keyboards/whitefox/keymaps')
-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 d1c3002d27..275f8effba 100644 --- a/keyboards/whitefox/keymaps/billypython/config.h +++ b/keyboards/whitefox/keymaps/billypython/config.h @@ -2,9 +2,6 @@ #define FORCE_NKRO -#undef IS_COMMAND -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RCTL))) - #define MAGIC_KEY_LAYER0_ALT1 BSLS #define MAGIC_KEY_BOOTLOADER ESC diff --git a/keyboards/whitefox/keymaps/billypython/keymap.c b/keyboards/whitefox/keymaps/billypython/keymap.c index 8096885cf8..dfc7d6a967 100644 --- a/keyboards/whitefox/keymaps/billypython/keymap.c +++ b/keyboards/whitefox/keymaps/billypython/keymap.c @@ -2,18 +2,11 @@ #define TOP LCTL(KC_HOME) #define BOTTOM LCTL(KC_END) -#define DSKTP_L LCTL(LGUI(KC_LEFT)) -#define DSKTP_R LCTL(LGUI(KC_RGHT)) #define FN MO(L_FN) #define FN_CAPS LT(L_FN, KC_CAPS) #define FN_FNLK TT(L_FN) -#define DESKTOP TD(TD_DESKTOP) -#define FN_RCTL TD(TD_FN_RCTL) -#define RAL_LAL TD(TD_RAL_LAL) -#define RAL_RGU TD(TD_RAL_RGU) -#define RCT_RSF TD(TD_RCT_RSF) #define RSF_RCT TD(TD_RSF_RCT) #define COMMA UC(0x002C) @@ -62,37 +55,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } } -struct { - bool fn_on; // Layer state when tap dance started - bool started; -} td_fn_rctrl_data; - -void td_fn_rctrl_each(qk_tap_dance_state_t *state, void *user_data) { - if (!td_fn_rctrl_data.started) { - td_fn_rctrl_data.fn_on = IS_LAYER_ON(L_FN); - td_fn_rctrl_data.started = true; - } - // Single tap → Fn, double tap → RCtrl, triple tap etc. → Fn+RCtrl - if (state->count == 1 || state->count == 3) { - layer_on(L_FN); - } else if (state->count == 2) { - if (!td_fn_rctrl_data.fn_on) { - layer_off(L_FN); - } - register_code(KC_RCTL); - } -} - -void td_fn_rctrl_reset(qk_tap_dance_state_t *state, void *user_data) { - if ((state->count == 1 || state->count > 2) && !td_fn_rctrl_data.fn_on) { - layer_off(L_FN); - } - if (state->count >= 2) { - unregister_code(KC_RCTL); - } - td_fn_rctrl_data.started = false; -} - #define ACTION_TAP_DANCE_DOUBLE_MODS(mod1, mod2) { \ .fn = { td_double_mods_each, NULL, td_double_mods_reset }, \ .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) { } enum tap_dance { - TD_DESKTOP, - TD_FN_RCTL, - TD_RAL_LAL, - TD_RAL_RGU, - TD_RCT_RSF, TD_RSF_RCT, }; 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_FN_RCTL] = ACTION_TAP_DANCE_FN_ADVANCED(td_fn_rctrl_each, NULL, td_fn_rctrl_reset), - [TD_RAL_LAL] = ACTION_TAP_DANCE_DOUBLE_MODS(KC_RALT, KC_LALT), - [TD_RAL_RGU] = ACTION_TAP_DANCE_DOUBLE_MODS(KC_RALT, KC_RGUI), - [TD_RCT_RSF] = ACTION_TAP_DANCE_DOUBLE_MODS(KC_RCTL, KC_RSFT), [TD_RSF_RCT] = ACTION_TAP_DANCE_DOUBLE_MODS(KC_RSFT, KC_RCTL), }; @@ -150,7 +102,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ * │ LShift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │SftCtl│ ↑ │PgD│ * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ - * │LCtl│LGui│LAlt│ Space │AlGu│FnLk│ │ ← │ ↓ │ → │ + * │LCtl│LGui│LAlt│ Space │RAlt│FnLk│ │ ← │ ↓ │ → │ * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ */ [L_BASE] = LAYOUT_truefox( \ @@ -158,7 +110,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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, \ 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, \ 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, \ - KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, RAL_RGU,FN_FNLK, KC_LEFT,KC_DOWN,KC_RGHT \ + KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,FN_FNLK, KC_LEFT,KC_DOWN,KC_RGHT \ ), /* Function layer diff --git a/keyboards/whitefox/keymaps/billypython/rules.mk b/keyboards/whitefox/keymaps/billypython/rules.mk index abf92c2c46..c42f6e7059 100644 --- a/keyboards/whitefox/keymaps/billypython/rules.mk +++ b/keyboards/whitefox/keymaps/billypython/rules.mk @@ -1,10 +1,15 @@ +AUDIO_ENABLE = no BACKLIGHT_ENABLE = no +BLUETOOTH_ENABLE = no BOOTMAGIC_ENABLE = no COMMAND_ENABLE = yes CONSOLE_ENABLE = yes EXTRAKEY_ENABLE = yes +MIDI_ENABLE = no MOUSEKEY_ENABLE = yes NKRO_ENABLE = yes +RGBLIGHT_ENABLE = no +SLEEP_LIGHT_ENABLE = no TAP_DANCE_ENABLE = yes UNICODE_ENABLE = yes VISUALIZER_ENABLE = no diff --git a/keyboards/whitefox/keymaps/konstantin/rules.mk b/keyboards/whitefox/keymaps/konstantin/rules.mk index abf92c2c46..c42f6e7059 100644 --- a/keyboards/whitefox/keymaps/konstantin/rules.mk +++ b/keyboards/whitefox/keymaps/konstantin/rules.mk @@ -1,10 +1,15 @@ +AUDIO_ENABLE = no BACKLIGHT_ENABLE = no +BLUETOOTH_ENABLE = no BOOTMAGIC_ENABLE = no COMMAND_ENABLE = yes CONSOLE_ENABLE = yes EXTRAKEY_ENABLE = yes +MIDI_ENABLE = no MOUSEKEY_ENABLE = yes NKRO_ENABLE = yes +RGBLIGHT_ENABLE = no +SLEEP_LIGHT_ENABLE = no TAP_DANCE_ENABLE = yes UNICODE_ENABLE = yes VISUALIZER_ENABLE = no |