Skip to content

Commit b046bff

Browse files
AnanyaKirtidrashna
andauthored
[Keyboard] Added CapsLED and ScrollLock LEDs (#13837)
Co-authored-by: Drashna Jaelre <[email protected]>
1 parent bc2b73f commit b046bff

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

keyboards/hp69/config.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
4747
#define RGB_DI_PIN A3
4848
#define RGBLED_NUM 20
4949
#define RGBLIGHT_ANIMATIONS
50+
#define RGBLIGHT_SLEEP
5051

5152
#define AUDIO_PIN A5
5253
#define AUDIO_PIN_ALT A4
5354
#define AUDIO_PIN_ALT_AS_NEGATIVE
55+
56+
#define LED_CAPS_LOCK_PIN A6
57+
#define LED_SCROLL_LOCK_PIN A7

keyboards/hp69/keymaps/via/keymap.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
4646
),
4747

4848

49-
};
49+
};
50+
51+
52+
void matrix_scan_user(void) {
53+
writePin(A7, layer_state_is(1));
54+
}
55+
56+
bool led_update_user(led_t led_state) {
57+
writePin(LED_CAPS_LOCK_PIN, !led_state.caps_lock);
58+
return false;
59+
};

0 commit comments

Comments
 (0)