[Keyboard] super16 update (#16494)

This commit is contained in:
ziptyze
2022-04-13 02:04:38 -04:00
committed by GitHub
parent 3f66e25b41
commit 2d05c7fc25
6 changed files with 156 additions and 23 deletions

View File

@@ -27,8 +27,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[1] = LAYOUT_ortho_4x4( /* Fn Layer */
RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI,
RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
RGB_SPD, RGB_SPI, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, RESET
),
};
bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code_delay(KC_VOLU, 10);
} else {
tap_code_delay(KC_VOLD, 10);
}
} else if (index == 1) { /* Second encoder */
if (clockwise) {
rgb_matrix_increase_hue();
} else {
rgb_matrix_decrease_hue();
}
}
return false;
}