summaryrefslogtreecommitdiff
path: root/keyboards/anavi/arrows/arrows.c
diff options
context:
space:
mode:
authorLeon Anavi <leon@anavi.org>2023-12-05 08:43:14 +0100
committerGitHub <noreply@github.com>2023-12-04 23:43:14 -0800
commit6fb9de6cbbb29a674638f603b7c03b47b4c52130 (patch)
treeaa78ce662bfd3c6ff4b75b52c098f7ae20455fb2 /keyboards/anavi/arrows/arrows.c
parent61708d60fbc8f23597b697a2e18163c6dc9003c7 (diff)
[Keyboard] Add ANAVI Arrows (#22454)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Diffstat (limited to 'keyboards/anavi/arrows/arrows.c')
-rw-r--r--keyboards/anavi/arrows/arrows.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/keyboards/anavi/arrows/arrows.c b/keyboards/anavi/arrows/arrows.c
new file mode 100644
index 0000000000..6ecc8745f8
--- /dev/null
+++ b/keyboards/anavi/arrows/arrows.c
@@ -0,0 +1,38 @@
+// Copyright 2023 Leon Anavi <leon@anavi.org>
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include "quantum.h"
+
+#ifdef OLED_ENABLE
+
+bool oled_task_kb(void) {
+
+ if (!oled_task_user()) {
+ return false;
+ }
+
+ // Host Keyboard Layer Status
+ oled_write_ln_P(PSTR("ANAVI Arrows"), false);
+ oled_write_ln_P(PSTR("Keymap: Default"), false);
+
+ // Host Keyboard LED Status
+ led_t led_state = host_keyboard_led_state();
+ oled_write_P(PSTR("Num Lock: "), false);
+ oled_write_ln_P(led_state.num_lock ? PSTR("On") : PSTR("Off"), false);
+ oled_write_P(PSTR("Caps Lock: "), false);
+ oled_write_ln_P(led_state.caps_lock ? PSTR("On") : PSTR("Off"), false);
+ oled_write_P(PSTR("Scroll Lock: "), false);
+ oled_write_ln_P(led_state.scroll_lock ? PSTR("On") : PSTR("Off"), false);
+# ifdef RGBLIGHT_ENABLE
+ oled_write_P(PSTR("RGB Mode: "), false);
+ oled_write_ln(get_u8_str(rgblight_get_mode(), ' '), false);
+ oled_write_P(PSTR("h: "), false);
+ oled_write(get_u8_str(rgblight_get_hue(), ' '), false);
+ oled_write_P(PSTR("s: "), false);
+ oled_write(get_u8_str(rgblight_get_sat(), ' '), false);
+ oled_write_P(PSTR("v: "), false);
+ oled_write_ln(get_u8_str(rgblight_get_val(), ' '), false);
+# endif
+ return false;
+}
+#endif