-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7672002
commit 546bb67
Showing
3 changed files
with
318 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#pragma once | ||
|
||
// Set master half | ||
#define MASTER_LEFT | ||
|
||
// Mod tap config | ||
#define TAPPING_TERM 150 | ||
// #define TAPPING_TERM_PER_KEY | ||
#define TAPPING_FORCE_HOLD | ||
// #define PERMISSIVE_HOLD | ||
#define HOLD_ON_OTHER_KEY_PRESS | ||
|
||
// Sugar to automatically prefix `KC_` onto every keycode for cleaner keymaps | ||
#define LAYOUT_KC( \ | ||
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ | ||
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ | ||
L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ | ||
L30, L31, L32, L33, L34, L35, L45, R40, R30, R31, R32, R33, R34, R35, \ | ||
L41, L42, L43, L44, R41, R42, R43, R44 \ | ||
) \ | ||
LAYOUT( \ | ||
KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \ | ||
KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \ | ||
KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \ | ||
KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L45, KC_##R40, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35, \ | ||
KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##R41, KC_##R42, KC_##R43, KC_##R44 \ | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,275 @@ | ||
#include QMK_KEYBOARD_H | ||
|
||
// ----------------------------------------------------------------------------- | ||
// Layer definitions | ||
// ------------------------------------------------------------------------------ | ||
|
||
enum layer_number { | ||
_DEFAULT = 0, | ||
_WINDOWS, | ||
_LOWER, | ||
_RAISE, | ||
_MASH, | ||
}; | ||
|
||
|
||
// ----------------------------------------------------------------------------- | ||
// Keycode Aliases | ||
// ------------------------------------------------------------------------------ | ||
|
||
#define KC_ KC_TRNS // Blank keys will inherit from previous layer | ||
#define KC_xx KC_NO // Completely disable key with `xx` | ||
#define KC_DFLT DF(_DEFAULT) // Switch to default layer | ||
#define KC_WIN DF(_WINDOWS) // Switch to game layer | ||
// #define KC_OAPP KC_F13 // App launcher modal | ||
// #define KC_MACR KC_F14 // Misc macros modal | ||
// #define KC_TERM LCMD(KC_ESC) // Summon terminal from anywhere | ||
// #define KC_LOWR MO(_LOWER) // Lower layer | ||
// #define KC_LWRT TD(LWRT) // Lower layer tap dance | ||
#define KC_LWRT LT(_LOWER, KC_F13) // Hold for lower layer, tap for app launcher modal | ||
#define KC_CMDO MT(MOD_LGUI, KC_F14) // Hold for cmd, tap for macros modal | ||
#define KC_RAIS MO(_RAISE) // Raise layer | ||
#define KC_RAI0 LT(_RAISE, KC_P0) // Hold to raise, tap for numpad 0 | ||
#define KC_CESC LCTL_T(KC_ESC) // Hold for ctrl, tap for esc | ||
#define KC_OTAB LOPT_T(KC_TAB) // Hold for option, tap for tab | ||
#define KC_LSPO SC_LSPO // Left space cadet shift, tap for opening paren | ||
#define KC_RSPC SC_RSPC // Right space cadet shift, tap for closing paren | ||
#define KC_SPOT LCMD(KC_SPC) // Spotlight search | ||
#define KC_SPCL LCTL(KC_LEFT) // Mission control space left | ||
#define KC_SPCR LCTL(KC_RGHT) // Mission control space right | ||
#define KC_BROL LAG(KC_LEFT) // Browser tab left | ||
#define KC_BROR LAG(KC_RGHT) // Browser tab right | ||
#define KC_ZMIN LCMD(KC_EQL) // Zoom in | ||
#define KC_ZMOT LCMD(KC_MINS) // Zoom out | ||
#define KC_ZMRS LCMD(KC_0) // Zoom reset | ||
|
||
|
||
// // ----------------------------------------------------------------------------- | ||
// // Setup tap dance | ||
// // ------------------------------------------------------------------------------ | ||
|
||
// typedef enum { | ||
// TD_NONE, | ||
// TD_UNKNOWN, | ||
// TD_SINGLE_TAP, | ||
// TD_SINGLE_HOLD, | ||
// TD_DOUBLE_TAP | ||
// } td_state_t; | ||
|
||
// typedef struct { | ||
// bool is_press_action; | ||
// td_state_t state; | ||
// } td_tap_t; | ||
|
||
// // Define tap dance keycodes | ||
// enum { | ||
// LWRT, | ||
// }; | ||
|
||
// // Declare the functions to be used with your tap dance key(s) | ||
|
||
// // Function associated with all tap dances | ||
// td_state_t cur_dance(tap_dance_state_t *state); | ||
|
||
// // Functions associated with individual tap dances | ||
// void lower_finished(tap_dance_state_t *state, void *user_data); | ||
// void lower_reset(tap_dance_state_t *state, void *user_data); | ||
|
||
|
||
// ----------------------------------------------------------------------------- | ||
// Layer Keymaps | ||
// ------------------------------------------------------------------------------ | ||
|
||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
|
||
[_DEFAULT] = LAYOUT_KC( | ||
// +------+------+------+------+------+------+ +------+------+------+------+------+------+ | ||
xx , xx , xx , xx , xx , xx , xx , xx , xx , xx , xx , xx , | ||
// +------+------+------+------+------+------+ +------+------+------+------+------+------+ | ||
OTAB , Q , W , E , R , T , Y , U , I , O , P , BSLS , | ||
// +------+------+------+------+------+------+ +------+------+------+------+------+------+ | ||
CESC , A , S , D , F , G , H , J , K , L , SCLN , QUOT , | ||
// +------+------+------+------+------+------+------+ +------+------+------+------+------+------+------+ | ||
LSPO , Z , X , C , V , B , xx , xx , N , M , COMM , DOT , SLSH , RSPC , | ||
// +------+------+------+------+------+------+------/ \------+------+------+------+------+------+------+ | ||
xx , CMDO , LWRT , SPC , ENT , RAIS , BSPC , xx | ||
// +------+------+------+------/ \------+------+------+------+ | ||
), | ||
|
||
[_WINDOWS] = LAYOUT_KC( | ||
// +------+------+------+------+------+------+ +------+------+------+------+------+------+ | ||
ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , DEL , | ||
// +------+------+------+------+------+------+ +------+------+------+------+------+------+ | ||
TAB , , , , , , , , , , , , | ||
// +------+------+------+------+------+------+ +------+------+------+------+------+------+ | ||
LCTL , , , , , , , , , , , , | ||
// +------+------+------+------+------+------+------+ +------+------+------+------+------+------+------+ | ||
, , , , , , , , , , , , , , | ||
// +------+------+------+------+------+------+------+ +------+------+------+------+------+------+------+ | ||
LALT , LCTL , , , , , , LWIN | ||
// +------+------+------+------/ \------+------+------+------+ | ||
), | ||
|
||
[_LOWER] = LAYOUT_KC( | ||
// +------+------+------+------+------+------+ +------+------+------+------+------+------+ | ||
, F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 , F10 , , | ||
// +------+------+------+------+------+------+ +------+------+------+------+------+------+ | ||
TILD , EXLM , AT , HASH , DLR , PERC , PIPE , P7 , P8 , P9 , UNDS , PLUS , | ||
// +------+------+------+------+------+------+ +------+------+------+------+------+------+ | ||
GRV , CIRC , AMPR , ASTR , COLN , LABK , RABK , P4 , P5 , P6 , MINS , EQL , | ||
// +------+------+------+------+------+------+------+ +------+------+------+------+------+------+------+ | ||
LCBR , BSLS , DOT , COMM , QUES , LBRC , , , RBRC , P1 , P2 , P3 , SLSH , RCBR , | ||
// +------+------+------+------+------+------+------/ \------+------+------+------+------+------+------+ | ||
, , , , , RAI0 , , | ||
// +------+------+------+------/ \------+------+------+------+ | ||
), | ||
|
||
[_RAISE] = LAYOUT_KC( | ||
// +------+------+------+------+------+------+ +------+------+------+------+------+------+ | ||
, xx , xx , xx , xx , xx , xx , xx , xx , xx , xx , xx , | ||
// +------+------+------+------+------+------+ +------+------+------+------+------+------+ | ||
, F1 , F2 , F3 , F4 , F5 , HOME , PGDN , PGUP , END , xx , xx , | ||
// +------+------+------+------+------+------+ +------+------+------+------+------+------+ | ||
, F6 , F7 , F8 , F9 , F10 , LEFT , DOWN , UP , RGHT , xx , xx , | ||
// +------+------+------+------+------+------+------+ +------+------+------+------+------+------+------+ | ||
, F11 , F12 , xx , xx , xx , xx , xx , MPRV , VOLD , VOLU , MNXT , MUTE , MPLY , | ||
// +------+------+------+------+------+------+------+ +------+------+------+------+------+------+------+ | ||
, , , SPOT , , , , | ||
// +------+------+------+------/ \------+------+------+------+ | ||
), | ||
|
||
[_MASH] = LAYOUT_KC( | ||
// +------+------+------+------+------+------+ +------+------+------+------+------+------+ | ||
DFLT , xx , xx , xx , xx , xx , xx , xx , xx , xx , xx , WIN , | ||
// +------+------+------+------+------+------+ +------+------+------+------+------+------+ | ||
xx , xx , xx , xx , xx , xx , SPCL , xx , xx , SPCR , xx , xx , | ||
// +------+------+------+------+------+------+ +------+------+------+------+------+------+ | ||
xx , xx , xx , xx , xx , xx , BROL , xx , xx , BROR , xx , xx , | ||
// +------+------+------+------+------+------+------+ +------+------+------+------+------+------+------+ | ||
xx , xx , xx , xx , xx , xx , xx , xx , ZMRS , ZMOT , ZMIN , xx , xx , xx , | ||
// +------+------+------+------+------+------+------+ +------+------+------+------+------+------+------+ | ||
, , , , , , , | ||
// +------+------+------+------/ \------+------+------+------+ | ||
), | ||
|
||
}; | ||
|
||
|
||
// ----------------------------------------------------------------------------- | ||
// Handle layer changes | ||
// ------------------------------------------------------------------------------ | ||
|
||
layer_state_t layer_state_set_user(layer_state_t state) { | ||
return update_tri_layer_state(state, _LOWER, _RAISE, _MASH); | ||
} | ||
|
||
|
||
// ----------------------------------------------------------------------------- | ||
// Setup shift backspace to forward delete | ||
// ------------------------------------------------------------------------------ | ||
|
||
const key_override_t delete_key_override = ko_make_basic(MOD_MASK_SHIFT, KC_BSPC, KC_DEL); | ||
|
||
|
||
// ----------------------------------------------------------------------------- | ||
// Register global key overrides | ||
// ------------------------------------------------------------------------------ | ||
|
||
const key_override_t **key_overrides = (const key_override_t *[]){ | ||
&delete_key_override, | ||
NULL | ||
}; | ||
|
||
|
||
// ----------------------------------------------------------------------------- | ||
// Handle combos | ||
// ------------------------------------------------------------------------------ | ||
|
||
const uint16_t PROGMEM hyper[] = {KC_D, KC_F, COMBO_END}; | ||
const uint16_t PROGMEM big_hyper[] = {KC_S, KC_D, KC_F, COMBO_END}; | ||
|
||
combo_t key_combos[] = { | ||
COMBO(hyper, LCMD(LOPT(KC_LCTL))), | ||
COMBO(big_hyper, LSFT(LCMD(LOPT(KC_LCTL)))), | ||
}; | ||
|
||
|
||
// ----------------------------------------------------------------------------- | ||
// Handle user keycodes | ||
// ------------------------------------------------------------------------------ | ||
|
||
bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
switch (keycode) { | ||
|
||
// Fix rolling between space cadet shift parens when quickly typing `()` | ||
case KC_RSPC: | ||
if (record->event.pressed && get_mods() & MOD_BIT(KC_LSFT)) { | ||
tap_code16(KC_LPRN); | ||
clear_mods(); | ||
return true; | ||
} | ||
break; | ||
} | ||
|
||
return true; | ||
} | ||
|
||
|
||
// // ----------------------------------------------------------------------------- | ||
// // Handle tap dance | ||
// // ------------------------------------------------------------------------------ | ||
|
||
// // Determine the current tap dance state | ||
// td_state_t cur_dance(tap_dance_state_t *state) { | ||
// if (state->count == 1 && !state->pressed) return TD_SINGLE_TAP; | ||
// else if (state->count == 1) return TD_SINGLE_HOLD; | ||
// else if (state->count == 2) return TD_DOUBLE_TAP; | ||
// else return TD_UNKNOWN; | ||
// } | ||
|
||
// // Initialize tap structure associated with example tap dance key | ||
// static td_tap_t lower_tap_state = { | ||
// .is_press_action = true, | ||
// .state = TD_NONE | ||
// }; | ||
|
||
// // Functions that control what our tap dance key does | ||
// void lower_finished(tap_dance_state_t *state, void *user_data) { | ||
// lower_tap_state.state = cur_dance(state); | ||
// switch (lower_tap_state.state) { | ||
// case TD_SINGLE_TAP: | ||
// tap_code(KC_OAPP); | ||
// break; | ||
// case TD_SINGLE_HOLD: | ||
// layer_on(_LOWER); | ||
// break; | ||
// case TD_DOUBLE_TAP: | ||
// tap_code(KC_MACR); | ||
// break; | ||
// default: | ||
// break; | ||
// } | ||
// } | ||
|
||
// void lower_reset(tap_dance_state_t *state, void *user_data) { | ||
// // If the key was held down and now is released then switch off the layer | ||
// if (lower_tap_state.state == TD_SINGLE_HOLD) { | ||
// layer_off(_LOWER); | ||
// } | ||
// lower_tap_state.state = TD_NONE; | ||
// } | ||
|
||
// // Associate our tap dance key with its functionality | ||
// tap_dance_action_t tap_dance_actions[] = { | ||
// [LWRT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, lower_finished, lower_reset) | ||
// }; | ||
|
||
// // Set a long-ish tapping term for tap-dance keys | ||
// uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { | ||
// switch (keycode) { | ||
// case QK_TAP_DANCE ... QK_TAP_DANCE_MAX: | ||
// return 275; | ||
// default: | ||
// return TAPPING_TERM; | ||
// } | ||
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
BOOTLOADER = atmel-dfu # Required for Elite-C microcontrollers | ||
BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite | ||
MOUSEKEY_ENABLE = no # Mouse keys | ||
EXTRAKEY_ENABLE = no # Audio control and System control | ||
CONSOLE_ENABLE = yes # Console for debug | ||
COMMAND_ENABLE = no # Commands for debug and configuration | ||
NKRO_ENABLE = no # N-key rollover | ||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
AUDIO_ENABLE = no # Audio output | ||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight | ||
SWAP_HANDS_ENABLE = no # Enable one-hand typing | ||
OLED_ENABLE = no # OLED display | ||
KEY_OVERRIDE_ENABLE = yes # Enable key overrides feature | ||
EXTRAKEY_ENABLE = yes # Enable media keys, etc. | ||
COMBO_ENABLE = yes # Enable combos | ||
# TAP_DANCE_ENABLE = yes # Enable tap dance |