mirror of
https://github.com/qmk/qmk_userspace.git
synced 2025-05-04 14:44:16 -04:00
- going to remove it though so I can hold different mods for chrome and windows. Wanted to save the code since I spent time working on it - General code cleanup - introduced klor and rollow keyboard.json - set encoder resolution to 4 for alt tab to work right
24 lines
No EOL
701 B
C
24 lines
No EOL
701 B
C
#include "combo.h"
|
|
|
|
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_BUTTON2:
|
|
if ( get_highest_layer(layer_state | default_layer_state) > FIRST_DEFAULT_LAYER ) {
|
|
return false;
|
|
}
|
|
|
|
case MOUSE_DRGTOG:
|
|
if (( get_highest_layer(layer_state | default_layer_state) != FIRST_DEFAULT_LAYER )
|
|
&& ( get_highest_layer(layer_state | default_layer_state) != _MOUSE_FUNC )) {
|
|
return false;
|
|
}
|
|
|
|
default:
|
|
return true;
|
|
}
|
|
} |