Underglow refers to the lighting provided by LEDs underneath the keyboard.
rumcake makes the assumption that your underglow LEDs are RGB, and individually
addressable.
storage (optional, if you want to save your backlight settings)
Required code
To set up underglow, you must add a new type to implement traits on.
Then, you can add underglow(id = <type>, driver_setup_fn = <setup_fn>) to your #[keyboard] macro
invocation. Your new type must implement the UnderglowDevice trait.
The driver_setup_fn must be an async function that has no parameters, and returns a type that implements the
UnderglowDriver<T> trait.
Lastly, you must set up the driver. To do this, you need to complete your driver_setup_fn by constructing the driver.
You can check the API reference for your chosen driver for a set up
function or macro to make this process easier.
Depending on the driver, you may also need to implement the appropriate trait that corresponds to your chosen driver in the #[keyboard] macro.
Check the list of available underglow drivers for this information.
For example, with ws2812_bitbang, you can use the setup_ws2812_bitbang! macro to set up the driver:
Keycodes
In your keyberon layout, you can use any of the enum members defined in UnderglowCommand:
In your KeyboardLayout implementation, you must choose the underglow system that the keycodes will
correspond to by implementing UnderglowDeviceType.