qmk_userspace/users/t4corun/features/combo.c
Victor c2008065ae
Tandem checkin for ploopyco overhaul
- Added build option for new ploopy nano build
- Added ploopy nano userspace keymap
- Removed old drag scroll detection. OLED graphic tied to scroll lock
- REmoved old scroll lock and dpi custom keycodes used for Lkbm keymap
- overrode num/scroll lock. It is now a hold instead of a toggle
- Added custom keycode to turn on all locks to tell ploopy nano to
enter bootloader
- refactored variables based on learnings from ploopy rebase
- minor tweaks to keymap
- pressing numlock cycles through dpi settings
- pressing scroll lock enters momentary drag scroll
2024-06-18 19:25:24 -05:00

45 lines
No EOL
840 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 ) return false;
default:
return true;
}
}