mirror of
https://github.com/qmk/qmk_userspace.git
synced 2025-07-06 03:40:35 -04:00
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:
parent
fbd0a303df
commit
d3fbe16926
1 changed files with 3 additions and 4 deletions
|
@ -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) {
|
||||
|
||||
// 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) {
|
||||
|
||||
case KEY_ENT:
|
||||
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_BUTTON2:
|
||||
|
@ -39,11 +39,10 @@ bool combo_should_trigger(uint16_t combo_index, combo_t *combo, uint16_t keycode
|
|||
case MOUSE_BUTTON4:
|
||||
case MOUSE_BUTTON5:
|
||||
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:
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue