Skip to content

Commit

Permalink
rgb_led struct conversion (aka: Per led (key) type rgb matrix effects…
Browse files Browse the repository at this point in the history
… - part 2) (#5783)

* Initial conversion of the rgb_led struct

* Converting last keyboard & updating effects to take advantage of the new structure

* New struct should not be const

* Updated docs

* Changing define ___ for no led to NO_LED

* Missed converting some keymap usages of the old struct layout
  • Loading branch information
XScorpion2 authored and mechmerlin committed May 7, 2019
1 parent c7f8548 commit af89752
Show file tree
Hide file tree
Showing 51 changed files with 755 additions and 1,644 deletions.
32 changes: 18 additions & 14 deletions docs/feature_rgb_matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,21 +124,25 @@ Configure the hardware via your `config.h`:
---
From this point forward the configuration is the same for all the drivers. The struct rgb_led array tells the system for each led, what key electrical matrix it represents, what the physical position is on the board, and if the led is for a modifier key or not. Here is a brief example:
From this point forward the configuration is the same for all the drivers. The `led_config_t` struct provides a key electrical matrix to led index lookup table, what the physical position of each LED is on the board, and what type of key or usage the LED if the LED represents. Here is a brief example:
```C
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
/* {row | col << 4}
* | {x=0..224, y=0..64}
* | | flags
* | | | */
{{0|(0<<4)}, {20.36*0, 21.33*0}, 1},
{{0|(1<<4)}, {20.36*1, 21.33*0}, 4},
....
}
const led_config_t g_led_config = { {
// Key Matrix to LED Index
{ 5, NO_LED, NO_LED, 0 },
{ NO_LED, NO_LED, NO_LED, NO_LED },
{ 4, NO_LED, NO_LED, 1 },
{ 3, NO_LED, NO_LED, 2 }
}, {
// LED Index to Physical Position
{ 188, 16 }, { 187, 48 }, { 149, 64 }, { 112, 64 }, { 37, 48 }, { 38, 16 }
}, {
// LED Index to Flag
1, 4, 4, 4, 4, 1
} };
```

The first part, `{row | col << 4}`, tells the system what key this LED represents by using the key's electrical matrix row & col. The second part, `{x=0..224, y=0..64}` represents the LED's physical position on the keyboard. The `x` is between (inclusive) 0-224, and `y` is between (inclusive) 0-64 as the effects are based on this range. The easiest way to calculate these positions is imagine your keyboard is a grid, and the top left of the keyboard represents x, y coordinate 0, 0 and the bottom right of your keyboard represents 224, 64. Using this as a basis, you can use the following formula to calculate the physical position:
The first part, `// Key Matrix to LED Index`, tells the system what key this LED represents by using the key's electrical matrix row & col. The second part, `// LED Index to Physical Position` represents the LED's physical position on the keyboard. The first value, `x`, is between 0-224 (inclusive), and the second value, `y`, is between 0-64 (inclusive). This range is due to effect that calculate the center or halves for their animations. The easiest way to calculate these positions is imagine your keyboard is a grid, and the top left of the keyboard represents x, y coordinate 0, 0 and the bottom right of your keyboard represents 224, 64. Using this as a basis, you can use the following formula to calculate the physical position:

```C
x = 224 / (NUMBER_OF_COLS - 1) * COL_POSITION
Expand All @@ -147,16 +151,16 @@ y = 64 / (NUMBER_OF_ROWS - 1) * ROW_POSITION

Where NUMBER_OF_COLS, NUMBER_OF_ROWS, COL_POSITION, & ROW_POSITION are all based on the physical layout of your keyboard, not the electrical layout.

`flags` is a bitmask, whether or not a certain LEDs is of a certain type. It is recommended that LEDs are set to only 1 type.
`// LED Index to Flag` is a bitmask, whether or not a certain LEDs is of a certain type. It is recommended that LEDs are set to only 1 type.

## Flags

|Define |Description |
|------------------------------------|-------------------------------------------|
|`#define HAS_FLAGS(bits, flags)` |Returns true if `bits` has all `flags` set.|
|`#define HAS_ANY_FLAGS(bits, flags)`|Returns true if `bits` has any `flags` set.|
|`#define LED_FLAG_NONE 0x00` |If thes LED has no flags. |
|`#define LED_FLAG_ALL 0xFF` |If thes LED has all flags. |
|`#define LED_FLAG_NONE 0x00` |If this LED has no flags. |
|`#define LED_FLAG_ALL 0xFF` |If this LED has all flags. |
|`#define LED_FLAG_MODIFIER 0x01` |If the Key for this LED is a modifier. |
|`#define LED_FLAG_UNDERGLOW 0x02` |If the LED is for underglow. |
|`#define LED_FLAG_KEYLIGHT 0x04` |If the LED is for key backlight. |
Expand Down
40 changes: 19 additions & 21 deletions keyboards/boston_meetup/2019/2019.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,18 @@
#include "haptic.h"

#ifdef RGB_MATRIX_ENABLE
#include "rgblight.h"

rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
/*{row | col << 4}
| {x=0..224, y=0..64}
| | modifier
| | | */
{{1|(3<<4)}, {188, 16}, 4},
{{3|(3<<4)}, {187, 48}, 4},
{{4|(2<<4)}, {149, 64}, 4},
{{4|(1<<4)}, {112, 64}, 4},
{{3|(0<<4)}, {37, 48}, 4},
{{1|(0<<4)}, {38, 16}, 4}
};
#include "rgb_matrix.h"

