I think I'm actually done now

This commit is contained in:
Drew Whitney 2025-11-16 16:05:02 -07:00
commit 3a85931ce7
6 changed files with 21 additions and 46 deletions

View file

@ -2,34 +2,6 @@
#include "../alias.h" #include "../alias.h"
#include "../layers/layers.h" #include "../layers/layers.h"
// uint16_t get_combo_term(uint16_t combo_index, combo_t *combo) {
// switch (combo_index) {
// case NumCombo:
// return 75;
// break;
// }
// return COMBO_TERM;
// }
// bool process_combo_key_release(
// uint16_t combo_index, combo_t* combo, uint8_t key_index, uint16_t keycode
// ) {
// switch (combo_index) {
// case NumCombo: // release the combo on any releases
// switch (keycode) {
// case SYM_ENT:
// layer_off(_SYM);
// break;
// case NAV_CANCEL:
// layer_off(_NAV);
// break;
// }
// layer_off(_NUM);
// break;
// }
// return false;
// }
bool process_combo_key_repress( bool process_combo_key_repress(
uint16_t combo_index, combo_t* combo, uint8_t key_index, uint16_t keycode uint16_t combo_index, combo_t* combo, uint8_t key_index, uint16_t keycode
) { ) {

View file

@ -3,6 +3,5 @@
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
enum Combos { enum Combos {
// NumCombo,
WinSwapCombo, WinSwapCombo,
}; };

View file

@ -4,6 +4,7 @@
#include "./layers/layers.h" #include "./layers/layers.h"
#include "./tap_dance/tap_dance.h" #include "./tap_dance/tap_dance.h"
#include "./utils/utils.h" #include "./utils/utils.h"
#include <stdbool.h>
#include <stdint.h> #include <stdint.h>
// clang-format off // clang-format off
@ -70,9 +71,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//├───────────┼───────────┼───────────┼───────────┼───────────┼───────────┤ ├───────────┼───────────┼───────────┼───────────┼───────────┼───────────┤ //├───────────┼───────────┼───────────┼───────────┼───────────┼───────────┤ ├───────────┼───────────┼───────────┼───────────┼───────────┼───────────┤
KC_TRNS, KC_ESC, KC_NO, TAB_LEFT, TAB_RIGHT, KC_NO, KC_NO, KC_HOME, KC_UP, KC_END, KC_DEL, KC_TRNS, KC_TRNS, KC_ESC, KC_NO, TAB_LEFT, TAB_RIGHT, KC_NO, KC_NO, KC_HOME, KC_UP, KC_END, KC_DEL, KC_TRNS,
//├───────────┼───────────┼───────────┼───────────┼───────────┼───────────┤ ├───────────┼───────────┼───────────┼───────────┼───────────┼───────────┤ //├───────────┼───────────┼───────────┼───────────┼───────────┼───────────┤ ├───────────┼───────────┼───────────┼───────────┼───────────┼───────────┤
KC_TRNS, OS_LGUI, OS_LALT, OS_LCTL, OS_LSFT, CW_TOGG, KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, KC_SLSH, KC_TRNS, KC_TRNS, OS_LGUI, OS_LALT, OS_LCTL, OS_LSFT, CW_TOGG, COMPOSE, KC_LEFT, KC_DOWN, KC_RGHT, KC_SLSH, KC_TRNS,
//├───────────┼───────────┼───────────┼───────────┼───────────┼───────────┼───────────┐ ┌───────────┼───────────┼───────────┼───────────┼───────────┼───────────┼───────────┤ //├───────────┼───────────┼───────────┼───────────┼───────────┼───────────┼───────────┐ ┌───────────┼───────────┼───────────┼───────────┼───────────┼───────────┼───────────┤
KC_TRNS, C(KC_Z), C(KC_X), C(KC_C), C(KC_V), C(KC_Y), TD_CLS, QK_BOOT, COMPOSE, KC_F2, KC_COMM, KC_DOT, KC_SCLN, KC_TRNS, KC_TRNS, C(KC_Z), C(KC_X), C(KC_C), C(KC_V), C(KC_Y), TD_CLS, QK_BOOT, KC_F2, KC_CAPS, KC_COMM, KC_DOT, KC_SCLN, KC_TRNS,
//└───────────┴───────────┴───────────┴─────┬─────┴─────┬─────┴─────┬─────┴────┬──────┘ └─────┬─────┴─────┬─────┴─────┬─────┴─────┬─────┴───────────┴───────────┴───────────┘ //└───────────┴───────────┴───────────┴─────┬─────┴─────┬─────┴─────┬─────┴────┬──────┘ └─────┬─────┴─────┬─────┴─────┬─────┴─────┬─────┴───────────┴───────────┴───────────┘
FN_LAUNCH, NAV_TAB, NUM_SPC, KC_TRNS, KC_TRNS, KC_TRNS FN_LAUNCH, NAV_TAB, NUM_SPC, KC_TRNS, KC_TRNS, KC_TRNS
// └───────────┴───────────┴──────────┘ └───────────┴───────────┴───────────┘ // └───────────┴───────────┴──────────┘ └───────────┴───────────┴───────────┘
@ -122,7 +123,24 @@ combo_t key_combos[] = {
}; };
bool process_record_user(uint16_t keycode, keyrecord_t* record) { bool process_record_user(uint16_t keycode, keyrecord_t* record) {
static bool NAV_is_on = false;
switch (keycode) { switch (keycode) {
// allow NAV and SYM to override each other
case SYM_ENT:
if (!record->tap.count) {
if (NAV_is_on) {
record->event.pressed ? layer_off(_NAV) : layer_on(_NAV);
}
}
break;
case NAV_TAB:
if (!record->tap.count) {
NAV_is_on = record->event.pressed;
}
break;
case WIN_SWAP: // easy Alt-Tab case WIN_SWAP: // easy Alt-Tab
if (record->event.pressed) { if (record->event.pressed) {
register_mods(MOD_LALT); register_mods(MOD_LALT);

View file

@ -1,11 +0,0 @@
#include "./layers.h"
bool NUM_latched = false;
bool NAV_pressed_first = false;
layer_state_t layer_state_set_user(layer_state_t state) {
// allow the SYM and NUM layers to override each other
return state;
}

View file

@ -10,8 +10,6 @@ enum {
_SYM, _SYM,
_NAV, _NAV,
_FUNC, _FUNC,
// _SH_NUM,
_SH_ARROW, _SH_ARROW,
}; };
// extern bool NUM_latched;

View file

@ -3,9 +3,8 @@ BOOTLOADER = stm32-dfu
SRC += caps_word/caps_word.c SRC += caps_word/caps_word.c
SRC += tap_dance/tap_dance.c SRC += tap_dance/tap_dance.c
SRC += combos/combos.c SRC += combos/combos.c
SRC += layers/layers.c
SRC += taphold/taphold_options.c SRC += taphold/taphold_options.c
SRC += utils/utils.c # SRC += utils/utils.c
# VIA_ENABLE = yes # VIA_ENABLE = yes
LTO_ENABLE = yes LTO_ENABLE = yes