Note: this feature requires modifying your keymap's C code. It is not available in Via/Vial.
Like most controllers, the Liatris features a power LED. After all, it is quite nice to know whether your keyboard is actually turning on.
However, many people do not want to have a bright light shining in their face the entire time they are using their keyboard. The traditional solution is to destroy the LED by poking it with a soldering iron, or to mount the controller upside-down.
At splitkb.com, we decided to go for a different solution. The Liatris is intended to be mounted upside-down as usual, but we decided to place the power LED on the back and make it user-controllable by hooking it up to microcontroller pin GPIO24!
To get you started, here are some examples of common uses.
Turning the power LED off
By default, the power LED will be turned on all the time. If you wish to turn it off completely, place the following code in your keymap.c:
void keyboard_pre_init_user(void) {
// Set our LED pin as output
setPinOutput(24);
// Turn the LED off
// (Due to technical reasons, high is off and low is on)
writePinHigh(24);
}
When the keyboard is plugged in, the LED will initially power on. As soon as QMK starts running, it'll be turned off.
Use the LED for Caps Lock
To use the LED as a Caps Lock indicator, add the following code to your config.h:
#define LED_CAPS_LOCK_PIN 24
#define LED_PIN_ON_STATE 0
Of course, this approach also works for Num Lock or Scroll Lock. For more information, see the QMK documentation of this feature.