led_config_t g_led_config = { {
{ 5, NO_LED, NO_LED, 0 },
{ NO_LED, NO_LED, NO_LED, NO_LED },
{ 4, NO_LED, NO_LED, 1 },
{ 3, NO_LED, NO_LED, 2 }
}, {
{ 188, 16 }, { 187, 48 }, { 149, 64 }, { 112, 64 }, { 37, 48 }, { 38, 16 }
}, {
4, 4, 4, 4, 4, 4
} };
#endif

uint8_t *o_fb;
Expand All @@ -48,12 +46,12 @@ uint16_t counterst = 0;
#define ScreenOffInterval 60000 /* milliseconds */
static uint16_t last_flush;

volatile uint8_t led_numlock = false;
volatile uint8_t led_capslock = false;
volatile uint8_t led_numlock = false;
volatile uint8_t led_capslock = false;
volatile uint8_t led_scrolllock = false;

static uint8_t layer;
static bool queue_for_send = false;
static bool queue_for_send = false;
static uint8_t encoder_value = 32;

__attribute__ ((weak))
Expand All @@ -64,13 +62,13 @@ void draw_ui(void) {

/* Boston MK title is 55 x 10 pixels */
#define NAME_X 0
#define NAME_Y 0
#define NAME_Y 0

draw_string(NAME_X + 1, NAME_Y + 2, "BOSTON MK", PIXEL_ON, NORM, 0);

/* Layer indicator is 41 x 10 pixels */
#define LAYER_INDICATOR_X 60
#define LAYER_INDICATOR_Y 0
#define LAYER_INDICATOR_Y 0

draw_string(LAYER_INDICATOR_X + 1, LAYER_INDICATOR_Y + 2, "LAYER", PIXEL_ON, NORM, 0);
draw_rect_filled_soft(LAYER_INDICATOR_X + 32, LAYER_INDICATOR_Y + 1, 9, 9, PIXEL_ON, NORM);
Expand All @@ -88,7 +86,7 @@ void draw_ui(void) {
draw_pixel(MATRIX_DISPLAY_X + y + y + 3, MATRIX_DISPLAY_Y + x + x + 3,(matrix_get_row(x) & (1 << y)) > 0, NORM);

}
}
}
draw_rect_soft(MATRIX_DISPLAY_X, MATRIX_DISPLAY_Y, 12, 12, PIXEL_ON, NORM);
/* hadron oled location on thumbnail */
draw_rect_filled_soft(MATRIX_DISPLAY_X + 5, MATRIX_DISPLAY_Y + 2, 6, 2, PIXEL_ON, NORM);
Expand Down Expand Up @@ -195,7 +193,7 @@ void matrix_init_kb(void) {
queue_for_send = true;
matrix_init_user();
}

