-
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
9bbe6b3
commit e7043a7
Showing
5 changed files
with
178 additions
and
61 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
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 |
---|---|---|
@@ -1,52 +1,153 @@ | ||
#include QMK_KEYBOARD_H | ||
|
||
// ----------------------------------------------------------------------------- | ||
// Layer definitions | ||
// ------------------------------------------------------------------------------ | ||
|
||
enum layer_number { | ||
_DEFAULT = 0, | ||
_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_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 | ||
|
||
|
||
// ----------------------------------------------------------------------------- | ||
// Layer Keymaps | ||
// ------------------------------------------------------------------------------ | ||
|
||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
[0] = LAYOUT_split_3x6_3( | ||
//,-----------------------------------------------------. ,-----------------------------------------------------. | ||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, | ||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| | ||
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, | ||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| | ||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ESC, | ||
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| | ||
KC_LGUI, MO(1), KC_SPC, KC_ENT, MO(2), KC_RALT | ||
//`--------------------------' `--------------------------' | ||
|
||
[_DEFAULT] = LAYOUT_KC( | ||
// +------+------+------+------+------+------+ +------+------+------+------+------+------+ | ||
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 , N , M , COMM , DOT , SLSH , RSPC , | ||
// +------+------+------+------+------+------+------/ \------+------+------+------+------+------+------+ | ||
CMDO , LWRT , SPC , ENT , RAIS , BSPC | ||
// +------+------+------/ \------+------+------+ | ||
), | ||
|
||
[1] = LAYOUT_split_3x6_3( | ||
//,-----------------------------------------------------. ,-----------------------------------------------------. | ||
KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, | ||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| | ||
KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT, XXXXXXX, XXXXXXX, | ||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| | ||
KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| | ||
KC_LGUI, _______, KC_SPC, KC_ENT, MO(3), KC_RALT | ||
//`--------------------------' `--------------------------' | ||
[_LOWER] = LAYOUT_KC( | ||
// +------+------+------+------+------+------+ +------+------+------+------+------+------+ | ||
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 , | ||
// +------+------+------/ \------+------+------+ | ||
), | ||
|
||
[2] = LAYOUT_split_3x6_3( | ||
//,-----------------------------------------------------. ,-----------------------------------------------------. | ||
KC_TAB, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, | ||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| | ||
KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV, | ||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| | ||
KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_TILD, | ||
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| | ||
KC_LGUI, MO(3), KC_SPC, KC_ENT, _______, KC_RALT | ||
//`--------------------------' `--------------------------' | ||
[_RAISE] = LAYOUT_KC( | ||
// +------+------+------+------+------+------+ +------+------+------+------+------+------+ | ||
, 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 , MPRV , VOLD , VOLU , MNXT , MUTE , MPLY , | ||
// +------+------+------+------+------+------+------+ +------+------+------+------+------+------+------+ | ||
, , SPOT , , , | ||
// +------+------+------/ \------+------+------+ | ||
), | ||
|
||
[3] = LAYOUT_split_3x6_3( | ||
//,-----------------------------------------------------. ,-----------------------------------------------------. | ||
QK_BOOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| | ||
RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| | ||
RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| | ||
KC_LGUI, _______, KC_SPC, KC_ENT, _______, KC_RALT | ||
//`--------------------------' `--------------------------' | ||
) | ||
[_MASH] = LAYOUT_KC( | ||
// +------+------+------+------+------+------+ +------+------+------+------+------+------+ | ||
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 , ZMRS , ZMOT , ZMIN , xx , xx , xx , | ||
// +------+------+------+------+------+------+------+ +------+------+------+------+------+------+------+ | ||
, , , , , | ||
// +------+------+------/ \------+------+------+ | ||
), | ||
|
||
}; | ||
|
||
|
||
// ----------------------------------------------------------------------------- | ||
// Setup mash layer | ||
// ------------------------------------------------------------------------------ | ||
|
||
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; | ||
} |
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,15 @@ | ||
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 |
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
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