splitkb.com
Warning: 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:

#include "gpio.h"

void keyboard_pre_init_user(void) {
    gpio_set_pin_output(24);
    gpio_write_pin_high(24);
}
Info: Due to technical reasons, when you want to turn the LED off, you actually set the pin to high. It's inverted!

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.


Questions? Help us improve!
Do you have questions after reading the documentation? Do you have feedback about this page, or about the documentation in general? Please send us an email. You can use the buttons below which will open your mail client or app with a template, or send your mail to support@splitkb.com.