void matrix_scan_kb(void) {
if (queue_for_send) {
#ifdef QWIIC_MICRO_OLED_ENABLE
Expand Down
125 changes: 56 additions & 69 deletions keyboards/crkbd/rev1/rev1.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,78 +51,65 @@ void led_set_kb(uint8_t usb_led) {
// 05 06 06 05
// 15 14 07 07 14 15 3

/* {row | col << 4} logical layout rows/cols
* | {x=0..224, y=0..64} physical layout
* | | | modifier
* | | | */
#define RGB_MATRIX_LEFT_LEDS \
{ { 0xFF }, { 85, 16 }, 2 }, /* 1 */ \
{ { 0xFF }, { 50, 13 }, 2 }, /* 2 */ \
{ { 0xFF }, { 16, 20 }, 2 }, /* 3 */ \
{ { 0xFF }, { 16, 38 }, 2 }, /* 4 */ \
{ { 0xFF }, { 50, 48 }, 2 }, /* 5 */ \
{ { 0xFF }, { 85, 52 }, 2 }, /* 6 */ \
{ { 3 | ( 5 << 4 ) }, { 95, 63 }, 1 }, /* 7 */ \
{ { 2 | ( 5 << 4 ) }, { 85, 39 }, 4 }, /* 8 */ \
{ { 1 | ( 5 << 4 ) }, { 85, 21 }, 4 }, /* 9 */ \
{ { 0 | ( 5 << 4 ) }, { 85, 4 }, 4 }, /* 10 */ \
{ { 0 | ( 4 << 4 ) }, { 68, 02 }, 4 }, /* 11 */ \
{ { 1 | ( 4 << 4 ) }, { 68, 19 }, 4 }, /* 12 */ \
{ { 2 | ( 4 << 4 ) }, { 68, 37 }, 4 }, /* 13 */ \
{ { 3 | ( 4 << 4 ) }, { 80, 58 }, 1 }, /* 14 */ \
{ { 3 | ( 3 << 4 ) }, { 60, 55 }, 1 }, /* 15 */ \
{ { 2 | ( 3 << 4 ) }, { 50, 35 }, 4 }, /* 16 */ \
{ { 1 | ( 3 << 4 ) }, { 50, 13 }, 4 }, /* 17 */ \
{ { 0 | ( 3 << 4 ) }, { 50, 0 }, 4 }, /* 18 */ \
{ { 0 | ( 2 << 4 ) }, { 33, 3 }, 4 }, /* 19 */ \
{ { 1 | ( 2 << 4 ) }, { 33, 20 }, 4 }, /* 20 */ \
{ { 2 | ( 2 << 4 ) }, { 33, 37 }, 4 }, /* 21 */ \
{ { 2 | ( 1 << 4 ) }, { 16, 42 }, 4 }, /* 22 */ \
{ { 1 | ( 1 << 4 ) }, { 16, 24 }, 4 }, /* 23 */ \
{ { 0 | ( 1 << 4 ) }, { 16, 7 }, 4 }, /* 24 */ \
{ { 0 | ( 0 << 4 ) }, { 0, 7 }, 1 }, /* 25 */ \
{ { 1 | ( 0 << 4 ) }, { 0, 24 }, 1 }, /* 26 */ \
{ { 2 | ( 0 << 4 ) }, { 0, 41 }, 1 }, /* 27 */

#define RGB_MATRIX_RIGHT_LEDS \
{ { 0xFF }, { 139, 16 }, 2 }, /* 1 */ \
{ { 0xFF }, { 174, 13 }, 2 }, /* 2 */ \
{ { 0xFF }, { 208, 20 }, 2 }, /* 3 */ \
{ { 0xFF }, { 208, 38 }, 2 }, /* 4 */ \
{ { 0xFF }, { 174, 48 }, 2 }, /* 5 */ \
{ { 0xFF }, { 139, 52 }, 2 }, /* 6 */ \
{ { 7 | ( 5 << 4 ) }, { 129, 63 }, 1 }, /* 7 */ \
{ { 6 | ( 5 << 4 ) }, { 139, 39 }, 4 }, /* 8 */ \
{ { 5 | ( 5 << 4 ) }, { 139, 21 }, 4 }, /* 9 */ \
{ { 4 | ( 5 << 4 ) }, { 139, 4 }, 4 }, /* 10 */ \
{ { 4 | ( 4 << 4 ) }, { 156, 02 }, 4 }, /* 11 */ \
{ { 5 | ( 4 << 4 ) }, { 156, 19 }, 4 }, /* 12 */ \
{ { 6 | ( 4 << 4 ) }, { 156, 37 }, 4 }, /* 13 */ \
{ { 7 | ( 4 << 4 ) }, { 144, 58 }, 1 }, /* 14 */ \
{ { 7 | ( 3 << 4 ) }, { 164, 55 }, 1 }, /* 15 */ \
{ { 6 | ( 3 << 4 ) }, { 174, 35 }, 4 }, /* 16 */ \
{ { 5 | ( 3 << 4 ) }, { 174, 13 }, 4 }, /* 17 */ \
{ { 4 | ( 3 << 4 ) }, { 174, 0 }, 4 }, /* 18 */ \
{ { 4 | ( 2 << 4 ) }, { 191, 3 }, 4 }, /* 19 */ \
{ { 5 | ( 2 << 4 ) }, { 191, 20 }, 4 }, /* 20 */ \
{ { 6 | ( 2 << 4 ) }, { 191, 37 }, 4 }, /* 21 */ \
{ { 6 | ( 1 << 4 ) }, { 208, 42 }, 4 }, /* 22 */ \
{ { 5 | ( 1 << 4 ) }, { 208, 24 }, 4 }, /* 23 */ \
{ { 4 | ( 1 << 4 ) }, { 208, 7 }, 4 }, /* 24 */ \
{ { 4 | ( 0 << 4 ) }, { 224, 7 }, 1 }, /* 25 */ \
{ { 5 | ( 0 << 4 ) }, { 224, 24 }, 1 }, /* 26 */ \
{ { 6 | ( 0 << 4 ) }, { 224, 41 }, 1 }, /* 27 */

#ifdef RGB_MATRIX_SPLIT_RIGHT
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
RGB_MATRIX_RIGHT_LEDS
RGB_MATRIX_LEFT_LEDS
};
led_config_t g_led_config = { {
{ 51, 50, 45, 44, 37, 36, NO_LED },
{ 52, 49, 46, 43, 38, 35, NO_LED },
{ 53, 48, 47, 42, 39, 34, NO_LED },
{ NO_LED, NO_LED, NO_LED, 41, 40, 33, NO_LED },
{ 24, 23, 18, 17, 10, 9, NO_LED },
{ 25, 22, 19, 16, 11, 8, NO_LED },
{ 26, 21, 20, 15, 12, 7, NO_LED },
{ NO_LED, NO_LED, NO_LED, 14, 13, 6, NO_LED }
}, {
{ 139, 16 }, { 174, 13 }, { 208, 20 }, { 208, 38 }, { 174, 48 }, { 139, 52 }, { 129, 63 },
{ 139, 39 }, { 139, 21 }, { 139, 4 }, { 156, 2 }, { 156, 19 }, { 156, 37 }, { 144, 58 },
{ 164, 55 }, { 174, 35 }, { 174, 13 }, { 174, 0 }, { 191, 3 }, { 191, 20 }, { 191, 37 },
{ 208, 42 }, { 208, 24 }, { 208, 7 }, { 224, 7 }, { 224, 24 }, { 224, 41 }, { 85, 16 },
{ 50, 13 }, { 16, 20 }, { 16, 38 }, { 50, 48 }, { 85, 52 }, { 95, 63 }, { 85, 39 },
{ 85, 21 }, { 85, 4 }, { 68, 2 }, { 68, 19 }, { 68, 37 }, { 80, 58 }, { 60, 55 },
{ 50, 35 }, { 50, 13 }, { 50, 0 }, { 33, 3 }, { 33, 20 }, { 33, 37 }, { 16, 42 },
{ 16, 24 }, { 16, 7 }, { 0, 7 }, { 0, 24 }, { 0, 41 }
}, {
2, 2, 2, 2, 2, 2, 1,
4, 4, 4, 4, 4, 4, 1,
1, 4, 4, 4, 4, 4, 4,
4, 4, 4, 1, 1, 1, 2,
2, 2, 2, 2, 2, 1, 4,
4, 4, 4, 4, 4, 1, 1,
4, 4, 4, 4, 4, 4, 4,
4, 4, 1, 1, 1
} };
#else
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
RGB_MATRIX_LEFT_LEDS
RGB_MATRIX_RIGHT_LEDS
};
led_config_t g_led_config = { {
{ 24, 23, 18, 17, 10, 9, NO_LED },
{ 25, 22, 19, 16, 11, 8, NO_LED },
{ 26, 21, 20, 15, 12, 7, NO_LED },
{ NO_LED, NO_LED, NO_LED, 14, 13, 6, NO_LED },
{ 51, 50, 45, 44, 37, 36, NO_LED },
{ 52, 49, 46, 43, 38, 35, NO_LED },
{ 53, 48, 47, 42, 39, 34, NO_LED },
{ NO_LED, NO_LED, NO_LED, 41, 40, 33, NO_LED }
}, {
{ 85, 16 }, { 50, 13 }, { 16, 20 }, { 16, 38 }, { 50, 48 }, { 85, 52 }, { 95, 63 },
{ 85, 39 }, { 85, 21 }, { 85, 4 }, { 68, 2 }, { 68, 19 }, { 68, 37 }, { 80, 58 },
{ 60, 55 }, { 50, 35 }, { 50, 13 }, { 50, 0 }, { 33, 3 }, { 33, 20 }, { 33, 37 },
{ 16, 42 }, { 16, 24 }, { 16, 7 }, { 0, 7 }, { 0, 24 }, { 0, 41 }, { 139, 16 },
{ 174, 13 }, { 208, 20 }, { 208, 38 }, { 174, 48 }, { 139, 52 }, { 129, 63 }, { 139, 39 },
{ 139, 21 }, { 139, 4 }, { 156, 2 }, { 156, 19 }, { 156, 37 }, { 144, 58 }, { 164, 55 },
{ 174, 35 }, { 174, 13 }, { 174, 0 }, { 191, 3 }, { 191, 20 }, { 191, 37 }, { 208, 42 },
{ 208, 24 }, { 208, 7 }, { 224, 7 }, { 224, 24 }, { 224, 41 }
}, {
2, 2, 2, 2, 2, 2, 1,
4, 4, 4, 4, 4, 4, 1,
1, 4, 4, 4, 4, 4, 4,
4, 4, 4, 1, 1, 1, 2,
2, 2, 2, 2, 2, 1, 4,
4, 4, 4, 4, 4, 1, 1,
4, 4, 4, 4, 4, 4, 4,
4, 4, 1, 1, 1
} };
#endif

#endif
Expand Down
103 changes: 30 additions & 73 deletions keyboards/doro67/rgb/rgb.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "rgb.h"
#include "rgb_matrix_types.h"

// Optional override functions below.
// You can leave any or all of these undefined.
Expand Down Expand Up @@ -52,76 +53,32 @@ void led_set_kb(uint8_t usb_led) {
led_set_user(usb_led);
}

rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{0|(0<<4)}, {15*0, 0}, 4}, // Esc
{{0|(1<<4)}, {15*1, 0}, 4}, // 1
{{0|(2<<4)}, {15*2, 0}, 4}, // 2
{{0|(3<<4)}, {15*3, 0}, 4}, // 3
{{0|(4<<4)}, {15*4, 0}, 4}, // 4
{{0|(5<<4)}, {15*5, 0}, 4}, // 5
{{0|(6<<4)}, {15*6, 0}, 4}, // 6
{{0|(7<<4)}, {15*7, 0}, 4}, // 7
{{0|(8<<4)}, {15*8, 0}, 4}, // 8
{{0|(9<<4)}, {15*9, 0}, 4}, // 9
{{0|(10<<4)}, {15*10, 0}, 4}, // 0
{{0|(11<<4)}, {15*11, 0}, 4}, // -
{{0|(12<<4)}, {15*12, 0}, 4}, // =
{{0|(13<<4)}, {15*13.5, 0}, 1}, // Backspace
{{0|(14<<4)}, {15*15, 0}, 1}, // Ins

{{1|(0<<4)}, {15*0.5, 16}, 1}, // Tab
{{1|(1<<4)}, {15*1.5, 16}, 4}, // Q
{{1|(2<<4)}, {15*2.5, 16}, 4}, // W
{{1|(3<<4)}, {15*3.5, 16}, 4}, // E
{{1|(4<<4)}, {15*4.5, 16}, 4}, // R
{{1|(5<<4)}, {15*5.5, 16}, 4}, // T
{{1|(6<<4)}, {15*6.5, 16}, 4}, // Y
{{1|(7<<4)}, {15*7.5, 16}, 4}, // U
{{1|(8<<4)}, {15*8.5, 16}, 4}, // I
{{1|(9<<4)}, {15*9.5, 16}, 4}, // O
{{1|(10<<4)}, {15*10.5, 16}, 4}, // P
{{1|(11<<4)}, {15*11.5, 16}, 4}, // [
{{1|(12<<4)}, {15*12.5, 16}, 4}, // ]
{{1|(13<<4)}, {15*13.75, 16}, 1}, //
{{1|(14<<4)}, {15*15, 16}, 1}, // Del

{{2|(0<<4)}, {15*0.75, 32}, 1}, // Capslock
{{2|(1<<4)}, {15*1.75, 32}, 4}, // A
{{2|(2<<4)}, {15*2.75, 32}, 4}, // S
{{2|(3<<4)}, {15*3.75, 32}, 4}, // D
{{2|(4<<4)}, {15*4.75, 32}, 4}, // F
{{2|(5<<4)}, {15*5.75, 32}, 4}, // G
{{2|(6<<4)}, {15*6.75, 32}, 4}, // H
{{2|(7<<4)}, {15*7.75, 32}, 4}, // J
{{2|(8<<4)}, {15*8.75, 32}, 4}, // K
{{2|(9<<4)}, {15*9.75, 32}, 4}, // L
{{2|(10<<4)}, {15*10.75, 32}, 4}, // ;
{{2|(11<<4)}, {15*11.75, 32}, 4}, // '
{{2|(13<<4)}, {15*13.25, 32}, 1}, // Enter
{{2|(14<<4)}, {15*15, 32}, 1}, // Pgup

