Splitting up layers

- split mouse_func into mouse, function, config
- thumb combos returned
- adjusted combo and oled configuration
- big ol keymap changes
- hinting at return to boards without encoders
This commit is contained in:
Victor 2024-08-20 22:53:18 -05:00
parent b3649afc23
commit fee58201e5
Failed to generate hash of commit
12 changed files with 189 additions and 97 deletions

View file

@ -1,5 +1,28 @@
#include "combo.h"
uint16_t get_combo_term(uint16_t index, combo_t *combo) {
// or with combo index, i.e. its name from enum.
switch (index) {
case LYR_FUNCTION:
case LYR_CONFIG:
return COMBO_TERM + 100;
default:
return COMBO_TERM;
}
}
bool get_combo_must_hold(uint16_t index, combo_t *combo) {
switch (index) {
case LYR_CONFIG:
case LYR_FUNCTION:
return true;
default:
return false;
}
}
bool combo_should_trigger (uint16_t combo_index, combo_t *combo, uint16_t keycode, keyrecord_t *record) {
switch (combo_index) {
case MOUSE_BUTTON2:
@ -9,11 +32,17 @@ bool combo_should_trigger (uint16_t combo_index, combo_t *combo, uint16_t keycod
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 )) {
&& ( get_highest_layer(layer_state | default_layer_state) != _MOUSE )) {
return false;
}
case LYR_FUNCTION:
case LYR_CONFIG:
if ( get_highest_layer(layer_state | default_layer_state) > FIRST_DEFAULT_LAYER ) {
return false;
}
default:
return true;
}
}
}