Cleanup and add permissive hold

Not quite acting exactly like the zofle board yet...
This commit is contained in:
Daniel Flanagan 2024-06-26 11:00:54 -05:00
parent 5a1f102363
commit 1f38eee2de
3 changed files with 39 additions and 32 deletions

View file

@ -1,3 +1,2 @@
#define TAPPING_TERM 150 #define TAPPING_TERM 150
#define PERMISSIVE_HOLD #define PERMISSIVE_HOLD

View file

@ -2,28 +2,33 @@
extern keymap_config_t keymap_config; extern keymap_config_t keymap_config;
#define _QWERTY 0 // Not sure this goes here...
#define _GAMER 1 #define PERMISSIVE_HOLD
#define _RETRO_GAMER 2
#define _LEFT 3 // QWERTY
#define _RIGHT 4 #define LQ 0
#define _ADJUST 5 #define LG 1
#define _CONFIG 6 #define LRG 2
#define LL 3
#define LR 4
#define LA 5
#define LC 6
#define ESC_CTL LCTL_T(KC_ESC) #define ESC_CTL LCTL_T(KC_ESC)
#define LR_ENT LT(LR, KC_ENT)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = LAYOUT( [LQ] = LAYOUT(
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
ESC_CTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, ESC_CTL, 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, MO(_CONFIG), MO(_CONFIG),KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(LC), MO(LC), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
KC_LGUI, KC_SPC, MO(_LEFT), LT(_RIGHT,KC_ENT),KC_SPC, KC_LALT KC_LGUI, KC_SPC, MO(LL), LR_ENT, KC_SPC, KC_LALT
), ),
[_GAMER] = LAYOUT( [LG] = LAYOUT(
KC_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
KC_LCTL, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LCTL, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
@ -31,7 +36,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______, _______, _______, _______ _______, _______, _______, _______, _______, _______
), ),
[_RETRO_GAMER] = LAYOUT( [LRG] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______,
@ -39,23 +44,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______, _______, _______, _______ _______, _______, _______, _______, _______, _______
), ),
[_LEFT] = LAYOUT( [LL] = LAYOUT(
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_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
_______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, _______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LT, KC_GT, KC_QUES, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LT, KC_GT, KC_QUES, _______,
_______, MO(_ADJUST), _______, _______, KC_ENT, _______ _______, MO(LA), _______, MO(LA), KC_ENT, _______
), ),
[_RIGHT] = LAYOUT( [LR] = LAYOUT(
KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
_______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
_______, _______, _______, _______, KC_INS, _______, _______, _______, _______, KC_INS, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, _______, _______, _______, _______, KC_INS, _______, _______, _______, _______,
_______, KC_LALT, _______, _______,MO(_ADJUST),_______ _______, KC_LALT, MO(LA), _______, MO(LA), _______
), ),
[_ADJUST] = LAYOUT( [LA] = LAYOUT(
_______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, _______, _______, _______, _______, _______, _______,
_______, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, _______, KC_MPRV, KC_VOLD, KC_MPLY, KC_VOLU, KC_MNXT, _______, _______, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, _______, KC_MPRV, KC_VOLD, KC_MPLY, KC_VOLU, KC_MNXT, _______,
@ -64,38 +69,38 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______, _______, _______, _______ _______, _______, _______, _______, _______, _______
), ),
[_CONFIG] = LAYOUT( [LC] = LAYOUT(
QK_BOOT, _______, _______, _______, _______, RGB_TOG, _______, _______, _______, _______, _______, QK_BOOT, QK_BOOT, _______, _______, _______, _______, RGB_TOG, _______, _______, _______, _______, _______, QK_BOOT,
_______, _______, _______, _______, _______, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, _______, _______, _______, _______, _______, _______,
_______, _______, _______, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______,
_______, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______,
_______, DF(_QWERTY), RGB_TOG, _______, DF(_GAMER), DF(_RETRO_GAMER) _______, DF(LQ), RGB_TOG, _______, DF(LG), DF(LRG)
) )
}; };
layer_state_t layer_state_set_user(layer_state_t state) { layer_state_t layer_state_set_user(layer_state_t state) {
switch (get_highest_layer(state)) { switch (get_highest_layer(state)) {
case _GAMER: case LG:
rgblight_mode(1); rgblight_mode(1);
rgblight_sethsv(HSV_RED); rgblight_sethsv(HSV_RED);
break; break;
case _RETRO_GAMER: case LRG:
rgblight_mode(1); rgblight_mode(1);
rgblight_sethsv(HSV_YELLOW); rgblight_sethsv(HSV_YELLOW);
break; break;
case _LEFT: case LL:
rgblight_mode(1); rgblight_mode(1);
rgblight_sethsv(HSV_BLUE); rgblight_sethsv(HSV_BLUE);
break; break;
case _RIGHT: case LR:
rgblight_mode(1); rgblight_mode(1);
rgblight_sethsv(HSV_GREEN); rgblight_sethsv(HSV_GREEN);
break; break;
case _ADJUST: case LA:
rgblight_mode(1); rgblight_mode(1);
rgblight_sethsv(HSV_PURPLE); rgblight_sethsv(HSV_PURPLE);
break; break;
case _CONFIG: case LC:
rgblight_mode(1); rgblight_mode(1);
rgblight_sethsv(HSV_ORANGE); rgblight_sethsv(HSV_ORANGE);
break; break;

View file

@ -1,3 +1,6 @@
# VIA_ENABLE = yes # VIA_ENABLE = yes
LTO_ENABLE = yes LTO_ENABLE = yes
CONSOLE_ENABLE = no CONSOLE_ENABLE = no
# Note sure these go here...
PERMISSIVE_HOLD = yes