qmk_userspace/users/t4corun/features/combo.c
Victor 169f363763
Added Host State Auto Mouse
- added mouse layer to userspace
- Ploopy Nano now turns on num lock when pointer is moved
- When the keyboard detects num lock it turns the mouse layer on
- cleaned up unused key overrides and combos
- Rules.mk was redone to drastically reduce memory footprint
- merged all config files into the main one
- made a clever way to have two _user functions in the userspace
- revised drag scroll bind for comfort
- removed dpi toggle functionality for nano for now. Need to find way to
add it back
2024-06-24 23:56:41 -05:00

48 lines
No EOL
944 B
C

#include "combo.h"
bool get_combo_must_tap(uint16_t index, combo_t *combo) {
switch (index) {
// case MOUSE_BUTTON3:
// case MOUSE_BUTTON4:
// case MOUSE_BUTTON5:
// case MOUSE_DRGTOG:
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) != FIRST_DEFAULT_LAYER )
&& ( get_highest_layer(layer_state | default_layer_state) != _MOUSE )) {
return false;
}
default:
return true;
}
}