From 9ce4bda99e40fa4c0d7cde958d23558519406625 Mon Sep 17 00:00:00 2001 From: Evy Bongers Date: Sat, 11 May 2024 10:27:17 +0200 Subject: [PATCH] Add a bunch of additional comments Signed-off-by: Evy Bongers --- .../Devices/Keyboardio/Model100/Model100.ino | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/examples/Devices/Keyboardio/Model100/Model100.ino b/examples/Devices/Keyboardio/Model100/Model100.ino index 12c8aea1d..8aad4ebfd 100644 --- a/examples/Devices/Keyboardio/Model100/Model100.ino +++ b/examples/Devices/Keyboardio/Model100/Model100.ino @@ -312,6 +312,8 @@ KEYMAPS( #define RGB_UNSET CRGB(0x00, 0x00, 0x00) #define RGB_RED CRGB(0xff, 0x00, 0x00) +// Set up a default palette to be use for the Colormap and Colormap-Overlay +// plugins PALETTE( RGB_UNSET, RGB_UNSET, @@ -617,8 +619,9 @@ KALEIDOSCOPE_INIT_PLUGINS( // The Colormap effect makes it possible to set up per-layer colormaps ColormapEffect, - // The colormap overlay plugin is responsible for lighting up the keys assigned - // in the factory 'numpad' mode + // The colormap overlay plugin provides a way to set LED colors regardless of + // the active LED effect. This is used for lighting up the keys assigned in + // the factory 'numpad' mode ColormapOverlay, // The HostPowerManagement plugin allows us to turn LEDs off when then host @@ -651,6 +654,20 @@ void setup() { // First, call Kaleidoscope's internal setup function Kaleidoscope.setup(); + // Add colormap overlays for all keys of the numpad. This makes sure that + // all keys of the numpad light up once the numpad layer is active. + // + // The call signature is: + // kaleidoscope::plugin::Overlay(, , ) + // + // Key address matrix: https://github.com/keyboardio/Kaleidoscope/blob/master/plugins/Kaleidoscope-Hardware-Keyboardio-Model100/src/kaleidoscope/device/keyboardio/Model100.h#L175-L205 + // + // (0, 0) (0, 1) (0, 2) (0, 3) (0, 4) (0, 5) (0, 6) | (0, 9) (0, 10) (0, 11) (0, 12) (0, 13) (0, 14) (0, 15) + // (1, 0) (1, 1) (1, 2) (1, 3) (1, 4) (1, 5) (1, 6) | (1, 9) (1, 10) (1, 11) (1, 12) (1, 13) (1, 14) (1, 15) + // (2, 0) (2, 1) (2, 2) (2, 3) (2, 4) (2, 5) | (2, 10) (2, 11) (2, 12) (2, 13) (2, 14) (2, 15) + // (3, 0) (3, 1) (3, 2) (3, 3) (3, 4) (3, 5) (2, 6) | (2, 9) (3, 10) (3, 11) (3, 12) (3, 13) (3, 14) (3, 15) + // (0, 7) (1, 7) (2, 7) (3, 7) | (3, 8) (2, 8) (1, 8) (0, 8) + // (3, 6) | (3, 9) COLORMAP_OVERLAYS( kaleidoscope::plugin::Overlay(NUMPAD, KeyAddr(0, 11), 23), // 7 kaleidoscope::plugin::Overlay(NUMPAD, KeyAddr(1, 11), 23), // 4