Add core/fallback encoder behaviour (#20320)
This commit is contained in:
@@ -100,22 +100,3 @@ bool led_update_kb(led_t led_state) {
|
||||
writePin(LED_02, !led_state.num_lock);
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) {
|
||||
return false;
|
||||
}
|
||||
switch (get_highest_layer(layer_state)) {
|
||||
case 0:
|
||||
// main layer, volume
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user