Initial commit
This commit is contained in:
175
swoop/keymap.c
Normal file
175
swoop/keymap.c
Normal file
@@ -0,0 +1,175 @@
|
||||
/* Copyright 2023 Dave Vigil <dgvigil@gmail.com> dgvigil
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
enum layer_number {
|
||||
_BASE,
|
||||
_NAV,
|
||||
_NUM,
|
||||
_SYM,
|
||||
_FUN,
|
||||
_MUS,
|
||||
_MOUSE
|
||||
};
|
||||
|
||||
enum custom_keycodes {
|
||||
M_PASS1 = SAFE_RANGE,
|
||||
M_PASS2
|
||||
};
|
||||
|
||||
// Tap Dance declarations
|
||||
enum {
|
||||
TD_Q_ESC,
|
||||
};
|
||||
|
||||
// Tap Dance definitions
|
||||
tap_dance_action_t tap_dance_actions[] = {
|
||||
// Tap once for Q, twice for Escape
|
||||
[TD_Q_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_Q, KC_ESC),
|
||||
};
|
||||
|
||||
enum combos {
|
||||
FA_GUI,
|
||||
FS_ALT,
|
||||
FD_CTL,
|
||||
JQUOT_GUI,
|
||||
JL_ALT,
|
||||
JK_CTL
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fa_combo[] = {KC_F, KC_A, COMBO_END};
|
||||
const uint16_t PROGMEM fs_combo[] = {KC_F, KC_S, COMBO_END};
|
||||
const uint16_t PROGMEM fd_combo[] = {KC_F, KC_D, COMBO_END};
|
||||
const uint16_t PROGMEM jquote_combo[] = {KC_J, KC_QUOT, COMBO_END};
|
||||
const uint16_t PROGMEM jl_combo[] = {KC_J, KC_L, COMBO_END};
|
||||
const uint16_t PROGMEM jk_combo[] = {KC_J, KC_K, COMBO_END};
|
||||
|
||||
combo_t key_combos[] = {
|
||||
[FA_GUI] = COMBO(fa_combo, KC_LGUI),
|
||||
[FS_ALT] = COMBO(fs_combo, KC_LALT),
|
||||
[FD_CTL] = COMBO(fd_combo, KC_LCTL),
|
||||
[JQUOT_GUI] = COMBO(jquote_combo, KC_RGUI),
|
||||
[JL_ALT] = COMBO(jl_combo, KC_RALT),
|
||||
[JK_CTL] = COMBO(jk_combo, KC_RCTL),
|
||||
};
|
||||
|
||||
// LEFT THUMB KEYS
|
||||
#define MUS_ESC LT(_MUS, KC_ESC)
|
||||
#define NAV_BKSP LT(_NAV, KC_BSPC)
|
||||
#define MOUSE_TAB LT(_MOUSE, KC_TAB)
|
||||
// RIGHT THUMB KEYS
|
||||
#define SYM_ENTER LT(_SYM, KC_ENTER)
|
||||
#define NUM_SPC LT(_NUM, KC_SPC)
|
||||
#define FUN_DEL LT(_FUN, KC_DEL)
|
||||
// TAP DANCE
|
||||
#define Q_ESC TD(TD_Q_ESC)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_BASE] = LAYOUT_split_3x5_3(
|
||||
// ┌────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┐
|
||||
Q_ESC, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
|
||||
// ├────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┤
|
||||
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT,
|
||||
// ├────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┤
|
||||
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,
|
||||
// └────────┴────────┴────────┴────────┼────────┤ ├────────┼────────┴────────┴────────┴────────┘
|
||||
MUS_ESC, NAV_BKSP,MOUSE_TAB, SYM_ENTER,NUM_SPC,FUN_DEL
|
||||
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
|
||||
),
|
||||
[_NAV] = LAYOUT_split_3x5_3(
|
||||
// ┌────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┐
|
||||
_______, _______, _______, _______, _______, _______, KC_PSTE, KC_COPY, KC_CUT, KC_UNDO,
|
||||
// ├────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┤
|
||||
_______, _______, _______, _______, _______, KC_CAPS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT,
|
||||
// ├────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┤
|
||||
_______, _______, _______, M_PASS2, M_PASS1, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END,
|
||||
// └────────┴────────┴────────┴────────┼────────┤ ├────────┼────────┴────────┴────────┴────────┘
|
||||
_______, _______, _______, _______, _______, _______
|
||||
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
|
||||
|
||||
),
|
||||
[_NUM] = LAYOUT_split_3x5_3(
|
||||
// ┌────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┐
|
||||
KC_LBRC, KC_7, KC_8, KC_9, KC_RBRC, _______, _______, _______, _______, QK_BOOT,
|
||||
// ├────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┤
|
||||
KC_SCLN, KC_4, KC_5, KC_6, KC_EQL, _______, _______, _______, _______, _______,
|
||||
// ├────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┤
|
||||
KC_DOT, KC_1, KC_2, KC_3, KC_MINS, _______, _______, _______, _______, _______,
|
||||
// └────────┴────────┴────────┴────────┼────────┤ ├────────┼────────┴────────┴────────┴────────┘
|
||||
KC_DOT, KC_0, KC_MINUS, _______, _______, _______
|
||||
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
|
||||
),
|
||||
[_SYM] = LAYOUT_split_3x5_3(
|
||||
// ┌────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┐
|
||||
KC_LCBR, KC_AMPR, KC_ASTR, KC_LPRN, KC_RBRC, _______, _______, _______, _______, _______,
|
||||
// ├────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┤
|
||||
KC_COLN, KC_DLR, KC_PERC, KC_CIRC, KC_PLUS, KC_LPRN, KC_RPRN, _______, _______, _______,
|
||||
// ├────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┤
|
||||
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_PIPE, KC_LPRN, KC_RPRN, _______, _______, _______,
|
||||
// └────────┴────────┴────────┴────────┼────────┤ ├────────┼────────┴────────┴────────┴────────┘
|
||||
KC_LPRN, KC_RPRN, KC_UNDS, _______, _______, _______
|
||||
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
|
||||
),
|
||||
[_FUN] = LAYOUT_split_3x5_3(
|
||||
// ┌────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┐
|
||||
KC_F12, KC_F7, KC_F8, KC_F9, KC_PSCR, _______, _______, _______, _______, _______,
|
||||
// ├────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┤
|
||||
KC_F11, KC_F4, KC_F5, KC_F6, _______, _______, _______, _______, _______, _______,
|
||||
// ├────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┤
|
||||
KC_F10, KC_F1, KC_F2, KC_F3, _______, _______, _______, _______, _______, _______,
|
||||
// └────────┴────────┴────────┴────────┼────────┤ ├────────┼────────┴────────┴────────┴────────┘
|
||||
KC_RPRN, KC_UNDS, _______, _______, _______, _______
|
||||
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
|
||||
),
|
||||
[_MUS] = LAYOUT_split_3x5_3(
|
||||
// ┌────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┐
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
// ├────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┤
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
// ├────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┤
|
||||
_______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT,
|
||||
// └────────┴────────┴────────┴────────┼────────┤ ├────────┼────────┴────────┴────────┴────────┘
|
||||
_______, _______, _______, KC_MSTP, KC_MPLY, KC_MUTE
|
||||
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
|
||||
),
|
||||
[_MOUSE] = LAYOUT_split_3x5_3(
|
||||
// ┌────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┐
|
||||
_______, _______, _______, _______, _______, _______, KC_PSTE, KC_COPY, KC_CUT, KC_UNDO,
|
||||
// ├────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┤
|
||||
_______, _______, _______, _______, _______, KC_BTN1, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R,
|
||||
// ├────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┤
|
||||
_______, _______, _______, _______, _______, KC_BTN2, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R,
|
||||
// └────────┴────────┴────────┴────────┼────────┤ ├────────┼────────┴────────┴────────┴────────┘
|
||||
_______, _______, _______, _______, _______, _______
|
||||
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
|
||||
)
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case M_PASS1:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("T3lg3Ranch!2023");
|
||||
}
|
||||
return false;
|
||||
case M_PASS2:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("C0pperfield!2023");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
Reference in New Issue
Block a user