From 354e01501a7370e43c084a85c6e8bb2fc35405af Mon Sep 17 00:00:00 2001 From: Charlie Steenhagen Date: Thu, 3 Oct 2024 19:20:03 -0500 Subject: [PATCH] Removed space cadet, it was annoying --- .../aesir/heimdall/keymaps/valhalla/keymap.c | 29 ++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/keyboards/aesir/heimdall/keymaps/valhalla/keymap.c b/keyboards/aesir/heimdall/keymaps/valhalla/keymap.c index a13fb974da..6b97d9ded5 100644 --- a/keyboards/aesir/heimdall/keymaps/valhalla/keymap.c +++ b/keyboards/aesir/heimdall/keymaps/valhalla/keymap.c @@ -20,6 +20,8 @@ enum { TD_TICK_TICK, TD_OBSIDIAN, TD_COPY_FILE, + TD_VOL_UP, + TD_VOL_DOWN, }; typedef enum { @@ -44,16 +46,16 @@ bool CAPS_WORD_STATE = false; // clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = LAYOUT( - TD(TD_PW_ONE), TD(TD_PW_TWO), TD(TD_PW_THREE), TD(TD_PW_FOUR), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, TO(_FN0), - REFACTOR, KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_NO, KC_PPLS, KC_END, KC_HOME, KC_NUM, - TD(TD_COPY_FILE), KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, KC_PMNS, KC_PAST, KC_PSLS, - SELECT_WORD, 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_BSLS, KC_KP_DOT, KC_KP_7, KC_KP_8, KC_KP_9, - CW_TOGG, KC_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_UP, KC_KP_4, KC_KP_5, KC_KP_6, - TD(TD_OBSIDIAN), TD(TD_SC_LSHIFT), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, TD(TD_SC_RSHIFT), KC_DOWN, KC_KP_1, KC_KP_2, KC_KP_3, - TD(TD_TICK_TICK), KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_APP, KC_RCTL, KC_LEFT, KC_RIGHT, KC_KP_0, KC_PENT + TD(TD_PW_ONE), TD(TD_PW_TWO), TD(TD_PW_THREE), TD(TD_PW_FOUR), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, TD(TD_VOL_DOWN), TD(TD_VOL_UP), TO(_FN0), + REFACTOR, KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_NO, KC_PPLS, KC_END, KC_HOME, KC_NUM, + TD(TD_COPY_FILE), KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, KC_PMNS, KC_PAST, KC_PSLS, + SELECT_WORD, 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_BSLS, KC_KP_DOT, KC_KP_7, KC_KP_8, KC_KP_9, + CW_TOGG, KC_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_UP, KC_KP_4, KC_KP_5, KC_KP_6, + TD(TD_OBSIDIAN), KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_DOWN, KC_KP_1, KC_KP_2, KC_KP_3, + TD(TD_TICK_TICK), KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_APP, KC_RCTL, KC_LEFT, KC_RIGHT, KC_KP_0, KC_PENT ), [_FN0] = LAYOUT( - TD(TD_PW_ONE), TD(TD_PW_TWO), TD(TD_PW_THREE), TD(TD_PW_FOUR), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, TO(_FN0), + TD(TD_PW_ONE), TD(TD_PW_TWO), TD(TD_PW_THREE), TD(TD_PW_FOUR), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, TO(_FN1), RGB_M_P, KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_NO, KC_PPLS, KC_END, KC_HOME, KC_NUM, RGB_TOG, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, KC_PMNS, KC_PAST, KC_PSLS, RGB_MOD, 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_BSLS, KC_KP_DOT, KC_KP_7, KC_KP_8, KC_KP_9, @@ -62,7 +64,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { RGB_HUD, KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_APP, KC_RCTL, KC_LEFT, KC_RIGHT, KC_KP_0, KC_PENT ), [_FN1] = LAYOUT( - TD(TD_PW_ONE), TD(TD_PW_TWO), TD(TD_PW_THREE), TD(TD_PW_FOUR), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, TO(_FN0), + TD(TD_PW_ONE), TD(TD_PW_TWO), TD(TD_PW_THREE), TD(TD_PW_FOUR), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, TO(_FN2), KC_NO, KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_NO, KC_PPLS, KC_END, KC_HOME, KC_NUM, KC_NO, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, KC_PMNS, KC_PAST, KC_PSLS, SELECT_WORD, 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_BSLS, KC_KP_DOT, KC_KP_7, KC_KP_8, KC_KP_9, @@ -71,7 +73,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TD(TD_TICK_TICK), KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_APP, KC_RCTL, KC_LEFT, KC_RIGHT, KC_KP_0, KC_PENT ), [_FN2] = LAYOUT( - TD(TD_PW_ONE), TD(TD_PW_TWO), TD(TD_PW_THREE), TD(TD_PW_FOUR), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, TO(_FN0), + TD(TD_PW_ONE), TD(TD_PW_TWO), TD(TD_PW_THREE), TD(TD_PW_FOUR), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, TO(_BASE), KC_NO, KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_NO, KC_PPLS, KC_END, KC_HOME, KC_NUM, KC_NO, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, KC_PMNS, KC_PAST, KC_PSLS, SELECT_WORD, 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_BSLS, KC_KP_DOT, KC_KP_7, KC_KP_8, KC_KP_9, @@ -247,11 +249,10 @@ void pw_one_finished(tap_dance_state_t *state, void *user_data) { ql_tap_state.state = cur_dance(state); switch (ql_tap_state.state) { case TD_SINGLE_TAP: - SEND_STRING(SS_LGUI(SS_LCTL(SS_TAP(X_Q)))); + tap_code(KC_ESC); break; case TD_SINGLE_HOLD: - // TODO define a hold action for pw one - layer_on(_FN0); + SEND_STRING(SS_LGUI(SS_LCTL(SS_TAP(X_Q)))); break; case TD_DOUBLE_TAP: SEND_STRING(PW_ONE_STRING); @@ -399,6 +400,8 @@ tap_dance_action_t tap_dance_actions[] = { [TD_TICK_TICK] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tick_tick_finished, ql_reset), [TD_OBSIDIAN] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, obsidian_finished, ql_reset), [TD_COPY_FILE] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, copy_file_finished, ql_reset), + [TD_VOL_UP] = ACTION_TAP_DANCE_DOUBLE(KC_KB_VOLUME_UP, KC_MPLY), + [TD_VOL_DOWN] = ACTION_TAP_DANCE_DOUBLE(KC_KB_VOLUME_DOWN, KC_KB_MUTE), // TODO add more tap dance actions here. }; // clang-format on