Remove redundant keymap templates (#23685)
This commit is contained in:
parent
c3b06efb1d
commit
42a37577e1
12 changed files with 186 additions and 192 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue