From 4a4f414d2871a5c7be11dca351b462442e110311 Mon Sep 17 00:00:00 2001 From: Drew Whitney Date: Thu, 20 Nov 2025 21:19:25 -0700 Subject: [PATCH] Fixed the combo num layer issue, it was because the combo was not hold-only. Adjusted the combo term for the num layer combo to be a bit larger at 150 --- keyboards/keebio/iris_lm/keymaps/drew/alias.h | 2 +- .../keebio/iris_lm/keymaps/drew/combos/combos.c | 14 +++++++++++++- keyboards/keebio/iris_lm/keymaps/drew/config.h | 1 + keyboards/keebio/iris_lm/keymaps/drew/keymap.c | 4 ++-- .../keebio/iris_lm/keymaps/drew/layers/layers.c | 5 +++-- .../iris_lm/keymaps/drew/taphold/taphold_options.c | 1 + 6 files changed, 21 insertions(+), 6 deletions(-) diff --git a/keyboards/keebio/iris_lm/keymaps/drew/alias.h b/keyboards/keebio/iris_lm/keymaps/drew/alias.h index 8f65703f..530bd81b 100644 --- a/keyboards/keebio/iris_lm/keymaps/drew/alias.h +++ b/keyboards/keebio/iris_lm/keymaps/drew/alias.h @@ -21,7 +21,7 @@ enum CustomKeycodes { #define ZOOM_OUT C(KC_MINS) // layers -#define NUM MO(_NUM) +#define NUM MO(_NUM) // used by the NumCombo combo #define SYM_BSPC LT(_SYM, KC_BSPC) #define NAV_TAB LT(_NAV, KC_TAB) #define FN_LAUNCH LT(_FUNC, LAUNCH) diff --git a/keyboards/keebio/iris_lm/keymaps/drew/combos/combos.c b/keyboards/keebio/iris_lm/keymaps/drew/combos/combos.c index 11ef99a3..b2307206 100644 --- a/keyboards/keebio/iris_lm/keymaps/drew/combos/combos.c +++ b/keyboards/keebio/iris_lm/keymaps/drew/combos/combos.c @@ -5,12 +5,14 @@ uint16_t get_combo_term(uint16_t combo_index, combo_t* combo) { switch (combo_index) { case NumCombo: - return 75; // make a larger window for triggering the combo + return 150; // make a larger window for triggering the combo break; } return COMBO_TERM; } +// necessary to make sure the layers are turned off for the NUM layer combo, since the original +// layer keys are consumed by the combo activation bool process_combo_key_release( uint16_t combo_index, combo_t* combo, uint8_t key_index, uint16_t keycode ) { @@ -31,6 +33,16 @@ bool process_combo_key_release( return false; } +// necessary for the NUM layer combo, since it shouldn't trigger on a tap +bool get_combo_must_hold(uint16_t combo_index, combo_t* combo) { + switch (combo_index) { + case NumCombo: // make the NUM layer combo hold-only + return true; + break; + } + return false; +} + bool process_combo_key_repress( uint16_t combo_index, combo_t* combo, uint8_t key_index, uint16_t keycode ) { diff --git a/keyboards/keebio/iris_lm/keymaps/drew/config.h b/keyboards/keebio/iris_lm/keymaps/drew/config.h index dc879209..e8a8f428 100644 --- a/keyboards/keebio/iris_lm/keymaps/drew/config.h +++ b/keyboards/keebio/iris_lm/keymaps/drew/config.h @@ -12,6 +12,7 @@ #define COMBO_PROCESS_KEY_RELEASE #define COMBO_PROCESS_KEY_REPRESS #define COMBO_TERM_PER_COMBO +#define COMBO_MUST_HOLD_PER_COMBO #define CAPS_WORD_IDLE_TIMEOUT 0 diff --git a/keyboards/keebio/iris_lm/keymaps/drew/keymap.c b/keyboards/keebio/iris_lm/keymaps/drew/keymap.c index d62a6308..cd9d0ea1 100644 --- a/keyboards/keebio/iris_lm/keymaps/drew/keymap.c +++ b/keyboards/keebio/iris_lm/keymaps/drew/keymap.c @@ -178,11 +178,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t* record) { break; case KC_SPC: + // have to implement this here instead of as a key override because it was acting + // weird with layers as a key override if (get_highest_layer(layer_state) == _GAME) { return true; // return early } - // have to implement this here instead of as a key override because it was acting - // weird with layers as a key override if (record->event.pressed) { uint8_t mods = get_mods(); if ((mods | get_oneshot_mods()) & MOD_MASK_CTRL) { diff --git a/keyboards/keebio/iris_lm/keymaps/drew/layers/layers.c b/keyboards/keebio/iris_lm/keymaps/drew/layers/layers.c index 12783568..6b3e1cc2 100644 --- a/keyboards/keebio/iris_lm/keymaps/drew/layers/layers.c +++ b/keyboards/keebio/iris_lm/keymaps/drew/layers/layers.c @@ -17,8 +17,9 @@ layer_state_t layer_state_set_user(layer_state_t state) { } } else if (IS_LAYER_ON_STATE(state, _NUM)) { NUM_latched = true; - state |= 1 << _NAV | 1 << _SYM; // turn on NAV and SYM too + // turn on NAV and SYM too, since the layer keys were consumed by the combo activation + state |= 1 << _NAV | 1 << _SYM; } return state; -} \ No newline at end of file +} diff --git a/keyboards/keebio/iris_lm/keymaps/drew/taphold/taphold_options.c b/keyboards/keebio/iris_lm/keymaps/drew/taphold/taphold_options.c index f4703067..6739db76 100644 --- a/keyboards/keebio/iris_lm/keymaps/drew/taphold/taphold_options.c +++ b/keyboards/keebio/iris_lm/keymaps/drew/taphold/taphold_options.c @@ -13,6 +13,7 @@ uint16_t get_quick_tap_term(uint16_t keycode, keyrecord_t* record) { return QUICK_TAP_TERM; } +// TODO: remove // bool get_hold_on_other_key_press(uint16_t keycode, keyrecord_t* record) { // switch (keycode) { // case NUM_SPC: