Created
January 27, 2023 12:02
-
-
Save EtiTheSpirit/e1455917bfac4f4bdd191dd684fbf9e3 to your computer and use it in GitHub Desktop.
A macro I made for the ZSA Moonlander. This macro allows declaring colors in the same order as one declares the keymaps.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Just throw this macro into keymap.c | |
// This macro allows declaring colors just like one would declare their keymap. It is ordered identically and allows a 1:1 | |
// mimic of the keymap macro when declaring your colors. | |
// | |
// Here is the default layout (I use this as a frame of reference): https://configure.zsa.io/moonlander/layouts/default/latest/0 | |
// Button indices start from the top left of the left keyboard half (= on the default layout), going down. Once it hits the bottom, it goes right one space and continues that way. | |
// | |
// When it reaches the thumb buttons, it starts at the top most long thumb button (space on the default layout) then continues along the long buttons | |
// (on the default layout, it is space => backspace => left windows). After these three, it does the red button. | |
// | |
// After this, it goes to the right side of the keyboard and works exactly the same, except it starts at the top right key and is an exact mirror of the left side. | |
// clang-format off | |
#define COLORS_moonlander(l0, l5, l10, l15, l20, l25, l29, r65, r61, r56, r51, r46, r41, r36,\ | |
l1, l6, l11, l16, l21, l26, l30, r66, r62, r57, r52, r47, r42, r37,\ | |
l2, l7, l12, l17, l22, l27, l31, r67, r63, r58, r53, r48, r43, r38,\ | |
l3, l8, l13, l18, l23, l28, r64, r59, r54, r49, r44, r39,\ | |
l4, l9, l14, l19, l24, tlr, tlt0, tlt1, tlt2, trt2, trt1, trt0, trr, r60, r55, r50, r45, r40) {l0, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12, l13, l14, l15, l16, l17, l18, l19, l20, l21, l22, l23, l24, l25, l26, l27, l28, l29, l30, l31, tlt0, tlt1, tlt2, tlr, r36, r37, r38, r39, r40, r41, r42, r43, r44, r45, r46, r47, r48, r49, r50, r51, r52, r53, r54, r55, r56, r57, r58, r59, r60, r61, r62, r63, r64, r65, r66, r67, trt0, trt1, trt2, trr} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment