summaryrefslogtreecommitdiffstats
path: root/keyboards/atlantis/ak81_ve/ak81_ve.c
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2022-03-07 06:56:26 +0000
committerQMK Bot <hello@qmk.fm>2022-03-07 06:56:26 +0000
commitb28d8fcb077152976b21ed368e928c1b24cb24ea (patch)
tree63fec51364d1a5bd20d751a46cf2295d3bc9d8f2 /keyboards/atlantis/ak81_ve/ak81_ve.c
parentc810d8cc1bafda075e32d7a20de021e5f7d74e41 (diff)
parentbbd47fcaa258422caeb3ad5dca7cb3cce3b539ed (diff)
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'keyboards/atlantis/ak81_ve/ak81_ve.c')
-rw-r--r--keyboards/atlantis/ak81_ve/ak81_ve.c31
1 files changed, 26 insertions, 5 deletions
diff --git a/keyboards/atlantis/ak81_ve/ak81_ve.c b/keyboards/atlantis/ak81_ve/ak81_ve.c
index fcf279ed46..2426d70fe8 100644
--- a/keyboards/atlantis/ak81_ve/ak81_ve.c
+++ b/keyboards/atlantis/ak81_ve/ak81_ve.c
@@ -40,8 +40,8 @@ led_config_t g_led_config = { {
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8,
- 4, 4, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
- 4, 4, 4, 1, 1, 4, 1, 1, 1,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
} };
#endif
@@ -52,9 +52,30 @@ bool encoder_update_kb(uint8_t index, bool clockwise) {
return false;
}
if (clockwise) {
- tap_code(KC_VOLD);
- } else {
- tap_code(KC_VOLU);
+ switch (get_highest_layer(layer_state)) {
+ case 0:
+ tap_code(KC_VOLU);
+ break;
+ case 1:
+ rgb_matrix_step();
+ break;
+ default:
+ tap_code(KC_VOLU);
+ break;
+ }
+ }
+ else {
+ switch (get_highest_layer(layer_state)) {
+ case 0:
+ tap_code(KC_VOLD);
+ break;
+ case 1:
+ rgb_matrix_step_reverse();
+ break;
+ default:
+ tap_code(KC_VOLD);
+ break;
+ }
}
return true;
}