summaryrefslogtreecommitdiff
path: root/keyboards/annepro2/annepro2.c
diff options
context:
space:
mode:
authorbwisn <56162793+bwisn@users.noreply.github.com>2022-04-13 16:24:38 +0200
committerGitHub <noreply@github.com>2022-04-13 07:24:38 -0700
commitad981dea72af5a2e207ed276231470a4f675e54a (patch)
treee4d4c6b0f3b62e9f813c7a934b9b9108b1face72 /keyboards/annepro2/annepro2.c
parent3f8343e5525adb6c02c10c6659c54d18204c52fb (diff)
downloadqmk_firmware-ad981dea72af5a2e207ed276231470a4f675e54a.tar.gz
qmk_firmware-ad981dea72af5a2e207ed276231470a4f675e54a.zip
[Keyboard] annepro2: match default keymap to stock keycaps (#16724)
Diffstat (limited to 'keyboards/annepro2/annepro2.c')
-rw-r--r--keyboards/annepro2/annepro2.c64
1 files changed, 64 insertions, 0 deletions
diff --git a/keyboards/annepro2/annepro2.c b/keyboards/annepro2/annepro2.c
index 0f49f93104..ef18f83329 100644
--- a/keyboards/annepro2/annepro2.c
+++ b/keyboards/annepro2/annepro2.c
@@ -42,6 +42,8 @@ static const SerialConfig ble_uart_config = {
static uint8_t led_mcu_wakeup[11] = {0x7b, 0x10, 0x43, 0x10, 0x03, 0x00, 0x00, 0x7d, 0x02, 0x01, 0x02};
+static uint8_t led_enabled = 1;
+
ble_capslock_t ble_capslock = {._dummy = {0}, .caps_lock = false};
#ifdef RGB_MATRIX_ENABLE
@@ -226,6 +228,68 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
else ap2_led_enable();
return true;
#endif
+
+ case KC_AP_RGB_VAI:
+ if (record->event.pressed) {
+ if (get_mods() & MOD_MASK_SHIFT) {
+ rgb_matrix_increase_hue();
+ return false;
+ } else if (get_mods() & MOD_MASK_CTRL) {
+ rgb_matrix_decrease_hue();
+ return false;
+ } else {
+ rgb_matrix_increase_val();
+ }
+ }
+ return true;
+
+ case KC_AP_RGB_VAD:
+ if (record->event.pressed) {
+ if (get_mods() & MOD_MASK_SHIFT) {
+ rgb_matrix_increase_sat();
+ return false;
+ } else if (get_mods() & MOD_MASK_CTRL) {
+ rgb_matrix_decrease_sat();
+ return false;
+ } else {
+ rgb_matrix_decrease_val();
+ }
+ }
+ return true;
+
+ case KC_AP_RGB_TOG:
+ if (record->event.pressed) {
+ if (get_mods() & MOD_MASK_SHIFT) {
+ rgb_matrix_increase_speed();
+ return false;
+ } else if (get_mods() & MOD_MASK_CTRL) {
+ rgb_matrix_decrease_speed();
+ return false;
+ } else {
+ if (led_enabled) {
+ ap2_led_disable();
+ rgb_matrix_disable();
+ led_enabled = 0;
+ } else {
+ ap2_led_enable();
+ rgb_matrix_enable();
+ led_enabled = 1;
+ }
+ return true;
+ }
+ }
+ return true;
+
+ case KC_AP_RGB_MOD:
+ if (record->event.pressed) {
+ if (get_mods() & MOD_MASK_CTRL) {
+ rgb_matrix_step_reverse();
+ return false;
+ } else {
+ rgb_matrix_step();
+ }
+ }
+ return true;
default:
break;