qmk_userspace/users/t4corun/features/combo.c
Victor c825ba8319
had to remove that limiter
- upon reading documentation I don't think I can do COMBO_ONLY_FROM_LAYER and
COMBO_SHOULD_TRIGGER at the same time unless its for base layer
- something to do with needing those keys to be defined on the other layers
- like if I wanted tab to work on NAV, i need to add U and I to that same spot on
the NAV layer
2024-05-12 21:07:47 -05:00

44 lines
No EOL
890 B
C

#include "combo.h"
bool get_combo_must_tap(uint16_t index, combo_t *combo) {
switch (index) {
#if defined(MOUSEKEY_ENABLE)
case MOUSE_BUTTON3:
case MOUSE_BUTTON4:
case MOUSE_BUTTON5:
case MOUSE_DRGTOG:
#endif //MOUSEKEY_ENABLEdf
case KEY_ENT:
case KEY_TAB:
return true;
default:
return false;
}
}
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 | default_layer_state) == _CONFIG ) return false;
switch (combo_index) {
case MOUSE_BUTTON1:
case MOUSE_BUTTON2:
case MOUSE_BUTTON3:
case MOUSE_BUTTON4:
case MOUSE_BUTTON5:
case MOUSE_DRGTOG:
if ( get_highest_layer(layer_state | default_layer_state) > _DEFAULT_LAYER_1 ) return false;
default:
return true;
}
}