forked from qmk/qmk_userspace
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#ifdef OLED_ENABLE | ||
bool oled_task_user(void) { | ||
// Host Keyboard Layer Status | ||
oled_write_P(PSTR("Layer: "), false); | ||
|
||
switch (get_highest_layer(layer_state)) { | ||
case _QWERTY: | ||
oled_write_P(PSTR("QWE\n"), false); | ||
break; | ||
case _COLEMAK: | ||
oled_write_P(PSTR("COL\n"), false); | ||
break; | ||
case _FN_A: | ||
oled_write_P(PSTR("FnA\n"), false); | ||
break; | ||
case _FN_B: | ||
oled_write_P(PSTR("FnB\n"), false); | ||
break; | ||
default: | ||
// Or use the write_ln shortcut over adding '\n' to the end of your string | ||
oled_write_ln_P(PSTR("???"), false); | ||
} | ||
|
||
// Host Keyboard LED Status | ||
led_t led_state = host_keyboard_led_state(); | ||
oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); | ||
oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); | ||
oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); | ||
|
||
return false; | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters