1
0
Fork 0

Remove redundant keymap templates (#23685)

This commit is contained in:
Joel Challis 2024-05-09 12:06:21 +01:00 committed by GitHub
parent c3b06efb1d
commit 42a37577e1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 186 additions and 192 deletions

View file

@ -61,3 +61,46 @@ void matrix_init_kb(void) {
matrix_init_user();
}
bool encoder_update_kb(uint8_t index, bool clockwise) {
if (!encoder_update_user(index, clockwise)) { return false; }
if (index == 0) {
switch (get_highest_layer(layer_state)) {
case 0:
if (clockwise) {
tap_code(KC_MS_R);
} else {
tap_code(KC_MS_L);
}
break;
default:
if (clockwise) {
tap_code(KC_EQL);
} else {
tap_code(KC_MINS);
}
break;
}
} else if (index == 1) {
switch (get_highest_layer(layer_state)) {
case 0:
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
break;
default:
if (clockwise) {
tap_code(KC_RIGHT);
} else {
tap_code(KC_LEFT);
}
break;
}
}
return true;
}