Key coordinates (for LEDControl)

Are the key coordinates documented somewhere? I am using LEDControl.setCrgbAt() to light up specific keys. Most keys are obvious, but at what cooridnates are the thumb keys, for example. I figured out some by experimenting, but it would of course be easier if it was documented somewhere.

1 Like

There’s a diagram in the MagicCombo repo:

(RxCy = row x, column y)

1 Like

This is the closest thing we have, I believe:

Mind you, you don’t need to know this, unless you use LED indexes instead of key coordinates. Key coordinates are automatically translated to LED indexes behind the courtains. For key coordinates, see this KLE layout:


Thanks @james.nvc and @algernon! Those keyboard layout diagrams are exactly what I was looking for.

Hello. Re this old thread, it seems to me that that the diagram mentioned by @james.nvc shows RC order of one pattern, the key_led_map mentioned by @algernon is of another pattern and the linear key sequence we declare for layers in the .ino file is of yet another pattern:

  (Key_Backtick,    Key_1, Key_2, Key_3, Key_4, Key_5, Key_Escape,
   Key_LeftBracket, Key_Q, Key_W, Key_E, Key_R, Key_T, Key_Tab,
   Key_Minus,       Key_A, Key_S, Key_D, Key_F, Key_G,
   Key_Backslash,   Key_Z, Key_X, Key_C, Key_V, Key_B, Key_LeftAlt,
   Key_PcApplication, Key_Backspace, Key_Delete, Key_LeftGui,

   Key_F12,         Key_6, Key_7, Key_8,     Key_9,      Key_0,         Key_NonUsBackslashAndPipe,
   Key_Enter,       Key_Y, Key_U, Key_I,     Key_O,      Key_P,         Key_RightBracket,
                    Key_H, Key_J, Key_K,     Key_L,      Key_Semicolon, Key_Equals,
   Key_LeftControl, Key_N, Key_M, Key_Comma, Key_Period, Key_Slash,     Key_Quote,
   LSHIFT(Key_RightAlt), Key_LeftShift, Key_Spacebar, Key_RightAlt,

… or maybe it’s just somewhat confusing for me. I would like to have a linear array of the above keymap pattern but giving the LED IDs of the respective keys. Does one such exist or should it be derived from the above?

FWIW, LEDcontrol.setCrgbAt() will use the RxCy coordinates from the diagram, when using the variant with row & column arguments. If using the variant with an index only, that uses the LED coordinate, as looked up from key_led_map.

You can use the KEYMAP_STACKED macro to lay out LED stuff in the same order, into the same underlying structure… maybe that’d help?

1 Like

Wow KEYMAP_STACKED is exactly what I needed! I also did the grunt work and did this LED index layout based on the KLE gist you shared above.