Trying something different

- tab and enter do not work outside the base layer
- putting get_highest_layer(layer_state | default_layer_state)
This commit is contained in:
Victor 2024-05-12 20:51:17 -05:00
commit d3fbe16926
Failed to generate hash of commit

View file

@ -25,13 +25,13 @@ bool get_combo_must_tap(uint16_t index, combo_t *combo) {
bool combo_should_trigger(uint16_t combo_index, combo_t *combo, uint16_t keycode, keyrecord_t *record) { bool combo_should_trigger(uint16_t combo_index, combo_t *combo, uint16_t keycode, keyrecord_t *record) {
// disable all combos on config layer // disable all combos on config layer
if ( get_highest_layer(layer_state) == _CONFIG ) return false; if ( get_highest_layer(layer_state | default_layer_state) == _CONFIG ) return false;
switch (combo_index) { switch (combo_index) {
case KEY_ENT: case KEY_ENT:
case KEY_TAB: case KEY_TAB:
if ( get_highest_layer(layer_state) == _SYMBOL ) return false; if ( get_highest_layer(layer_state | default_layer_state) == _SYMBOL ) return false;
case MOUSE_BUTTON1: case MOUSE_BUTTON1:
case MOUSE_BUTTON2: case MOUSE_BUTTON2:
@ -39,11 +39,10 @@ bool combo_should_trigger(uint16_t combo_index, combo_t *combo, uint16_t keycode
case MOUSE_BUTTON4: case MOUSE_BUTTON4:
case MOUSE_BUTTON5: case MOUSE_BUTTON5:
case MOUSE_DRGTOG: case MOUSE_DRGTOG:
if ( get_highest_layer(layer_state) > _DEFAULT_LAYER_1 ) return false; if ( get_highest_layer(layer_state | default_layer_state) > _DEFAULT_LAYER_1 ) return false;
default: default:
return true; return true;
} }
} }