[Keyboard] update encoder function, info.json data (#7035)

* update encoder function, info.json data

* Update rules.mk
This commit is contained in:
vuhopkep
2019-10-19 08:18:39 +07:00
committed by Drashna Jaelre
parent c26faed2b6
commit 9bfacc7c76
4 changed files with 16 additions and 16 deletions

View File

@@ -44,17 +44,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
void encoder_update_user(uint8_t index, bool clockwise) {
if (IS_LAYER_ON(_FN)) { /* First encoder */
if (index == 0) {
if (IS_LAYER_ON(_FN)) {
if (clockwise) {
rgb_matrix_step();
tap_code(KC_BRIU);
} else {
rgb_matrix_step_reverse();
tap_code(KC_BRID);
}
} else {
if (clockwise) {
rgb_matrix_increase_speed();
tap_code(KC_VOLU);
} else {
rgb_matrix_decrease_speed();
tap_code(KC_VOLD);
}
}
}
}