{{3|(0<<4)}, {15*1.25, 48}, 1}, // LShift
{{3|(2<<4)}, {15*2, 48}, 4}, // Z
{{3|(3<<4)}, {15*3, 48}, 4}, // X
{{3|(4<<4)}, {15*4, 48}, 4}, // C
{{3|(5<<4)}, {15*5, 48}, 4}, // V
{{3|(6<<4)}, {15*6, 48}, 4}, // B
{{3|(7<<4)}, {15*7, 48}, 4}, // N
{{3|(8<<4)}, {15*8, 48}, 4}, // M
{{3|(9<<4)}, {15*9, 48}, 4}, // ,
{{3|(10<<4)}, {15*10, 48}, 4}, // .
{{3|(11<<4)}, {15*11, 48}, 4}, // /
{{3|(12<<4)}, {15*12.75, 48}, 1}, // Shift
{{3|(13<<4)}, {15*14, 48}, 1}, // Up
{{3|(14<<4)}, {15*15, 48}, 1}, // Pgdn

{{4|(0<<4)}, {15*0.25, 64}, 1}, // Ctrl
{{4|(1<<4)}, {15*1.5, 64}, 1}, // GUI
{{4|(2<<4)}, {15*2.25, 64}, 1}, // Alt
{{4|(3<<4)}, {15*6.75, 64}, 4}, // Space
{{4|(9<<4)}, {15*9, 64}, 1}, // RAlt
{{4|(10<<4)}, {15*10.25, 64}, 1}, // FN
{{4|(12<<4)}, {15*13, 64}, 1}, // Left
{{4|(13<<4)}, {15*14, 64}, 1}, // Down
{{4|(14<<4)}, {15*15, 64}, 1}, // Right
};
led_config_t g_led_config = { {
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 },
{ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 },
{ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, NO_LED, 42, 43 },
{ 44, NO_LED, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57 },
{ 58, 59, 60, 61, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 62, 63, NO_LED, 64, 65, 66 }
}, {
// Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace, Ins
{ 0, 0 }, { 15, 0 }, { 30, 0 }, { 45, 0 }, { 60, 0 }, { 75, 0 }, { 90, 0 }, { 105, 0 }, { 120, 0 }, { 135, 0 }, { 150, 0 }, { 165, 0 }, { 180, 0 }, { 202, 0 }, { 225, 0 },
// Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], , Del
{ 7, 16 }, { 22, 16 }, { 37, 16 }, { 52, 16 }, { 67, 16 }, { 82, 16 }, { 97, 16 }, { 112, 16 }, { 127, 16 }, { 142, 16 }, { 157, 16 }, { 172, 16 }, { 187, 16 }, { 206, 16 }, { 225, 16 },
// Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter, Pgup
{ 11, 32 }, { 26, 32 }, { 41, 32 }, { 56, 32 }, { 71, 32 }, { 86, 32 }, { 101, 32 }, { 116, 32 }, { 131, 32 }, { 146, 32 }, { 161, 32 }, { 176, 32 }, { 198, 32 }, { 225, 32 },
// LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, Pgdn
{ 18, 48 }, { 30, 48 }, { 45, 48 }, { 60, 48 }, { 75, 48 }, { 90, 48 }, { 105, 48 }, { 120, 48 }, { 135, 48 }, { 150, 48 }, { 165, 48 }, { 191, 48 }, { 210, 48 }, { 225, 48 },
// Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right
{ 3, 64 }, { 22, 64 }, { 33, 64 }, { 101, 64 }, { 135, 64 }, { 153, 64 }, { 195, 64 }, { 210, 64 }, { 225, 64 }
}, {
// Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace, Ins
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
// Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], , Del
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
// Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter, Pgup
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
// LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, Pgdn
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1,
// Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right
1, 1, 1, 4, 1, 1, 1, 1, 1
} };
Loading

0 comments on commit af89752

Please sign in to comment.