Skip to content

Commit

Permalink
Add a bunch of additional comments
Browse files Browse the repository at this point in the history
Signed-off-by: Evy Bongers <[email protected]>
  • Loading branch information
EvyBongers committed May 11, 2024
1 parent d16c94a commit 9ce4bda
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions examples/Devices/Keyboardio/Model100/Model100.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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(<layer>, <key_address>, <palette_index>)
//
// 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
Expand Down

0 comments on commit 9ce4bda

Please sign in to comment.