summaryrefslogtreecommitdiff
path: root/keyboards
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2022-03-18 17:25:20 +0000
committerQMK Bot <hello@qmk.fm>2022-03-18 17:25:20 +0000
commita900f9251a17a01880d34212a06f9e5f62d25bcb (patch)
tree398f19bb8cb752b040c622f40408929652835cf8 /keyboards
parent3a08deb7fe0d83ca17a8a584fd68c98a018a1c17 (diff)
parent773242503ca7e12f7a77a588789640d0dbde8c04 (diff)
downloadqmk_firmware-a900f9251a17a01880d34212a06f9e5f62d25bcb.tar.gz
qmk_firmware-a900f9251a17a01880d34212a06f9e5f62d25bcb.zip
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'keyboards')
-rw-r--r--keyboards/annepro2/annepro2.c9
-rw-r--r--keyboards/annepro2/annepro2.h1
-rw-r--r--keyboards/annepro2/keymaps/default-layer-indicators/keymap.c9
3 files changed, 17 insertions, 2 deletions
diff --git a/keyboards/annepro2/annepro2.c b/keyboards/annepro2/annepro2.c
index 8767265315..0f49f93104 100644
--- a/keyboards/annepro2/annepro2.c
+++ b/keyboards/annepro2/annepro2.c
@@ -192,6 +192,15 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
ap2_led_reset_foreground_color();
break;
+ case KC_AP_LED_TOG:
+ if (ap2_led_status.matrix_enabled) {
+ ap2_led_disable();
+ } else {
+ ap2_led_enable();
+ ap2_led_reset_foreground_color();
+ }
+ break;
+
case KC_AP_LED_NEXT_PROFILE:
ap2_led_next_profile();
ap2_led_reset_foreground_color();
diff --git a/keyboards/annepro2/annepro2.h b/keyboards/annepro2/annepro2.h
index 1b5933f577..143904b6ad 100644
--- a/keyboards/annepro2/annepro2.h
+++ b/keyboards/annepro2/annepro2.h
@@ -53,6 +53,7 @@ enum AP2KeyCodes {
KC_AP2_USB,
KC_AP_LED_ON,
KC_AP_LED_OFF,
+ KC_AP_LED_TOG,
KC_AP_LED_NEXT_PROFILE,
KC_AP_LED_PREV_PROFILE,
KC_AP_LED_NEXT_INTENSITY,
diff --git a/keyboards/annepro2/keymaps/default-layer-indicators/keymap.c b/keyboards/annepro2/keymaps/default-layer-indicators/keymap.c
index 405769466a..1fd97c584e 100644
--- a/keyboards/annepro2/keymaps/default-layer-indicators/keymap.c
+++ b/keyboards/annepro2/keymaps/default-layer-indicators/keymap.c
@@ -83,7 +83,7 @@ enum anne_pro_layers {
/*
* Layer FN2
* ,-----------------------------------------------------------------------------------------.
- * | ~ | BT1 | BT2 | BT3 | BT4 | F5 | F6 | F7 |LEDOF|LEDON| F10 | F11 | F12 | Bksp |
+ * | ~ | BT1 | BT2 | BT3 | BT4 | F5 | F6 | F7 | F8 |LEDTG|LEDI+|LEDPV|LEDNX| Bksp |
* |-----------------------------------------------------------------------------------------+
* | Tab | q | UP | e | r | t | y | u | i | o | PS | HOME | END | \ |
* |-----------------------------------------------------------------------------------------+
@@ -96,7 +96,7 @@ enum anne_pro_layers {
*
*/
[FN2] = LAYOUT_60_ansi( /* FN2 */
- _______, KC_AP2_BT1, KC_AP2_BT2, KC_AP2_BT3, KC_AP2_BT4, _______, _______, _______, KC_AP_LED_OFF, KC_AP_LED_ON, _______, _______, _______, _______,
+ _______, KC_AP2_BT1, KC_AP2_BT2, KC_AP2_BT3, KC_AP2_BT4, _______, _______, _______, _______, KC_AP_LED_TOG, KC_AP_LED_NEXT_INTENSITY, KC_AP_LED_PREV_PROFILE, KC_AP_LED_NEXT_PROFILE, _______,
MO(FN2), _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_HOME, KC_END, _______,
_______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, KC_PGUP, KC_PGDN, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_DEL, _______,
@@ -105,6 +105,11 @@ enum anne_pro_layers {
};
// clang-format on
+void keyboard_post_init_user(void) {
+ ap2_led_enable();
+ ap2_led_set_profile(7);
+}
+
layer_state_t layer_state_set_user(layer_state_t state) {
switch (get_highest_layer(state)) {
case FN1: