Compare commits

..

10 Commits

Author SHA1 Message Date
XScorpion2
bb208f3e3b Implement kb function for rgb matrix to led lookup (#5738) 2019-04-30 07:55:53 -07:00
Jan Christoph Ebersbach
483ad4e3e0 [Keyboard] Signum 3.0 Fix key order in layout (#5687)
* Fix key order in layout

* Reduce keyboard dimensions

* Reduce space around keys
2019-04-29 22:06:23 -07:00
Jan Christoph Ebersbach
4c2453aa1b [Keyboard] Signum3.0 remove sortedcontainers (#5679)
* Remove dependency on sortedcontainers

* Sort dictionary on output
2019-04-29 21:35:34 -07:00
XScorpion2
c745d9b82e Simple extended space cadet (#5277)
* Simplifying and Extending Space Cadet to work on Ctrl and Alt keys

* PR Review feedback

* Reverting back to keycodes
2019-04-29 20:21:46 -07:00
XScorpion2
7d4ae3e66e Removed forced in lining for lib8tion functions (#5670) 2019-04-29 17:45:42 -07:00
Alec Geatches
75d72c221d Change lib8tion library to be usable in user keymaps (#5598)
* Move lib8tion header-defined constant into implementation file, add to build

* Move b_m16_interleave initializtion to lib8tion.c, change build to include lib8tion.c in QUANTUM_LIB_SRC

* Remove left-over whitespace

* Move lib8tion include by RGB_MATRIX_ENABLE code in makefile

* Revert build changes and change lib8tion b_m16_interleave constant to static
2019-04-29 17:44:36 -07:00
Jeremy Bernhardt
507805cd10 [Keyboard] Fixing drag-and-drop (#5728)
* Fixing drag-and-drop

* Forgot to rtfm and do a full build. Added colemak

* What
2019-04-29 17:29:00 -07:00
David Dai
e77e46f4bf [Keyboard] Adding ortho_4x12 & planck_mit layouts for KBD4X (#5729)
* Adding ortho_4x12 & planck_mit layouts for KBD4X.

* Adding LAYOUT_kc_ortho_4x12 macro to KBD4x.

* Turn off console for KBD4X so firmware size falls within limit.
2019-04-29 17:27:49 -07:00
noroadsleft
1f0a2d5550 [Keyboard] Minor fixes for Baguette (#5737)
* Fix Baguette ISO layout in QMK Configurator

Corrected the position of the ISO Enter key.

* Fix readme markdown

Was missing a line break.
2019-04-29 17:23:01 -07:00
XScorpion2
a7113c8ed0 Updated rgb_led struct field modifier to flags (#5619)
Updated effects to test led flags
Updated massdrop to use new flags field for led toggle
2019-04-29 15:18:50 -07:00
85 changed files with 1749 additions and 1293 deletions

View File

@@ -351,3 +351,9 @@ ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes)
QUANTUM_LIB_SRC += i2c_master.c
SRC += oled_driver.c
endif
SPACE_CADET_ENABLE ?= yes
ifeq ($(strip $(SPACE_CADET_ENABLE)), yes)
SRC += $(QUANTUM_DIR)/process_keycode/process_space_cadet.c
OPT_DEFS += -DSPACE_CADET_ENABLE
endif

View File

@@ -68,8 +68,7 @@
* [PS/2 Mouse](feature_ps2_mouse.md)
* [RGB Lighting](feature_rgblight.md)
* [RGB Matrix](feature_rgb_matrix.md)
* [Space Cadet Shift](feature_space_cadet_shift.md)
* [Space Cadet Shift Enter](feature_space_cadet_shift_enter.md)
* [Space Cadet](feature_space_cadet.md)
* [Stenography](feature_stenography.md)
* [Swap Hands](feature_swap_hands.md)
* [Tap Dance](feature_tap_dance.md)

View File

@@ -127,13 +127,13 @@ 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:
```C
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
/* {row | col << 4}
* | {x=0..224, y=0..64}
* | | modifier
* | | flags
* | | | */
{{0|(0<<4)}, {20.36*0, 21.33*0}, 1},
{{0|(1<<4)}, {20.36*1, 21.33*0}, 1},
{{0|(1<<4)}, {20.36*1, 21.33*0}, 4},
....
}
```
@@ -147,7 +147,19 @@ 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.
`modifier` is a boolean, whether or not a certain key is considered a modifier (used in some effects).
`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.
## 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_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. |
## Keycodes

View File

@@ -0,0 +1,59 @@
# Space Cadet: The Future, Built In
Steve Losh described the [Space Cadet Shift](http://stevelosh.com/blog/2012/10/a-modern-space-cadet/) quite well. Essentially, when you tap Left Shift on its own, you get an opening parenthesis; tap Right Shift on its own and you get the closing one. When held, the Shift keys function as normal. Yes, it's as cool as it sounds, and now even cooler supporting Control and Alt as well!
## Usage
Firstly, in your keymap, do one of the following:
- Replace the Left Shift key with `KC_LSPO` (Left Shift, Parenthesis Open), and Right Shift with `KC_RSPC` (Right Shift, Parenthesis Close).
- Replace the Left Control key with `KC_LCPO` (Left Control, Parenthesis Open), and Right Control with `KC_RCPC` (Right Control, Parenthesis Close).
- Replace the Left Alt key with `KC_LAPO` (Left Alt, Parenthesis Open), and Right Alt with `KC_RAPC` (Right Alt, Parenthesis Close).
- Replace any Shift key in your keymap with `KC_SFTENT` (Right Shift, Enter).
## Keycodes
|Keycode |Description |
|-----------|-------------------------------------------|
|`KC_LSPO` |Left Shift when held, `(` when tapped |
|`KC_RSPC` |Right Shift when held, `)` when tapped |
|`KC_LCPO` |Left Control when held, `(` when tapped |
|`KC_RCPC` |Right Control when held, `)` when tapped |
|`KC_LAPO` |Left Alt when held, `(` when tapped |
|`KC_RAPC` |Right Alt when held, `)` when tapped |
|`KC_SFTENT`|Right Shift when held, `Enter` when tapped |
## Caveats
Space Cadet's functionality can conflict with the default Command functionality when both Shift keys are held at the same time. See the [Command feature](feature_command.md) for info on how to change it, or make sure that Command is disabled in your `rules.mk` with:
```make
COMMAND_ENABLE = no
```
## Configuration
By default Space Cadet assumes a US ANSI layout, but if your layout uses different keys for parentheses, you can redefine them in your `config.h`. In addition, you can redefine the modifier to send on tap, or even send no modifier at all. The new configuration defines bundle all options up into a single define of 3 key codes in this order: the `Modifier` when held or when used with other keys, the `Tap Modifer` sent when tapped (no modifier if `KC_TRNS`), finally the `Keycode` sent when tapped. Now keep in mind, mods from other keys will still apply to the `Keycode` if say `KC_RSFT` is held while tapping `KC_LSPO` key with `KC_TRNS` as the `Tap Modifer`.
|Define |Default |Description |
|----------------|-------------------------------|---------------------------------------------------------------------------------|
|`LSPO_KEYS` |`KC_LSFT, LSPO_MOD, LSPO_KEY` |Send `KC_LSFT` when held, the mod and key defined by `LSPO_MOD` and `LSPO_KEY`. |
|`RSPC_KEYS` |`KC_RSFT, RSPC_MOD, RSPC_KEY` |Send `KC_RSFT` when held, the mod and key defined by `RSPC_MOD` and `RSPC_KEY`. |
|`LCPO_KEYS` |`KC_LCTL, KC_LCTL, KC_9` |Send `KC_LCTL` when held, the mod `KC_LCTL` with the key `KC_9` when tapped. |
|`RCPO_KEYS` |`KC_RCTL, KC_RCTL, KC_0` |Send `KC_RCTL` when held, the mod `KC_RCTL` with the key `KC_0` when tapped. |
|`LAPO_KEYS` |`KC_LALT, KC_LALT, KC_9` |Send `KC_LALT` when held, the mod `KC_LALT` with the key `KC_9` when tapped. |
|`RAPO_KEYS` |`KC_RALT, KC_RALT, KC_0` |Send `KC_RALT` when held, the mod `KC_RALT` with the key `KC_0` when tapped. |
|`SFTENT_KEYS` |`KC_RSFT, KC_TRNS, SFTENT_KEY` |Send `KC_RSFT` when held, no mod with the key `SFTENT_KEY` when tapped. |
## Obsolete Configuration
These defines are used in the above defines internally to support backwards compatibility, so you may continue to use them, however the above defines open up a larger range of flexibility than before. As an example, say you want to not send any modifier when you tap just `KC_LSPO`, with the old defines you had an all or nothing choice of using the `DISABLE_SPACE_CADET_MODIFIER` define. Now you can define that key as: `#define KC_LSPO_KEYS KC_LSFT, KC_TRNS, KC_9`. This tells the system to set Left Shift if held or used with other keys, then on tap send no modifier (transparent) with the `KC_9`
|Define |Default |Description |
|------------------------------|-------------|------------------------------------------------------------------|
|`LSPO_KEY` |`KC_9` |The keycode to send when Left Shift is tapped |
|`RSPC_KEY` |`KC_0` |The keycode to send when Right Shift is tapped |
|`LSPO_MOD` |`KC_LSFT` |The modifier to apply to `LSPO_KEY` |
|`RSPC_MOD` |`KC_RSFT` |The modifier to apply to `RSPC_KEY` |
|`SFTENT_KEY` |`KC_ENT` |The keycode to send when the Shift key is tapped |
|`DISABLE_SPACE_CADET_MODIFIER`|*Not defined*|If defined, prevent the Space Cadet from applying a modifier |

View File

@@ -1,37 +0,0 @@
# Space Cadet Shift: The Future, Built In
Steve Losh described the [Space Cadet Shift](http://stevelosh.com/blog/2012/10/a-modern-space-cadet/) quite well. Essentially, when you tap Left Shift on its own, you get an opening parenthesis; tap Right Shift on its own and you get the closing one. When held, the Shift keys function as normal. Yes, it's as cool as it sounds.
## Usage
Replace the Left Shift key in your keymap with `KC_LSPO` (Left Shift, Parenthesis Open), and Right Shift with `KC_RSPC` (Right Shift, Parenthesis Close).
## Keycodes
|Keycode |Description |
|---------|--------------------------------------|
|`KC_LSPO`|Left Shift when held, `(` when tapped |
|`KC_RSPC`|Right Shift when held, `)` when tapped|
## Caveats
Space Cadet's functionality can conflict with the default Command functionality when both Shift keys are held at the same time. Make sure that Command is disabled in your `rules.mk` with:
```make
COMMAND_ENABLE = no
```
## Configuration
By default Space Cadet assumes a US ANSI layout, but if your layout uses different keys for parentheses, you can redefine them in your `config.h`.
You can also disable the rollover, allowing you to use the opposite Shift key to cancel the Space Cadet state in the event of an erroneous press, instead of emitting a pair of parentheses when the keys are released.
Also, by default, the Space Cadet applies modifiers LSPO_MOD and RSPC_MOD to keys defined by LSPO_KEY and RSPC_KEY. You can override this behavior by redefining those variables in your `config.h`. You can also prevent the Space Cadet to apply a modifier by defining DISABLE_SPACE_CADET_MODIFIER in your `config.h`.
|Define |Default |Description |
|------------------------------|-------------|--------------------------------------------------------------------------------|
|`LSPO_KEY` |`KC_9` |The keycode to send when Left Shift is tapped |
|`RSPC_KEY` |`KC_0` |The keycode to send when Right Shift is tapped |
|`LSPO_MOD` |`KC_LSFT` |The keycode to send when Left Shift is tapped |
|`RSPC_MOD` |`KC_RSFT` |The keycode to send when Right Shift is tapped |
|`DISABLE_SPACE_CADET_ROLLOVER`|*Not defined*|If defined, use the opposite Shift key to cancel Space Cadet |
|`DISABLE_SPACE_CADET_MODIFIER`|*Not defined*|If defined, prevent the Space Cadet to apply a modifier to LSPO_KEY and RSPC_KEY|

View File

@@ -1,31 +0,0 @@
# Space Cadet Shift Enter
Based on the [Space Cadet Shift](feature_space_cadet_shift.md) feature. Tap the Shift key on its own, and it behaves like Enter. When held, the Shift functions as normal.
## Usage
Replace any Shift key in your keymap with `KC_SFTENT` (Shift, Enter), and you're done.
## Keycodes
|Keycode |Description |
|-----------|----------------------------------------|
|`KC_SFTENT`|Right Shift when held, Enter when tapped|
## Caveats
As with Space Cadet Shift, this feature may conflict with Command, so it should be disabled in your `rules.mk` with:
```make
COMMAND_ENABLE = no
```
This feature also uses the same timers as Space Cadet Shift, so using them in tandem may produce strange results.
## Configuration
By default Space Cadet assumes a US ANSI layout, but if you'd like to use a different key for Enter, you can redefine it in your `config.h`:
|Define |Default |Description |
|------------|--------|------------------------------------------------|
|`SFTENT_KEY`|`KC_ENT`|The keycode to send when the Shift key is tapped|

View File

@@ -123,7 +123,7 @@
{"label":";", "x":10.75, "y":2},
{"label":"'", "x":11.75, "y":2},
{"label":"ISO #", "x":12.75, "y":2},
{"label":"Enter", "x":13.75, "y":2, "w":1.25, "h":2},
{"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2},
{"label":"Shift", "x":0, "y":3, "w":1.25},
{"label":"ISO \\", "x":1.25, "y":3},
{"label":"Z", "x":2.25, "y":3},

View File

@@ -6,7 +6,7 @@ Baguette
This is a custom keyboard with backlight inspired by France.
Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [github](https://github.com/yiancar)
Hardware Supported: ATMEGA 32u4 MCU with backlight support.
Hardware Supported: ATMEGA 32u4 MCU with backlight support.
Hardware Availability: Closed group-buy please contact the runners (Tesletron and Enjoy)
Make example for this keyboard (after setting up your build environment):

View File

@@ -21,17 +21,17 @@
#ifdef RGB_MATRIX_ENABLE
#include "rgblight.h"
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
/*{row | col << 4}
| {x=0..224, y=0..64}
| | modifier
| | | */
{{1|(3<<4)}, {188, 16}, 0},
{{3|(3<<4)}, {187, 48}, 0},
{{4|(2<<4)}, {149, 64}, 0},
{{4|(1<<4)}, {112, 64}, 0},
{{3|(0<<4)}, {37, 48}, 0},
{{1|(0<<4)}, {38, 16}, 0}
{{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}
};
#endif

View File

@@ -56,70 +56,70 @@ void led_set_kb(uint8_t usb_led) {
* | | | modifier
* | | | */
#define RGB_MATRIX_LEFT_LEDS \
{ { 0xFF }, { 85, 16 }, 0 }, /* 1 */ \
{ { 0xFF }, { 50, 13 }, 0 }, /* 2 */ \
{ { 0xFF }, { 16, 20 }, 0 }, /* 3 */ \
{ { 0xFF }, { 16, 38 }, 0 }, /* 4 */ \
{ { 0xFF }, { 50, 48 }, 0 }, /* 5 */ \
{ { 0xFF }, { 85, 52 }, 0 }, /* 6 */ \
{ { 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 }, 0 }, /* 8 */ \
{ { 1 | ( 5 << 4 ) }, { 85, 21 }, 0 }, /* 9 */ \
{ { 0 | ( 5 << 4 ) }, { 85, 4 }, 0 }, /* 10 */ \
{ { 0 | ( 4 << 4 ) }, { 68, 02 }, 0 }, /* 11 */ \
{ { 1 | ( 4 << 4 ) }, { 68, 19 }, 0 }, /* 12 */ \
{ { 2 | ( 4 << 4 ) }, { 68, 37 }, 0 }, /* 13 */ \
{ { 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 }, 0 }, /* 16 */ \
{ { 1 | ( 3 << 4 ) }, { 50, 13 }, 0 }, /* 17 */ \
{ { 0 | ( 3 << 4 ) }, { 50, 0 }, 0 }, /* 18 */ \
{ { 0 | ( 2 << 4 ) }, { 33, 3 }, 0 }, /* 19 */ \
{ { 1 | ( 2 << 4 ) }, { 33, 20 }, 0 }, /* 20 */ \
{ { 2 | ( 2 << 4 ) }, { 33, 37 }, 0 }, /* 21 */ \
{ { 2 | ( 1 << 4 ) }, { 16, 42 }, 0 }, /* 22 */ \
{ { 1 | ( 1 << 4 ) }, { 16, 24 }, 0 }, /* 23 */ \
{ { 0 | ( 1 << 4 ) }, { 16, 7 }, 0 }, /* 24 */ \
{ { 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 }, 0 }, /* 1 */ \
{ { 0xFF }, { 174, 13 }, 0 }, /* 2 */ \
{ { 0xFF }, { 208, 20 }, 0 }, /* 3 */ \
{ { 0xFF }, { 208, 38 }, 0 }, /* 4 */ \
{ { 0xFF }, { 174, 48 }, 0 }, /* 5 */ \
{ { 0xFF }, { 139, 52 }, 0 }, /* 6 */ \
{ { 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 }, 0 }, /* 8 */ \
{ { 5 | ( 5 << 4 ) }, { 139, 21 }, 0 }, /* 9 */ \
{ { 4 | ( 5 << 4 ) }, { 139, 4 }, 0 }, /* 10 */ \
{ { 4 | ( 4 << 4 ) }, { 156, 02 }, 0 }, /* 11 */ \
{ { 5 | ( 4 << 4 ) }, { 156, 19 }, 0 }, /* 12 */ \
{ { 6 | ( 4 << 4 ) }, { 156, 37 }, 0 }, /* 13 */ \
{ { 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 }, 0 }, /* 16 */ \
{ { 5 | ( 3 << 4 ) }, { 174, 13 }, 0 }, /* 17 */ \
{ { 4 | ( 3 << 4 ) }, { 174, 0 }, 0 }, /* 18 */ \
{ { 4 | ( 2 << 4 ) }, { 191, 3 }, 0 }, /* 19 */ \
{ { 5 | ( 2 << 4 ) }, { 191, 20 }, 0 }, /* 20 */ \
{ { 6 | ( 2 << 4 ) }, { 191, 37 }, 0 }, /* 21 */ \
{ { 6 | ( 1 << 4 ) }, { 208, 42 }, 0 }, /* 22 */ \
{ { 5 | ( 1 << 4 ) }, { 208, 24 }, 0 }, /* 23 */ \
{ { 4 | ( 1 << 4 ) }, { 208, 7 }, 0 }, /* 24 */ \
{ { 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
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
RGB_MATRIX_RIGHT_LEDS
RGB_MATRIX_LEFT_LEDS
};
#else
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
RGB_MATRIX_LEFT_LEDS
RGB_MATRIX_RIGHT_LEDS
};

View File

@@ -52,73 +52,73 @@ void led_set_kb(uint8_t usb_led) {
led_set_user(usb_led);
}
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{0|(0<<4)}, {15*0, 0}, 0}, // Esc
{{0|(1<<4)}, {15*1, 0}, 0}, // 1
{{0|(2<<4)}, {15*2, 0}, 0}, // 2
{{0|(3<<4)}, {15*3, 0}, 0}, // 3
{{0|(4<<4)}, {15*4, 0}, 0}, // 4
{{0|(5<<4)}, {15*5, 0}, 0}, // 5
{{0|(6<<4)}, {15*6, 0}, 0}, // 6
{{0|(7<<4)}, {15*7, 0}, 0}, // 7
{{0|(8<<4)}, {15*8, 0}, 0}, // 8
{{0|(9<<4)}, {15*9, 0}, 0}, // 9
{{0|(10<<4)}, {15*10, 0}, 0}, // 0
{{0|(11<<4)}, {15*11, 0}, 0}, // -
{{0|(12<<4)}, {15*12, 0}, 0}, // =
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}, 0}, // Q
{{1|(2<<4)}, {15*2.5, 16}, 0}, // W
{{1|(3<<4)}, {15*3.5, 16}, 0}, // E
{{1|(4<<4)}, {15*4.5, 16}, 0}, // R
{{1|(5<<4)}, {15*5.5, 16}, 0}, // T
{{1|(6<<4)}, {15*6.5, 16}, 0}, // Y
{{1|(7<<4)}, {15*7.5, 16}, 0}, // U
{{1|(8<<4)}, {15*8.5, 16}, 0}, // I
{{1|(9<<4)}, {15*9.5, 16}, 0}, // O
{{1|(10<<4)}, {15*10.5, 16}, 0}, // P
{{1|(11<<4)}, {15*11.5, 16}, 0}, // [
{{1|(12<<4)}, {15*12.5, 16}, 0}, // ]
{{1|(13<<4)}, {15*13.75, 16}, 1}, //
{{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}, 0}, // A
{{2|(2<<4)}, {15*2.75, 32}, 0}, // S
{{2|(3<<4)}, {15*3.75, 32}, 0}, // D
{{2|(4<<4)}, {15*4.75, 32}, 0}, // F
{{2|(5<<4)}, {15*5.75, 32}, 0}, // G
{{2|(6<<4)}, {15*6.75, 32}, 0}, // H
{{2|(7<<4)}, {15*7.75, 32}, 0}, // J
{{2|(8<<4)}, {15*8.75, 32}, 0}, // K
{{2|(9<<4)}, {15*9.75, 32}, 0}, // L
{{2|(10<<4)}, {15*10.75, 32}, 0}, // ;
{{2|(11<<4)}, {15*11.75, 32}, 0}, // '
{{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}, 0}, // Z
{{3|(3<<4)}, {15*3, 48}, 0}, // X
{{3|(4<<4)}, {15*4, 48}, 0}, // C
{{3|(5<<4)}, {15*5, 48}, 0}, // V
{{3|(6<<4)}, {15*6, 48}, 0}, // B
{{3|(7<<4)}, {15*7, 48}, 0}, // N
{{3|(8<<4)}, {15*8, 48}, 0}, // M
{{3|(9<<4)}, {15*9, 48}, 0}, // ,
{{3|(10<<4)}, {15*10, 48}, 0}, // .
{{3|(11<<4)}, {15*11, 48}, 0}, // /
{{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}, 0}, // Space
{{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

View File

@@ -71,7 +71,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
};
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{0|(11<<4)}, {20.36*11, 0}, 1},
{{0|(10<<4)}, {20.36*10, 0}, 1},
@@ -90,32 +90,32 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{0|(13<<4)}, {20.36*0,21.33*0.5}, 1},
{{1|(11<<4)}, {20.36*11, 21.33}, 1},
{{1|(10<<4)}, {20.36*10, 21.33}, 0},
{{1|(9<<4)}, {20.36*9, 21.33}, 0},
{{1|(8<<4)}, {20.36*8, 21.33}, 0},
{{1|(7<<4)}, {20.36*7, 21.33}, 0},
{{1|(6<<4)}, { 20.36*6, 21.33}, 0},
{{1|(5<<4)}, { 20.36*5, 21.33}, 0},
{{1|(4<<4)}, { 20.36*4, 21.33}, 0},
{{1|(3<<4)}, { 20.36*3, 21.33}, 0},
{{1|(2<<4)}, { 20.36*2, 21.33}, 0},
{{1|(1<<4)}, { 20.36*1, 21.33}, 0},
{{1|(10<<4)}, {20.36*10, 21.33}, 4},
{{1|(9<<4)}, {20.36*9, 21.33}, 4},
{{1|(8<<4)}, {20.36*8, 21.33}, 4},
{{1|(7<<4)}, {20.36*7, 21.33}, 4},
{{1|(6<<4)}, { 20.36*6, 21.33}, 4},
{{1|(5<<4)}, { 20.36*5, 21.33}, 4},
{{1|(4<<4)}, { 20.36*4, 21.33}, 4},
{{1|(3<<4)}, { 20.36*3, 21.33}, 4},
{{1|(2<<4)}, { 20.36*2, 21.33}, 4},
{{1|(1<<4)}, { 20.36*1, 21.33}, 4},
{{1|(0<<4)}, { 20.36*0, 21.33}, 1},
{{1|(12<<4)}, {20.36*11, 21.33*1.5}, 1},
{{1|(13<<4)}, {20.36*0,21.33*1.5}, 1},
{{2|(11<<4)}, {20.36*11, 21.33*2}, 1},
{{2|(10<<4)}, {20.36*10, 21.33*2}, 0},
{{2|(9<<4)}, {20.36*9, 21.33*2}, 0},
{{2|(8<<4)}, {20.36*8, 21.33*2}, 0},
{{2|(7<<4)}, {20.36*7, 21.33*2}, 0},
{{2|(6<<4)}, { 20.36*6, 21.33*2}, 0},
{{2|(5<<4)}, { 20.36*5, 21.33*2}, 0},
{{2|(4<<4)}, { 20.36*4, 21.33*2}, 0},
{{2|(3<<4)}, { 20.36*3, 21.33*2}, 0},
{{2|(2<<4)}, { 20.36*2, 21.33*2}, 0},
{{2|(1<<4)}, { 20.36*1, 21.33*2}, 0},
{{2|(10<<4)}, {20.36*10, 21.33*2}, 4},
{{2|(9<<4)}, {20.36*9, 21.33*2}, 4},
{{2|(8<<4)}, {20.36*8, 21.33*2}, 4},
{{2|(7<<4)}, {20.36*7, 21.33*2}, 4},
{{2|(6<<4)}, { 20.36*6, 21.33*2}, 4},
{{2|(5<<4)}, { 20.36*5, 21.33*2}, 4},
{{2|(4<<4)}, { 20.36*4, 21.33*2}, 4},
{{2|(3<<4)}, { 20.36*3, 21.33*2}, 4},
{{2|(2<<4)}, { 20.36*2, 21.33*2}, 4},
{{2|(1<<4)}, { 20.36*1, 21.33*2}, 4},
{{2|(0<<4)}, { 20.36*0, 21.33*2}, 1},
{{2|(12<<4)}, {20.36*11, 21.33*2.5}, 1},
@@ -205,7 +205,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
};
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{0|(11<<4)}, {20.36*11, 0}, 1},
{{0|(10<<4)}, {20.36*10, 0}, 1},
@@ -224,32 +224,32 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{0|(13<<4)}, {20.36*0,21.33*0.5}, 1},
{{1|(11<<4)}, {20.36*11, 21.33}, 1},
{{1|(10<<4)}, {20.36*10, 21.33}, 0},
{{1|(9<<4)}, {20.36*9, 21.33}, 0},
{{1|(8<<4)}, {20.36*8, 21.33}, 0},
{{1|(7<<4)}, {20.36*7, 21.33}, 0},
{{1|(6<<4)}, { 20.36*6, 21.33}, 0},
{{1|(5<<4)}, { 20.36*5, 21.33}, 0},
{{1|(4<<4)}, { 20.36*4, 21.33}, 0},
{{1|(3<<4)}, { 20.36*3, 21.33}, 0},
{{1|(2<<4)}, { 20.36*2, 21.33}, 0},
{{1|(1<<4)}, { 20.36*1, 21.33}, 0},
{{1|(10<<4)}, {20.36*10, 21.33}, 4},
{{1|(9<<4)}, {20.36*9, 21.33}, 4},
{{1|(8<<4)}, {20.36*8, 21.33}, 4},
{{1|(7<<4)}, {20.36*7, 21.33}, 4},
{{1|(6<<4)}, { 20.36*6, 21.33}, 4},
{{1|(5<<4)}, { 20.36*5, 21.33}, 4},
{{1|(4<<4)}, { 20.36*4, 21.33}, 4},
{{1|(3<<4)}, { 20.36*3, 21.33}, 4},
{{1|(2<<4)}, { 20.36*2, 21.33}, 4},
{{1|(1<<4)}, { 20.36*1, 21.33}, 4},
{{1|(0<<4)}, { 20.36*0, 21.33}, 1},
{{1|(12<<4)}, {20.36*11, 21.33*1.5}, 1},
{{1|(13<<4)}, {20.36*0,21.33*1.5}, 1},
{{2|(11<<4)}, {20.36*11, 21.33*2}, 1},
{{2|(10<<4)}, {20.36*10, 21.33*2}, 0},
{{2|(9<<4)}, {20.36*9, 21.33*2}, 0},
{{2|(8<<4)}, {20.36*8, 21.33*2}, 0},
{{2|(7<<4)}, {20.36*7, 21.33*2}, 0},
{{2|(6<<4)}, { 20.36*6, 21.33*2}, 0},
{{2|(5<<4)}, { 20.36*5, 21.33*2}, 0},
{{2|(4<<4)}, { 20.36*4, 21.33*2}, 0},
{{2|(3<<4)}, { 20.36*3, 21.33*2}, 0},
{{2|(2<<4)}, { 20.36*2, 21.33*2}, 0},
{{2|(1<<4)}, { 20.36*1, 21.33*2}, 0},
{{2|(10<<4)}, {20.36*10, 21.33*2}, 4},
{{2|(9<<4)}, {20.36*9, 21.33*2}, 4},
{{2|(8<<4)}, {20.36*8, 21.33*2}, 4},
{{2|(7<<4)}, {20.36*7, 21.33*2}, 4},
{{2|(6<<4)}, { 20.36*6, 21.33*2}, 4},
{{2|(5<<4)}, { 20.36*5, 21.33*2}, 4},
{{2|(4<<4)}, { 20.36*4, 21.33*2}, 4},
{{2|(3<<4)}, { 20.36*3, 21.33*2}, 4},
{{2|(2<<4)}, { 20.36*2, 21.33*2}, 4},
{{2|(1<<4)}, { 20.36*1, 21.33*2}, 4},
{{2|(0<<4)}, { 20.36*0, 21.33*2}, 1},
{{2|(12<<4)}, {20.36*11, 21.33*2.5}, 1},

View File

@@ -35,10 +35,8 @@ void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool def
rgb_led led;
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
led = g_rgb_leds[i];
if (led.matrix_co.raw < 0xFF) {
if (led.modifier) {
rgb_matrix_set_color( i, red, green, blue );
}
if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
rgb_matrix_set_color( i, red, green, blue );
}
}
}

View File

@@ -58,10 +58,8 @@ void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool def
rgb_led led;
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
led = g_rgb_leds[i];
if (led.matrix_co.raw < 0xFF) {
if (led.modifier) {
rgb_matrix_set_color( i, red, green, blue );
}
if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
rgb_matrix_set_color( i, red, green, blue );
}
}
}

View File

@@ -64,7 +64,8 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{0, H_16, G_16, I_16},
{0, K_16, J_16, L_16},
};
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{0|(13<<4)}, {16*13.5, 0}, 1},
{{0|(12<<4)}, {16*12, 0}, 1},
{{0|(11<<4)}, {16*11, 0}, 1},
@@ -80,49 +81,49 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{0|(1<<4)}, {16*1, 0}, 1},
{{0|(0<<4)}, {16*0, 0}, 1},
{{2|(13<<4)}, {16*13.75, 24}, 1},
{{1|(12<<4)}, {16*12.5, 16}, 0},
{{1|(11<<4)}, {16*11.5, 16}, 0},
{{1|(10<<4)}, {16*10.5, 16}, 0},
{{1|(9<<4)}, { 16*9.5, 16}, 0},
{{1|(8<<4)}, { 16*8.5, 16}, 0},
{{1|(7<<4)}, { 16*7.5, 16}, 0},
{{1|(6<<4)}, { 16*6.5, 16}, 0},
{{1|(5<<4)}, { 16*5.5, 16}, 0},
{{1|(4<<4)}, { 16*4.5, 16}, 0},
{{1|(3<<4)}, { 16*3.5, 16}, 0},
{{1|(2<<4)}, { 16*2.5, 16}, 0},
{{1|(1<<4)}, { 16*1.5, 16}, 0},
{{1|(12<<4)}, {16*12.5, 16}, 4},
{{1|(11<<4)}, {16*11.5, 16}, 4},
{{1|(10<<4)}, {16*10.5, 16}, 4},
{{1|(9<<4)}, { 16*9.5, 16}, 4},
{{1|(8<<4)}, { 16*8.5, 16}, 4},
{{1|(7<<4)}, { 16*7.5, 16}, 4},
{{1|(6<<4)}, { 16*6.5, 16}, 4},
{{1|(5<<4)}, { 16*5.5, 16}, 4},
{{1|(4<<4)}, { 16*4.5, 16}, 4},
{{1|(3<<4)}, { 16*3.5, 16}, 4},
{{1|(2<<4)}, { 16*2.5, 16}, 4},
{{1|(1<<4)}, { 16*1.5, 16}, 4},
{{1|(0<<4)}, { 16*0.25, 16}, 1},
{{1|(13<<4)}, {16*12.75, 32}, 1},
{{2|(11<<4)}, {16*11.75, 32}, 0},
{{2|(10<<4)}, {16*10.75, 32}, 0},
{{2|(9<<4)}, {16*9.75, 32}, 0},
{{2|(8<<4)}, {16*8.75, 32}, 0},
{{2|(7<<4)}, {16*7.75, 32}, 0},
{{2|(6<<4)}, { 16*6.75, 32}, 0},
{{2|(5<<4)}, { 16*5.75, 32}, 0},
{{2|(4<<4)}, { 16*4.75, 32}, 0},
{{2|(3<<4)}, { 16*3.75, 32}, 0},
{{2|(2<<4)}, { 16*2.75, 32}, 0},
{{2|(1<<4)}, { 16*1.75, 32}, 0},
{{2|(11<<4)}, {16*11.75, 32}, 4},
{{2|(10<<4)}, {16*10.75, 32}, 4},
{{2|(9<<4)}, {16*9.75, 32}, 4},
{{2|(8<<4)}, {16*8.75, 32}, 4},
{{2|(7<<4)}, {16*7.75, 32}, 4},
{{2|(6<<4)}, { 16*6.75, 32}, 4},
{{2|(5<<4)}, { 16*5.75, 32}, 4},
{{2|(4<<4)}, { 16*4.75, 32}, 4},
{{2|(3<<4)}, { 16*3.75, 32}, 4},
{{2|(2<<4)}, { 16*2.75, 32}, 4},
{{2|(1<<4)}, { 16*1.75, 32}, 4},
{{2|(0<<4)}, { 16*0.375, 32}, 1},
{{3|(11<<4)}, {16*13.125, 48}, 1},
{{3|(10<<4)}, {16*11.25, 48}, 0},
{{3|(9<<4)}, {16*10.25, 48}, 0},
{{3|(8<<4)}, {16*9.25, 48}, 0},
{{3|(7<<4)}, {16*8.25, 48}, 0},
{{3|(6<<4)}, {16*7.25, 48}, 0},
{{3|(5<<4)}, {16*6.25, 48}, 0},
{{3|(4<<4)}, {16*5.25, 48}, 0},
{{3|(3<<4)}, {16*4.25, 48}, 0},
{{3|(2<<4)}, {16*3.25, 48}, 0},
{{3|(1<<4)}, {16*1.25, 48}, 0},
{{3|(10<<4)}, {16*11.25, 48}, 4},
{{3|(9<<4)}, {16*10.25, 48}, 4},
{{3|(8<<4)}, {16*9.25, 48}, 4},
{{3|(7<<4)}, {16*8.25, 48}, 4},
{{3|(6<<4)}, {16*7.25, 48}, 4},
{{3|(5<<4)}, {16*6.25, 48}, 4},
{{3|(4<<4)}, {16*5.25, 48}, 4},
{{3|(3<<4)}, {16*4.25, 48}, 4},
{{3|(2<<4)}, {16*3.25, 48}, 4},
{{3|(1<<4)}, {16*1.25, 48}, 4},
{{3|(0<<4)}, {16*0.625, 48}, 1},
{{4|(13<<4)}, {16*13.875, 64}, 1},
{{4|(11<<4)}, {16*12.625, 64}, 1},
{{4|(10<<4)}, {16*11.375, 64}, 1},
{{4|(9<<4)}, {16*10.125, 64}, 1},
{{4|(5<<4)}, { 16*6.375, 64}, 0},
{{4|(5<<4)}, { 16*6.375, 64}, 4},
{{4|(2<<4)}, { 16*2.625, 64}, 1},
{{4|(1<<4)}, { 16*1.375, 64}, 1},
{{4|(0<<4)}, { 16*0.125, 64}, 1},
@@ -192,7 +193,8 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{0, H_16, G_16, I_16},
{0, K_16, J_16, L_16},
};
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{2|(12<<4)}, {16*14, 0}, 1},
{{0|(13<<4)}, {16*13, 0}, 1},
{{0|(12<<4)}, {16*12, 0}, 1},
@@ -209,49 +211,49 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{0|(1<<4)}, {16*1, 0}, 1},
{{0|(0<<4)}, {16*0, 0}, 1},
{{1|(13<<4)}, {16*13.75, 16}, 1},
{{1|(12<<4)}, {16*12.5, 16}, 0},
{{1|(11<<4)}, {16*11.5, 16}, 0},
{{1|(10<<4)}, {16*10.5, 16}, 0},
{{1|(9<<4)}, { 16*9.5, 16}, 0},
{{1|(8<<4)}, { 16*8.5, 16}, 0},
{{1|(7<<4)}, { 16*7.5, 16}, 0},
{{1|(6<<4)}, { 16*6.5, 16}, 0},
{{1|(5<<4)}, { 16*5.5, 16}, 0},
{{1|(4<<4)}, { 16*4.5, 16}, 0},
{{1|(3<<4)}, { 16*3.5, 16}, 0},
{{1|(2<<4)}, { 16*2.5, 16}, 0},
{{1|(1<<4)}, { 16*1.5, 16}, 0},
{{1|(12<<4)}, {16*12.5, 16}, 4},
{{1|(11<<4)}, {16*11.5, 16}, 4},
{{1|(10<<4)}, {16*10.5, 16}, 4},
{{1|(9<<4)}, { 16*9.5, 16}, 4},
{{1|(8<<4)}, { 16*8.5, 16}, 4},
{{1|(7<<4)}, { 16*7.5, 16}, 4},
{{1|(6<<4)}, { 16*6.5, 16}, 4},
{{1|(5<<4)}, { 16*5.5, 16}, 4},
{{1|(4<<4)}, { 16*4.5, 16}, 4},
{{1|(3<<4)}, { 16*3.5, 16}, 4},
{{1|(2<<4)}, { 16*2.5, 16}, 4},
{{1|(1<<4)}, { 16*1.5, 16}, 4},
{{1|(0<<4)}, { 16*0.25, 16}, 1},
{{2|(13<<4)}, {16*12.75, 32}, 1},
{{2|(11<<4)}, {16*11.75, 32}, 0},
{{2|(10<<4)}, {16*10.75, 32}, 0},
{{2|(9<<4)}, {16*9.75, 32}, 0},
{{2|(8<<4)}, {16*8.75, 32}, 0},
{{2|(7<<4)}, {16*7.75, 32}, 0},
{{2|(6<<4)}, { 16*6.75, 32}, 0},
{{2|(5<<4)}, { 16*5.75, 32}, 0},
{{2|(4<<4)}, { 16*4.75, 32}, 0},
{{2|(3<<4)}, { 16*3.75, 32}, 0},
{{2|(2<<4)}, { 16*2.75, 32}, 0},
{{2|(1<<4)}, { 16*1.75, 32}, 0},
{{2|(11<<4)}, {16*11.75, 32}, 4},
{{2|(10<<4)}, {16*10.75, 32}, 4},
{{2|(9<<4)}, {16*9.75, 32}, 4},
{{2|(8<<4)}, {16*8.75, 32}, 4},
{{2|(7<<4)}, {16*7.75, 32}, 4},
{{2|(6<<4)}, { 16*6.75, 32}, 4},
{{2|(5<<4)}, { 16*5.75, 32}, 4},
{{2|(4<<4)}, { 16*4.75, 32}, 4},
{{2|(3<<4)}, { 16*3.75, 32}, 4},
{{2|(2<<4)}, { 16*2.75, 32}, 4},
{{2|(1<<4)}, { 16*1.75, 32}, 4},
{{2|(0<<4)}, { 16*0.375, 32}, 1},
{{3|(13<<4)}, {16*14, 48}, 1},
{{3|(11<<4)}, {16*12.625, 48}, 0},
{{3|(10<<4)}, {16*11.25, 48}, 0},
{{3|(9<<4)}, {16*10.25, 48}, 0},
{{3|(8<<4)}, {16*9.25, 48}, 0},
{{3|(7<<4)}, {16*8.25, 48}, 0},
{{3|(6<<4)}, {16*7.25, 48}, 0},
{{3|(5<<4)}, {16*6.25, 48}, 0},
{{3|(4<<4)}, {16*5.25, 48}, 0},
{{3|(3<<4)}, {16*4.25, 48}, 0},
{{3|(2<<4)}, {16*3.25, 48}, 0},
{{3|(1<<4)}, {16*1.25, 48}, 0},
{{3|(11<<4)}, {16*12.625, 48}, 4},
{{3|(10<<4)}, {16*11.25, 48}, 4},
{{3|(9<<4)}, {16*10.25, 48}, 4},
{{3|(8<<4)}, {16*9.25, 48}, 4},
{{3|(7<<4)}, {16*8.25, 48}, 4},
{{3|(6<<4)}, {16*7.25, 48}, 4},
{{3|(5<<4)}, {16*6.25, 48}, 4},
{{3|(4<<4)}, {16*5.25, 48}, 4},
{{3|(3<<4)}, {16*4.25, 48}, 4},
{{3|(2<<4)}, {16*3.25, 48}, 4},
{{3|(1<<4)}, {16*1.25, 48}, 4},
{{3|(0<<4)}, {16*0.625, 48}, 1},
{{4|(13<<4)}, {16*13.625, 64}, 1},
{{4|(11<<4)}, {16*12.375, 64}, 1},
{{4|(10<<4)}, {16*11.125, 64}, 1},
{{4|(5<<4)}, { 16*7, 64}, 0},
{{4|(5<<4)}, { 16*7, 64}, 4},
{{4|(2<<4)}, { 16*2.875, 64}, 1},
{{4|(1<<4)}, { 16*1.625, 64}, 1},
{{4|(0<<4)}, { 16*0.375, 64}, 1},
@@ -321,7 +323,8 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{0, H_16, G_16, I_16},
{0, K_16, J_16, L_16},
};
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{2|(12<<4)}, {16*14, 0}, 1},
{{0|(13<<4)}, {16*13, 0}, 1},
{{0|(12<<4)}, {16*12, 0}, 1},
@@ -338,49 +341,49 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{0|(1<<4)}, {16*1, 0}, 1},
{{0|(0<<4)}, {16*0, 0}, 1},
{{2|(13<<4)}, {16*13.75, 24}, 1},
{{1|(12<<4)}, {16*12.5, 16}, 0},
{{1|(11<<4)}, {16*11.5, 16}, 0},
{{1|(10<<4)}, {16*10.5, 16}, 0},
{{1|(9<<4)}, { 16*9.5, 16}, 0},
{{1|(8<<4)}, { 16*8.5, 16}, 0},
{{1|(7<<4)}, { 16*7.5, 16}, 0},
{{1|(6<<4)}, { 16*6.5, 16}, 0},
{{1|(5<<4)}, { 16*5.5, 16}, 0},
{{1|(4<<4)}, { 16*4.5, 16}, 0},
{{1|(3<<4)}, { 16*3.5, 16}, 0},
{{1|(2<<4)}, { 16*2.5, 16}, 0},
{{1|(1<<4)}, { 16*1.5, 16}, 0},
{{1|(12<<4)}, {16*12.5, 16}, 4},
{{1|(11<<4)}, {16*11.5, 16}, 4},
{{1|(10<<4)}, {16*10.5, 16}, 4},
{{1|(9<<4)}, { 16*9.5, 16}, 4},
{{1|(8<<4)}, { 16*8.5, 16}, 4},
{{1|(7<<4)}, { 16*7.5, 16}, 4},
{{1|(6<<4)}, { 16*6.5, 16}, 4},
{{1|(5<<4)}, { 16*5.5, 16}, 4},
{{1|(4<<4)}, { 16*4.5, 16}, 4},
{{1|(3<<4)}, { 16*3.5, 16}, 4},
{{1|(2<<4)}, { 16*2.5, 16}, 4},
{{1|(1<<4)}, { 16*1.5, 16}, 4},
{{1|(0<<4)}, { 16*0.25, 16}, 1},
{{1|(13<<4)}, {16*12.75, 32}, 1},
{{2|(11<<4)}, {16*11.75, 32}, 0},
{{2|(10<<4)}, {16*10.75, 32}, 0},
{{2|(9<<4)}, {16*9.75, 32}, 0},
{{2|(8<<4)}, {16*8.75, 32}, 0},
{{2|(7<<4)}, {16*7.75, 32}, 0},
{{2|(6<<4)}, { 16*6.75, 32}, 0},
{{2|(5<<4)}, { 16*5.75, 32}, 0},
{{2|(4<<4)}, { 16*4.75, 32}, 0},
{{2|(3<<4)}, { 16*3.75, 32}, 0},
{{2|(2<<4)}, { 16*2.75, 32}, 0},
{{2|(1<<4)}, { 16*1.75, 32}, 0},
{{2|(11<<4)}, {16*11.75, 32}, 4},
{{2|(10<<4)}, {16*10.75, 32}, 4},
{{2|(9<<4)}, {16*9.75, 32}, 4},
{{2|(8<<4)}, {16*8.75, 32}, 4},
{{2|(7<<4)}, {16*7.75, 32}, 4},
{{2|(6<<4)}, { 16*6.75, 32}, 4},
{{2|(5<<4)}, { 16*5.75, 32}, 4},
{{2|(4<<4)}, { 16*4.75, 32}, 4},
{{2|(3<<4)}, { 16*3.75, 32}, 4},
{{2|(2<<4)}, { 16*2.75, 32}, 4},
{{2|(1<<4)}, { 16*1.75, 32}, 4},
{{2|(0<<4)}, { 16*0.375, 32}, 1},
{{3|(13<<4)}, {16*14, 48}, 1},
{{3|(11<<4)}, {16*12.625, 48}, 0},
{{3|(10<<4)}, {16*11.25, 48}, 0},
{{3|(9<<4)}, {16*10.25, 48}, 0},
{{3|(8<<4)}, {16*9.25, 48}, 0},
{{3|(7<<4)}, {16*8.25, 48}, 0},
{{3|(6<<4)}, {16*7.25, 48}, 0},
{{3|(5<<4)}, {16*6.25, 48}, 0},
{{3|(4<<4)}, {16*5.25, 48}, 0},
{{3|(3<<4)}, {16*4.25, 48}, 0},
{{3|(2<<4)}, {16*3.25, 48}, 0},
{{3|(1<<4)}, {16*1.25, 48}, 0},
{{3|(11<<4)}, {16*12.625, 48}, 4},
{{3|(10<<4)}, {16*11.25, 48}, 4},
{{3|(9<<4)}, {16*10.25, 48}, 4},
{{3|(8<<4)}, {16*9.25, 48}, 4},
{{3|(7<<4)}, {16*8.25, 48}, 4},
{{3|(6<<4)}, {16*7.25, 48}, 4},
{{3|(5<<4)}, {16*6.25, 48}, 4},
{{3|(4<<4)}, {16*5.25, 48}, 4},
{{3|(3<<4)}, {16*4.25, 48}, 4},
{{3|(2<<4)}, {16*3.25, 48}, 4},
{{3|(1<<4)}, {16*1.25, 48}, 4},
{{3|(0<<4)}, {16*0.625, 48}, 1},
{{4|(13<<4)}, {16*13.625, 64}, 1},
{{4|(11<<4)}, {16*12.375, 64}, 1},
{{4|(10<<4)}, {16*11.125, 64}, 1},
{{4|(5<<4)}, { 16*7, 64}, 0},
{{4|(5<<4)}, { 16*7, 64}, 4},
{{4|(2<<4)}, { 16*2.875, 64}, 1},
{{4|(1<<4)}, { 16*1.625, 64}, 1},
{{4|(0<<4)}, { 16*0.375, 64}, 1},
@@ -449,7 +452,8 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{0, H_16, G_16, I_16},
{0, K_16, J_16, L_16},
};
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{0|(13<<4)}, {16*13.5, 0}, 1},
{{0|(12<<4)}, {16*12, 0}, 1},
{{0|(11<<4)}, {16*11, 0}, 1},
@@ -465,49 +469,49 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{0|(1<<4)}, {16*1, 0}, 1},
{{0|(0<<4)}, {16*0, 0}, 1},
{{1|(13<<4)}, {16*13.75, 16}, 1},
{{1|(12<<4)}, {16*12.5, 16}, 0},
{{1|(11<<4)}, {16*11.5, 16}, 0},
{{1|(10<<4)}, {16*10.5, 16}, 0},
{{1|(9<<4)}, { 16*9.5, 16}, 0},
{{1|(8<<4)}, { 16*8.5, 16}, 0},
{{1|(7<<4)}, { 16*7.5, 16}, 0},
{{1|(6<<4)}, { 16*6.5, 16}, 0},
{{1|(5<<4)}, { 16*5.5, 16}, 0},
{{1|(4<<4)}, { 16*4.5, 16}, 0},
{{1|(3<<4)}, { 16*3.5, 16}, 0},
{{1|(2<<4)}, { 16*2.5, 16}, 0},
{{1|(1<<4)}, { 16*1.5, 16}, 0},
{{1|(12<<4)}, {16*12.5, 16}, 4},
{{1|(11<<4)}, {16*11.5, 16}, 4},
{{1|(10<<4)}, {16*10.5, 16}, 4},
{{1|(9<<4)}, { 16*9.5, 16}, 4},
{{1|(8<<4)}, { 16*8.5, 16}, 4},
{{1|(7<<4)}, { 16*7.5, 16}, 4},
{{1|(6<<4)}, { 16*6.5, 16}, 4},
{{1|(5<<4)}, { 16*5.5, 16}, 4},
{{1|(4<<4)}, { 16*4.5, 16}, 4},
{{1|(3<<4)}, { 16*3.5, 16}, 4},
{{1|(2<<4)}, { 16*2.5, 16}, 4},
{{1|(1<<4)}, { 16*1.5, 16}, 4},
{{1|(0<<4)}, { 16*0.25, 16}, 1},
{{2|(13<<4)}, {16*13.375, 24}, 1},
{{2|(11<<4)}, {16*11.75, 32}, 0},
{{2|(10<<4)}, {16*10.75, 32}, 0},
{{2|(9<<4)}, {16*9.75, 32}, 0},
{{2|(8<<4)}, {16*8.75, 32}, 0},
{{2|(7<<4)}, {16*7.75, 32}, 0},
{{2|(6<<4)}, { 16*6.75, 32}, 0},
{{2|(5<<4)}, { 16*5.75, 32}, 0},
{{2|(4<<4)}, { 16*4.75, 32}, 0},
{{2|(3<<4)}, { 16*3.75, 32}, 0},
{{2|(2<<4)}, { 16*2.75, 32}, 0},
{{2|(1<<4)}, { 16*1.75, 32}, 0},
{{2|(11<<4)}, {16*11.75, 32}, 4},
{{2|(10<<4)}, {16*10.75, 32}, 4},
{{2|(9<<4)}, {16*9.75, 32}, 4},
{{2|(8<<4)}, {16*8.75, 32}, 4},
{{2|(7<<4)}, {16*7.75, 32}, 4},
{{2|(6<<4)}, { 16*6.75, 32}, 4},
{{2|(5<<4)}, { 16*5.75, 32}, 4},
{{2|(4<<4)}, { 16*4.75, 32}, 4},
{{2|(3<<4)}, { 16*3.75, 32}, 4},
{{2|(2<<4)}, { 16*2.75, 32}, 4},
{{2|(1<<4)}, { 16*1.75, 32}, 4},
{{2|(0<<4)}, { 16*0.375, 32}, 1},
{{3|(11<<4)}, {16*13.125, 48}, 1},
{{3|(10<<4)}, {16*11.25, 48}, 0},
{{3|(9<<4)}, {16*10.25, 48}, 0},
{{3|(8<<4)}, {16*9.25, 48}, 0},
{{3|(7<<4)}, {16*8.25, 48}, 0},
{{3|(6<<4)}, {16*7.25, 48}, 0},
{{3|(5<<4)}, {16*6.25, 48}, 0},
{{3|(4<<4)}, {16*5.25, 48}, 0},
{{3|(3<<4)}, {16*4.25, 48}, 0},
{{3|(2<<4)}, {16*3.25, 48}, 0},
{{3|(1<<4)}, {16*1.25, 48}, 0},
{{3|(10<<4)}, {16*11.25, 48}, 4},
{{3|(9<<4)}, {16*10.25, 48}, 4},
{{3|(8<<4)}, {16*9.25, 48}, 4},
{{3|(7<<4)}, {16*8.25, 48}, 4},
{{3|(6<<4)}, {16*7.25, 48}, 4},
{{3|(5<<4)}, {16*6.25, 48}, 4},
{{3|(4<<4)}, {16*5.25, 48}, 4},
{{3|(3<<4)}, {16*4.25, 48}, 4},
{{3|(2<<4)}, {16*3.25, 48}, 4},
{{3|(1<<4)}, {16*1.25, 48}, 4},
{{3|(0<<4)}, {16*0.625, 48}, 1},
{{4|(13<<4)}, {16*13.875, 64}, 1},
{{4|(11<<4)}, {16*12.625, 64}, 1},
{{4|(10<<4)}, {16*11.375, 64}, 1},
{{4|(9<<4)}, {16*10.125, 64}, 1},
{{4|(5<<4)}, { 16*6.375, 64}, 0},
{{4|(5<<4)}, { 16*6.375, 64}, 4},
{{4|(2<<4)}, { 16*2.625, 64}, 1},
{{4|(1<<4)}, { 16*1.375, 64}, 1},
{{4|(0<<4)}, { 16*0.125, 64}, 1},
@@ -578,7 +582,8 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{0, H_16, G_16, I_16},
{0, K_16, J_16, L_16},
};
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{0|(13<<4)}, {17.23*13, 0}, 1},
{{0|(12<<4)}, {17.23*12, 0}, 1},
{{0|(11<<4)}, {17.23*11, 0}, 1},
@@ -594,51 +599,51 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{0|(1<<4)}, { 17.23*1, 0}, 1},
{{0|(0<<4)}, { 17.23*0, 0}, 1},
{{1|(13<<4)}, {17.23*13, 16}, 1},
{{1|(12<<4)}, {17.23*12, 16}, 0},
{{1|(11<<4)}, {17.23*11, 16}, 0},
{{1|(10<<4)}, {17.23*10, 16}, 0},
{{1|(9<<4)}, {17.23*9, 16}, 0},
{{1|(8<<4)}, {17.23*8, 16}, 0},
{{1|(7<<4)}, {17.23*7, 16}, 0},
{{1|(6<<4)}, { 17.23*6, 16}, 0},
{{1|(5<<4)}, { 17.23*5, 16}, 0},
{{1|(4<<4)}, { 17.23*4, 16}, 0},
{{1|(3<<4)}, { 17.23*3, 16}, 0},
{{1|(2<<4)}, { 17.23*2, 16}, 0},
{{1|(1<<4)}, { 17.23*1, 16}, 0},
{{1|(12<<4)}, {17.23*12, 16}, 4},
{{1|(11<<4)}, {17.23*11, 16}, 4},
{{1|(10<<4)}, {17.23*10, 16}, 4},
{{1|(9<<4)}, {17.23*9, 16}, 4},
{{1|(8<<4)}, {17.23*8, 16}, 4},
{{1|(7<<4)}, {17.23*7, 16}, 4},
{{1|(6<<4)}, { 17.23*6, 16}, 4},
{{1|(5<<4)}, { 17.23*5, 16}, 4},
{{1|(4<<4)}, { 17.23*4, 16}, 4},
{{1|(3<<4)}, { 17.23*3, 16}, 4},
{{1|(2<<4)}, { 17.23*2, 16}, 4},
{{1|(1<<4)}, { 17.23*1, 16}, 4},
{{1|(0<<4)}, { 17.23*0, 16}, 1},
{{2|(13<<4)}, {17.23*13, 32}, 1},
{{2|(11<<4)}, {17.23*11, 32}, 0},
{{2|(10<<4)}, {17.23*10, 32}, 0},
{{2|(9<<4)}, {17.23*9, 32}, 0},
{{2|(8<<4)}, {17.23*8, 32}, 0},
{{2|(7<<4)}, {17.23*7, 32}, 0},
{{2|(6<<4)}, { 17.23*6, 32}, 0},
{{2|(5<<4)}, { 17.23*5, 32}, 0},
{{2|(4<<4)}, { 17.23*4, 32}, 0},
{{2|(3<<4)}, { 17.23*3, 32}, 0},
{{2|(2<<4)}, { 17.23*2, 32}, 0},
{{2|(1<<4)}, { 17.23*1, 32}, 0},
{{2|(11<<4)}, {17.23*11, 32}, 4},
{{2|(10<<4)}, {17.23*10, 32}, 4},
{{2|(9<<4)}, {17.23*9, 32}, 4},
{{2|(8<<4)}, {17.23*8, 32}, 4},
{{2|(7<<4)}, {17.23*7, 32}, 4},
{{2|(6<<4)}, { 17.23*6, 32}, 4},
{{2|(5<<4)}, { 17.23*5, 32}, 4},
{{2|(4<<4)}, { 17.23*4, 32}, 4},
{{2|(3<<4)}, { 17.23*3, 32}, 4},
{{2|(2<<4)}, { 17.23*2, 32}, 4},
{{2|(1<<4)}, { 17.23*1, 32}, 4},
{{2|(0<<4)}, { 17.23*0, 32}, 1},
{{3|(13<<4)}, {17.23*13, 48}, 1},
{{3|(11<<4)}, {17.23*11, 48}, 0},
{{3|(10<<4)}, {17.23*10, 48}, 0},
{{3|(9<<4)}, {17.23*9, 48}, 0},
{{3|(8<<4)}, {17.23*8, 48}, 0},
{{3|(7<<4)}, {17.23*7, 48}, 0},
{{3|(6<<4)}, { 17.23*6, 48}, 0},
{{3|(5<<4)}, { 17.23*5, 48}, 0},
{{3|(4<<4)}, { 17.23*4, 48}, 0},
{{3|(3<<4)}, { 17.23*3, 48}, 0},
{{3|(2<<4)}, { 17.23*2, 48}, 0},
{{3|(1<<4)}, { 17.23*1, 48}, 0},
{{3|(11<<4)}, {17.23*11, 48}, 4},
{{3|(10<<4)}, {17.23*10, 48}, 4},
{{3|(9<<4)}, {17.23*9, 48}, 4},
{{3|(8<<4)}, {17.23*8, 48}, 4},
{{3|(7<<4)}, {17.23*7, 48}, 4},
{{3|(6<<4)}, { 17.23*6, 48}, 4},
{{3|(5<<4)}, { 17.23*5, 48}, 4},
{{3|(4<<4)}, { 17.23*4, 48}, 4},
{{3|(3<<4)}, { 17.23*3, 48}, 4},
{{3|(2<<4)}, { 17.23*2, 48}, 4},
{{3|(1<<4)}, { 17.23*1, 48}, 4},
{{3|(0<<4)}, { 17.23*0, 48}, 1},
{{4|(13<<4)}, {17.23*13, 64}, 1},
{{4|(11<<4)}, {17.23*11, 64}, 1},
{{4|(10<<4)}, {17.23*10, 64}, 1},
{{4|(9<<4)}, {17.23*9, 64}, 1},
{{4|(8<<4)}, {17.23*8, 64}, 1},
{{4|(5<<4)}, { 17.23*5, 64}, 0},
{{4|(5<<4)}, { 17.23*5, 64}, 4},
{{4|(2<<4)}, { 17.23*2, 64}, 1},
{{4|(1<<4)}, { 17.23*1, 64}, 1},
{{4|(0<<4)}, { 17.23*0, 64}, 1},

View File

@@ -42,10 +42,8 @@ void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool def
rgb_led led;
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
led = g_rgb_leds[i];
if (led.matrix_co.raw < 0xFF) {
if (led.modifier) {
rgb_matrix_set_color( i, red, green, blue );
}
if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
rgb_matrix_set_color( i, red, green, blue );
}
}
}

View File

@@ -43,10 +43,8 @@ void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool def
rgb_led led;
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
led = g_rgb_leds[i];
if (led.matrix_co.raw < 0xFF) {
if (led.modifier) {
rgb_matrix_set_color( i, red, green, blue );
}
if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
rgb_matrix_set_color( i, red, green, blue );
}
}
}

View File

@@ -43,10 +43,8 @@ void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool def
rgb_led led;
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
led = g_rgb_leds[i];
if (led.matrix_co.raw < 0xFF) {
if (led.modifier) {
rgb_matrix_set_color( i, red, green, blue );
}
if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
rgb_matrix_set_color( i, red, green, blue );
}
}
}

View File

@@ -42,10 +42,8 @@ void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool def
rgb_led led;
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
led = g_rgb_leds[i];
if (led.matrix_co.raw < 0xFF) {
if (led.modifier) {
rgb_matrix_set_color( i, red, green, blue );
}
if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
rgb_matrix_set_color( i, red, green, blue );
}
}
}

View File

@@ -56,11 +56,9 @@ void rgb_matrix_layer_helper(uint8_t red, uint8_t green, uint8_t blue, bool defa
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
led = g_rgb_leds[i];
if (led.matrix_co.raw < 0xFF) {
if (led.modifier) {
rgb_matrix_set_color(i, red, green, blue);
}
if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
rgb_matrix_set_color( i, red, green, blue );
}
}
}

View File

@@ -269,64 +269,64 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
};
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
/*{row | col << 4}
| {x=0..224, y=0..64}
| | modifier
| | flags
| | | */
{{ 8|(0<<4)}, {17.2* 8, 12.8*0}, 0}, // LED 1 on right > Key 6
{{ 9|(0<<4)}, {17.2* 9, 12.8*0}, 0}, // LED 2 > Key 7
{{10|(0<<4)}, {17.2*10, 12.8*0}, 0}, // LED 3 > Key 8
{{11|(0<<4)}, {17.2*11, 12.8*0}, 0}, // LED 4 > Key 9
{{12|(0<<4)}, {17.2*12, 12.8*0}, 0}, // LED 5 > Key 0
{{ 8|(0<<4)}, {17.2* 8, 12.8*0}, 4}, // LED 1 on right > Key 6
{{ 9|(0<<4)}, {17.2* 9, 12.8*0}, 4}, // LED 2 > Key 7
{{10|(0<<4)}, {17.2*10, 12.8*0}, 4}, // LED 3 > Key 8
{{11|(0<<4)}, {17.2*11, 12.8*0}, 4}, // LED 4 > Key 9
{{12|(0<<4)}, {17.2*12, 12.8*0}, 4}, // LED 5 > Key 0
{{ 8|(1<<4)}, {17.2* 8, 12.8*1}, 0}, // LED 6
{{ 9|(1<<4)}, {17.2* 9, 12.8*1}, 0}, // LED 7
{{10|(1<<4)}, {17.2*10, 12.8*1}, 0}, // LED 8
{{11|(1<<4)}, {17.2*11, 12.8*1}, 0}, // LED 9
{{12|(1<<4)}, {17.2*12, 12.8*1}, 0}, // LED 10
{{ 8|(1<<4)}, {17.2* 8, 12.8*1}, 4}, // LED 6
{{ 9|(1<<4)}, {17.2* 9, 12.8*1}, 4}, // LED 7
{{10|(1<<4)}, {17.2*10, 12.8*1}, 4}, // LED 8
{{11|(1<<4)}, {17.2*11, 12.8*1}, 4}, // LED 9
{{12|(1<<4)}, {17.2*12, 12.8*1}, 4}, // LED 10
{{ 8|(2<<4)}, {17.2* 8, 12.8*2}, 0}, // LED 11
{{ 9|(2<<4)}, {17.2* 9, 12.8*2}, 0}, // LED 12
{{10|(2<<4)}, {17.2*10, 12.8*2}, 0}, // LED 13
{{11|(2<<4)}, {17.2*11, 12.8*2}, 0}, // LED 14
{{12|(2<<4)}, {17.2*12, 12.8*2}, 0}, // LED 15
{{ 8|(2<<4)}, {17.2* 8, 12.8*2}, 4}, // LED 11
{{ 9|(2<<4)}, {17.2* 9, 12.8*2}, 4}, // LED 12
{{10|(2<<4)}, {17.2*10, 12.8*2}, 4}, // LED 13
{{11|(2<<4)}, {17.2*11, 12.8*2}, 4}, // LED 14
{{12|(2<<4)}, {17.2*12, 12.8*2}, 4}, // LED 15
{{ 8|(3<<4)}, {17.2* 8, 12.8*3}, 0}, // LED 16
{{ 9|(3<<4)}, {17.2* 9, 12.8*3}, 0}, // LED 17
{{10|(3<<4)}, {17.2*10, 12.8*3}, 0}, // LED 18
{{11|(3<<4)}, {17.2*11, 12.8*3}, 0}, // LED 19
{{12|(3<<4)}, {17.2*12, 12.8*3}, 0}, // LED 20
{{ 8|(3<<4)}, {17.2* 8, 12.8*3}, 4}, // LED 16
{{ 9|(3<<4)}, {17.2* 9, 12.8*3}, 4}, // LED 17
{{10|(3<<4)}, {17.2*10, 12.8*3}, 4}, // LED 18
{{11|(3<<4)}, {17.2*11, 12.8*3}, 4}, // LED 19
{{12|(3<<4)}, {17.2*12, 12.8*3}, 4}, // LED 20
{{ 9|(4<<4)}, {17.2* 9, 12.8*4}, 1}, // LED 21
{{10|(4<<4)}, {17.2*10, 12.8*4}, 1}, // LED 22
{{11|(4<<4)}, {17.2*11, 12.8*4}, 1}, // LED 23
{{12|(4<<4)}, {17.2*12, 12.8*4}, 1}, // LED 24
{{ 5|(0<<4)}, {17.2* 5, 12.8*0}, 0}, // LED 1 on left > Key 5
{{ 4|(0<<4)}, {17.2* 4, 12.8*0}, 0}, // LED 2 > Key 4
{{ 3|(0<<4)}, {17.2* 3, 12.8*0}, 0}, // LED 3 > Key 3
{{ 2|(0<<4)}, {17.2* 2, 12.8*0}, 0}, // LED 4 > Key 2
{{ 1|(0<<4)}, {17.2* 1, 12.8*0}, 0}, // LED 5 > Key 1
{{ 5|(0<<4)}, {17.2* 5, 12.8*0}, 4}, // LED 1 on left > Key 5
{{ 4|(0<<4)}, {17.2* 4, 12.8*0}, 4}, // LED 2 > Key 4
{{ 3|(0<<4)}, {17.2* 3, 12.8*0}, 4}, // LED 3 > Key 3
{{ 2|(0<<4)}, {17.2* 2, 12.8*0}, 4}, // LED 4 > Key 2
{{ 1|(0<<4)}, {17.2* 1, 12.8*0}, 4}, // LED 5 > Key 1
{{ 5|(1<<4)}, {17.2* 5, 12.8*1}, 0}, // LED 6
{{ 4|(1<<4)}, {17.2* 4, 12.8*1}, 0}, // LED 7
{{ 3|(1<<4)}, {17.2* 3, 12.8*1}, 0}, // LED 8
{{ 2|(1<<4)}, {17.2* 2, 12.8*1}, 0}, // LED 9
{{ 1|(1<<4)}, {17.2* 1, 12.8*1}, 0}, // LED 10
{{ 5|(1<<4)}, {17.2* 5, 12.8*1}, 4}, // LED 6
{{ 4|(1<<4)}, {17.2* 4, 12.8*1}, 4}, // LED 7
{{ 3|(1<<4)}, {17.2* 3, 12.8*1}, 4}, // LED 8
{{ 2|(1<<4)}, {17.2* 2, 12.8*1}, 4}, // LED 9
{{ 1|(1<<4)}, {17.2* 1, 12.8*1}, 4}, // LED 10
{{ 5|(2<<4)}, {17.2* 5, 12.8*2}, 0}, // LED 11
{{ 4|(2<<4)}, {17.2* 4, 12.8*2}, 0}, // LED 12
{{ 3|(2<<4)}, {17.2* 3, 12.8*2}, 0}, // LED 13
{{ 2|(2<<4)}, {17.2* 2, 12.8*2}, 0}, // LED 14
{{ 1|(2<<4)}, {17.2* 1, 12.8*2}, 0}, // LED 15
{{ 5|(2<<4)}, {17.2* 5, 12.8*2}, 4}, // LED 11
{{ 4|(2<<4)}, {17.2* 4, 12.8*2}, 4}, // LED 12
{{ 3|(2<<4)}, {17.2* 3, 12.8*2}, 4}, // LED 13
{{ 2|(2<<4)}, {17.2* 2, 12.8*2}, 4}, // LED 14
{{ 1|(2<<4)}, {17.2* 1, 12.8*2}, 4}, // LED 15
{{ 5|(3<<4)}, {17.2* 5, 12.8*3}, 0}, // LED 16
{{ 4|(3<<4)}, {17.2* 4, 12.8*3}, 0}, // LED 17
{{ 3|(3<<4)}, {17.2* 3, 12.8*3}, 0}, // LED 18
{{ 2|(3<<4)}, {17.2* 2, 12.8*3}, 0}, // LED 19
{{ 1|(3<<4)}, {17.2* 1, 12.8*3}, 0}, // LED 20
{{ 5|(3<<4)}, {17.2* 5, 12.8*3}, 4}, // LED 16
{{ 4|(3<<4)}, {17.2* 4, 12.8*3}, 4}, // LED 17
{{ 3|(3<<4)}, {17.2* 3, 12.8*3}, 4}, // LED 18
{{ 2|(3<<4)}, {17.2* 2, 12.8*3}, 4}, // LED 19
{{ 1|(3<<4)}, {17.2* 1, 12.8*3}, 4}, // LED 20
{{ 4|(4<<4)}, {17.2* 4, 12.8*4}, 1}, // LED 21
{{ 3|(4<<4)}, {17.2* 3, 12.8*4}, 1}, // LED 22

View File

@@ -114,80 +114,80 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{0, E_16, D_16, F_16},
{0, B_16, A_16, C_16},
};
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
/* {row | col << 4}
* | {x=0..224, y=0..64}
* | | modifier
* | | flags
* | | | */
//cs1
{{0|(0<<4)}, { 0, 0}, 1},
{{0|(1<<4)}, { 17, 0}, 0},
{{0|(1<<4)}, { 17, 0}, 4},
{{1|(0<<4)}, { 0, 16}, 1},
{{2|(0<<4)}, { 0, 32}, 1},
//cs2
{{0|(2<<4)}, { 34, 0}, 0},
{{0|(3<<4)}, { 51, 0}, 0},
{{1|(1<<4)}, { 17, 16}, 0},
{{1|(2<<4)}, { 34, 16}, 0},
{{0|(2<<4)}, { 34, 0}, 4},
{{0|(3<<4)}, { 51, 0}, 4},
{{1|(1<<4)}, { 17, 16}, 4},
{{1|(2<<4)}, { 34, 16}, 4},
//cs3
{{2|(1<<4)}, { 17, 32}, 0},
{{2|(2<<4)}, { 34, 32}, 0},
{{3|(1<<4)}, { 17, 48}, 0},
{{3|(2<<4)}, { 34, 48}, 0},
{{2|(1<<4)}, { 17, 32}, 4},
{{2|(2<<4)}, { 34, 32}, 4},
{{3|(1<<4)}, { 17, 48}, 4},
{{3|(2<<4)}, { 34, 48}, 4},
//cs4
{{0|(4<<4)}, { 68, 0}, 0},
{{0|(5<<4)}, { 85, 0}, 0},
{{1|(3<<4)}, { 51, 16}, 0},
{{1|(4<<4)}, { 68, 16}, 0},
{{0|(4<<4)}, { 68, 0}, 4},
{{0|(5<<4)}, { 85, 0}, 4},
{{1|(3<<4)}, { 51, 16}, 4},
{{1|(4<<4)}, { 68, 16}, 4},
//cs5
{{0|(11<<4)}, {187, 0}, 0},
{{0|(12<<4)}, {204, 0}, 0},
{{1|(11<<4)}, {187, 16}, 0},
{{1|(12<<4)}, {204, 16}, 0},
{{0|(11<<4)}, {187, 0}, 4},
{{0|(12<<4)}, {204, 0}, 4},
{{1|(11<<4)}, {187, 16}, 4},
{{1|(12<<4)}, {204, 16}, 4},
//cs6
{{0|(7<<4)}, {119, 0}, 0},
{{0|(8<<4)}, {136, 0}, 0},
{{1|(7<<4)}, {119, 16}, 0},
{{1|(8<<4)}, {136, 16}, 0},
{{0|(7<<4)}, {119, 0}, 4},
{{0|(8<<4)}, {136, 0}, 4},
{{1|(7<<4)}, {119, 16}, 4},
{{1|(8<<4)}, {136, 16}, 4},
//cs7
{{0|(9<<4)}, {153, 0}, 0},
{{0|(10<<4)}, {170, 0}, 0},
{{1|(9<<4)}, {153, 16}, 0},
{{1|(10<<4)}, {170, 16}, 0},
{{0|(9<<4)}, {153, 0}, 4},
{{0|(10<<4)}, {170, 0}, 4},
{{1|(9<<4)}, {153, 16}, 4},
{{1|(10<<4)}, {170, 16}, 4},
//cs8
{{0|(13<<4)}, {221, 0}, 0},
{{0|(14<<4)}, {221, 0}, 0},
{{0|(13<<4)}, {221, 0}, 4},
{{0|(14<<4)}, {221, 0}, 4},
{{1|(13<<4)}, {221, 32}, 1},
{{2|(12<<4)}, {221, 16}, 1},
//cs9
{{2|(3<<4)}, { 51, 32}, 0},
{{2|(4<<4)}, { 68, 32}, 0},
{{3|(3<<4)}, { 51, 48}, 0},
{{3|(4<<4)}, { 68, 48}, 0},
{{2|(3<<4)}, { 51, 32}, 4},
{{2|(4<<4)}, { 68, 32}, 4},
{{3|(3<<4)}, { 51, 48}, 4},
{{3|(4<<4)}, { 68, 48}, 4},
//cs10
{{0|(6<<4)}, {102, 0}, 0},
{{1|(5<<4)}, { 85, 16}, 0},
{{1|(6<<4)}, {102, 16}, 0},
{{2|(5<<4)}, { 85, 32}, 0},
{{0|(6<<4)}, {102, 0}, 4},
{{1|(5<<4)}, { 85, 16}, 4},
{{1|(6<<4)}, {102, 16}, 4},
{{2|(5<<4)}, { 85, 32}, 4},
//cs11
{{2|(6<<4)}, {102, 32}, 0},
{{3|(5<<4)}, { 85, 48}, 0},
{{3|(6<<4)}, {102, 48}, 0},
{{4|(5<<4)}, {102, 64}, 0},
{{2|(6<<4)}, {102, 32}, 4},
{{3|(5<<4)}, { 85, 48}, 4},
{{3|(6<<4)}, {102, 48}, 4},
{{4|(5<<4)}, {102, 64}, 4},
//cs12
{{2|(7<<4)}, {119, 32}, 0},
{{2|(8<<4)}, {136, 32}, 0},
{{3|(7<<4)}, {119, 48}, 0},
{{3|(8<<4)}, {136, 48}, 0},
{{2|(7<<4)}, {119, 32}, 4},
{{2|(8<<4)}, {136, 32}, 4},
{{3|(7<<4)}, {119, 48}, 4},
{{3|(8<<4)}, {136, 48}, 4},
//cs13
{{2|(9<<4)}, {153, 32}, 0},
{{2|(10<<4)}, {170, 32}, 0},
{{3|(9<<4)}, {153, 48}, 0},
{{2|(9<<4)}, {153, 32}, 4},
{{2|(10<<4)}, {170, 32}, 4},
{{3|(9<<4)}, {153, 48}, 4},
{{4|(6<<4)}, {136, 48}, 1},
//cs14
{{2|(11<<4)}, {187, 32}, 0},
{{3|(10<<4)}, {170, 48}, 0},
{{2|(11<<4)}, {187, 32}, 4},
{{3|(10<<4)}, {170, 48}, 4},
{{3|(11<<4)}, {187, 48}, 1},
{{4|(7<<4)}, {153, 48}, 1},
//cs15

View File

@@ -0,0 +1,174 @@
/* Good on you for modifying your layout! if you don't have
* time to read the QMK docs, a list of keycodes can be found at
*
* https://github.com/qmk/qmk_firmware/blob/master/docs/keycodes.md
*
* There's also a template for adding new layers at the bottom of this file!
*/
#include QMK_KEYBOARD_H
#define IGNORE_MOD_TAP_INTERRUPT
#define BASE 0 // default layer
#define SYMB 1 // symbols
#define NUMB 2 // numbers/motion
enum custom_keycodes {
M1_STRING = SAFE_RANGE,
M2_URL,
};
// Blank template at the bottom
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 0: Basic layer
*
* ,-------------------------------------------. ,-------------------------------------------.
* | TAB | Q | W | F | P | G | | J | L | U | Y | ; : | | \ |
* |--------+------+------+------+------+------|------. .------|------+------+------+------+------+--------|
* | Ctrl | A | R | S | T | D |O(CMD)| |O(CTL)| H | N | E | I | O | ' " |
* |--------+------+------+------+------+------|------| |------|------+------+------+------+------+--------|
* | LShift | Z | X | C | V | B |O(ALT)| | | K | M | , < | . > | / ? | RShift |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* .----------. .-------. .------. .--------.
* | alt/del | | BKSP | | Space| |cmd/del |
* '----------' '-------' `------. '--------'
* ,-------. ,-------.
* | MMB | | : |
* ,------|-------| |-------|------.
* | NUMB | SYMB | | SYMB | NUMB |
* | Esc | F13 | | F14 | Enter|
* | | | | | |
* `--------------' `--------------'
*/
[BASE] = LAYOUT_gergo(
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y,KC_SCLN, KC_BSLS,
KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, OSM(MOD_LGUI), OSM(MOD_LCTL), KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, OSM(MOD_LALT), KC_TRNS, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
ALT_T(KC_DEL), KC_BSPC, KC_SPC, CMD_T(KC_DEL),
KC_BTN3, KC_COLON,
LT(SYMB, KC_ESC), LT(NUMB, KC_F13), LT(NUMB, KC_F14), LT(SYMB, KC_ENT)),
/* Keymap 1: Symbols layer
*
* ,-------------------------------------------. ,-------------------------------------------.
* | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | VolUp |
* |--------+------+------+------+------+------|------. .------|------+------+------+------+------+--------|
* | | [ | ] | { | } | ` | M1 | | | | - | _ | + | = | VolDn |
* |--------+------+------+------+------+------|------| |------|------+------+------+------+------+--------|
* | | ` | ~ | | | ~ | M2 | | | | | Prev |Pl/Pau| Next | Mute |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* .------. .------. .------. .-----.
* | | | | | | | |
* '------' '------' `------. '-----'
* ,-------. ,-------.
* | | | |
* ,------|-------| |-------|------.
* | | | | | |
* | | | | | |
* | | | | | |
* `--------------' `--------------'
*/
[SYMB] = LAYOUT_gergo(
KC_TRNS, KC_EXLM, KC_AT, KC_HASH,KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC__VOLUP,
KC_TRNS, KC_LBRC, KC_RBRC, KC_LCBR,KC_RCBR, KC_PLUS, M1_STRING, KC_TRNS, KC_TRNS, KC_MINS, KC_UNDERSCORE, KC_PLUS, KC_EQL, KC__VOLDOWN,
KC_TRNS, KC_GRV, KC_TILD,KC_TRNS,KC_TRNS, KC_EQL, M2_URL, KC_TRNS, KC_TRNS, KC_TRNS, KC_MEDIA_REWIND, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_FAST_FORWARD, KC__MUTE,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
/* Keymap 2: Pad/Function layer
*
* ,-------------------------------------------. ,-------------------------------------------.
* | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | PgUp |
* |--------+------+------+------+------+------|------. .------|------+------+------+------+------+--------|
* | F1 | F2 | F3 | F4 | F5 | F6 | BTN1 | | Home | LEFT | DOWN | UP | RIGHT| End | PgDn |
* |--------+------+------+------+------+------|------| |------|------+------+------+------+------+--------|
* | F7 | F8 | F9 | F10 | F11 | F12 | BTN2 | | | MLFT | MDWN | MUP | MRGHT| | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* .------. .------. .------. .-----.
* | | | | | ALT | | |
* '------' '------' `------. '-----'
* ,-------. ,-------.
* | | | |
* ,------|-------| |-------|------.
* | | | | | |
* | | | | | |
* | | | | | |
* `--------------' `--------------'
*/
[NUMB] = LAYOUT_gergo(
KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_PGUP,
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_BTN1, KC_HOME, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_END, KC_PGDN,
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BTN2, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_RALT, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
};
/* Keymap template
*
* ,-------------------------------------------. ,-------------------------------------------.
* | | | | | | | | | | | | | |
* |--------+------+------+------+------+------|------. .------|------+------+------+------+------+--------|
* | | | | | | | | | | | | | | | |
* |--------+------+------+------+------+------|------| |------|------+------+------+------+------+--------|
* | | | | | | | | | | | | | | | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* .------. .------. .------. .-----.
* | | | | | | | |
* '------' '------' `------. '-----'
* ,-------. ,-------.
* | | | |
* ,------|-------| |-------|------.
* | | | | | |
* | | | | | |
* | | | | | |
* `--------------' `--------------'
[SYMB] = LAYOUT_gergo(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
*/
// Runs just one time when the keyboard initializes.
void matrix_init_user(void) {
};
// Runs constantly in the background, in a loop.
void matrix_scan_user(void) {
//uint8_t layer = biton32(layer_state);
biton32(layer_state);
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case M1_STRING:
if (record->event.pressed) {
// when keycode QMKBEST is pressed
SEND_STRING("Hi!" SS_TAP(X_ENTER));
} else {
// when keycode QMKBEST is released
}
break;
case M2_URL:
if (record->event.pressed) {
SEND_STRING("https://ddg.gg" SS_TAP(X_ENTER));
}
break;
}
return true;
};

View File

@@ -0,0 +1,16 @@
# [Gergo! By g Heavy Industries](http://gboards.ca)
![Gergo image](https://4.bp.blogspot.com/-889nMXxgSM0/XCNxwnO5kUI/AAAAAAAA6mI/tZbWgZVCBW0dyZOCGJDkjN06DVax7j8XwCLcBGAs/s1600/48422820_967732713413298_485744639215665152_n.jpg)
This is a [Colemak](https://colemak.com/) mapping for the Gergo,
Unlike the default mapping, most symbols are at their original place on the number row to ease in the
learning curve.
You can view this layout over at
[keyboad-layout-editor.com](http://www.keyboard-layout-editor.com/#/gists/f04d6a3b0cd3db91407c51f7ba36aeb3).
## Settings
To edit various settings, enable the 1u trackball and whatnot please modify /keyboards/gergo/keymaps/default/rules.mk
Ideally you should copy this directory and make your changes there. If you come up with a good layout submit a PR!

View File

@@ -0,0 +1,36 @@
#----------------------------------------------------------------------------
# make gergo:germ:dfu
# Make sure you have dfu-programmer installed!
#----------------------------------------------------------------------------
# Firmware options
BALLER = no # Enable to ball out
BALLSTEP = 20 # Multiple in px to move, multiplied by layer number
SCROLLSTEP = 1 # Lines to scroll with ball
MOUSEKEY_ENABLE = yes # Mouse keys(+4700), needed for baller
#Debug options
VERBOSE = no
DEBUG_MATRIX_SCAN_RATE = no
DEBUG_BALLER = no
DEBUG_MATRIX = no
# A bunch of stuff that you shouldn't touch unless you
# know what you're doing.
#
# No touchy, capiche?
SRC += matrix.c i2c_master.c
ifneq ($(strip $(BALLSTEP)),)
OPT_DEFS += -DTRKSTEP=$(strip $(BALLSTEP))
endif
ifneq ($(strip $(SCROLLSTEP)),)
OPT_DEFS += -DSCROLLSTEP=$(strip $(SCROLLSTEP))
endif
ifeq ($(strip $(BALLER)), yes)
OPT_DEFS += -DBALLER
endif
ifeq ($(strip $(DEBUG_BALLER)), yes)
OPT_DEFS += -DDEBUG_BALLER
endif
ifeq ($(strip $(DEBUG_MATRIX)), yes)
OPT_DEFS += -DDEBUG_MATRIX
endif

View File

@@ -3,7 +3,7 @@
# Make sure you have dfu-programmer installed!
#----------------------------------------------------------------------------
# Firmware options
BALLER = yes # Enable to ball out
BALLER = no # Enable to ball out
BALLSTEP = 20 # Multiple in px to move, multiplied by layer number
SCROLLSTEP = 1 # Lines to scroll with ball
MOUSEKEY_ENABLE = yes # Mouse keys(+4700), needed for baller
@@ -26,6 +26,7 @@ ifneq ($(strip $(SCROLLSTEP)),)
OPT_DEFS += -DSCROLLSTEP=$(strip $(SCROLLSTEP))
endif
ifeq ($(strip $(BALLER)), yes)
POINTING_DEVICE_ENABLE = yes
OPT_DEFS += -DBALLER
endif
ifeq ($(strip $(DEBUG_BALLER)), yes)

View File

@@ -27,6 +27,7 @@ ifneq ($(strip $(SCROLLSTEP)),)
endif
ifeq ($(strip $(BALLER)), yes)
OPT_DEFS += -DBALLER
POINTING_DEVICE_ENABLE = yes
endif
ifeq ($(strip $(DEBUG_BALLER)), yes)
OPT_DEFS += -DDEBUG_BALLER

View File

@@ -30,7 +30,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "debug.h"
#include "util.h"
#include "debounce.h"
#include "pointing_device.h"
#include QMK_KEYBOARD_H
#ifdef DEBUG_MATRIX_SCAN_RATE
# include "timer.h"
@@ -38,6 +37,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifdef BALLER
#include <avr/interrupt.h>
#include "pointing_device.h"
#endif
#ifndef DEBOUNCE

View File

@@ -14,7 +14,6 @@ BOOTLOADER = atmel-dfu
F_USB = $(F_CPU)
CUSTOM_MATRIX = yes
POINTING_DEVICE_ENABLE = yes
EXTRAKEY_ENABLE = yes
CONSOLE_ENABLE = yes
COMMAND_ENABLE = yes

View File

@@ -21,21 +21,21 @@
#ifdef RGB_MATRIX_ENABLE
#include "rgblight.h"
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
/*{row | col << 4}
| {x=0..224, y=0..64}
| | modifier
| | | */
{{1|(13<<4)}, {195, 3}, 0},
{{4|(13<<4)}, {195, 16}, 0},
{{4|(10<<4)}, {150, 16}, 0},
{{4|(7<<4)}, {105, 16}, 0},
{{4|(4<<4)}, {60, 16}, 0},
{{4|(1<<4)}, {15, 16}, 0},
{{1|(1<<4)}, {15, 3}, 0},
{{1|(4<<4)}, {60, 3}, 0},
{{1|(7<<4)}, {105, 3}, 0},
{{1|(10<<4)}, {150, 3}, 0}
{{1|(13<<4)}, {195, 3}, 4},
{{4|(13<<4)}, {195, 16}, 4},
{{4|(10<<4)}, {150, 16}, 4},
{{4|(7<<4)}, {105, 16}, 4},
{{4|(4<<4)}, {60, 16}, 4},
{{4|(1<<4)}, {15, 16}, 4},
{{1|(1<<4)}, {15, 3}, 4},
{{1|(4<<4)}, {60, 3}, 4},
{{1|(7<<4)}, {105, 3}, 4},
{{1|(10<<4)}, {150, 3}, 4}
};
#endif

View File

@@ -165,7 +165,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{1, C9_16, C7_15, C6_15} //D16
};
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
//
// C7, C6, C5, C4, C3, C2, C1, A7, A6, A5, A4, A3, A2, A1,
// C8, C9, C10, C11, C12, C13, C14, A8, A9, A10, A11, A12, A13, A15,
@@ -174,70 +174,70 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
// D16, D15, D14, ---, ---, ---, D13, ---, ---, ---, B14, B13, B12, B11
/* {row | col << 4}
* | {x=0..224, y=0..64}
* | | modifier
* | | flags
* | | | */
{{0|(13<<4)}, {224, 0}, 1}, //A1-A16
{{0|(12<<4)}, {204, 0}, 0},
{{0|(11<<4)}, {187, 0}, 0},
{{0|(10<<4)}, {170, 0}, 0},
{{0|(9<<4)}, {153, 0}, 0},
{{0|(8<<4)}, {136, 0}, 0},
{{0|(7<<4)}, {119, 0}, 0},
{{1|(7<<4)}, {119, 16}, 0},
{{1|(8<<4)}, {136, 16}, 0},
{{1|(9<<4)}, {153, 16}, 0},
{{1|(10<<4)}, {170, 16}, 0},
{{1|(11<<4)}, {187, 16}, 0},
{{1|(12<<4)}, {204, 16}, 0},
{{0|(12<<4)}, {204, 0}, 4},
{{0|(11<<4)}, {187, 0}, 4},
{{0|(10<<4)}, {170, 0}, 4},
{{0|(9<<4)}, {153, 0}, 4},
{{0|(8<<4)}, {136, 0}, 4},
{{0|(7<<4)}, {119, 0}, 4},
{{1|(7<<4)}, {119, 16}, 4},
{{1|(8<<4)}, {136, 16}, 4},
{{1|(9<<4)}, {153, 16}, 4},
{{1|(10<<4)}, {170, 16}, 4},
{{1|(11<<4)}, {187, 16}, 4},
{{1|(12<<4)}, {204, 16}, 4},
{{2|(13<<4)}, {224, 32}, 1},
{{2|(12<<4)}, {224, 16}, 0},
{{2|(11<<4)}, {197, 32}, 0},
{{2|(12<<4)}, {224, 16}, 4},
{{2|(11<<4)}, {197, 32}, 4},
{{3|(10<<4)}, {170, 48}, 0}, //B1-B14
{{3|(9<<4)}, {153, 48}, 0},
{{3|(8<<4)}, {136, 48}, 0},
{{3|(7<<4)}, {119, 48}, 0},
{{2|(7<<4)}, {119, 32}, 0},
{{2|(8<<4)}, {136, 32}, 0},
{{2|(9<<4)}, {153, 32}, 0},
{{2|(10<<4)}, {170, 32}, 0},
{{3|(11<<4)}, {187, 48}, 0},
{{3|(10<<4)}, {170, 48}, 4}, //B1-B14
{{3|(9<<4)}, {153, 48}, 4},
{{3|(8<<4)}, {136, 48}, 4},
{{3|(7<<4)}, {119, 48}, 4},
{{2|(7<<4)}, {119, 32}, 4},
{{2|(8<<4)}, {136, 32}, 4},
{{2|(9<<4)}, {153, 32}, 4},
{{2|(10<<4)}, {170, 32}, 4},
{{3|(11<<4)}, {187, 48}, 4},
{{3|(13<<4)}, {214, 48}, 1},
{{4|(13<<4)}, {224, 64}, 1},
{{4|(12<<4)}, {204, 64}, 1},
{{4|(11<<4)}, {187, 64}, 1},
{{4|(10<<4)}, {170, 64}, 1},
{{0|(6<<4)}, {102, 0}, 0}, //C1-C16
{{0|(5<<4)}, { 85, 0}, 0},
{{0|(4<<4)}, { 68, 0}, 0},
{{0|(3<<4)}, { 51, 0}, 0},
{{0|(2<<4)}, { 34, 0}, 0},
{{0|(1<<4)}, { 17, 0}, 0},
{{0|(6<<4)}, {102, 0}, 4}, //C1-C16
{{0|(5<<4)}, { 85, 0}, 4},
{{0|(4<<4)}, { 68, 0}, 4},
{{0|(3<<4)}, { 51, 0}, 4},
{{0|(2<<4)}, { 34, 0}, 4},
{{0|(1<<4)}, { 17, 0}, 4},
{{0|(0<<4)}, { 0, 0}, 1},
{{1|(0<<4)}, { 0, 16}, 1},
{{1|(1<<4)}, { 17, 16}, 0},
{{1|(2<<4)}, { 34, 16}, 0},
{{1|(3<<4)}, { 51, 16}, 0},
{{1|(4<<4)}, { 68, 16}, 0},
{{1|(5<<4)}, { 85, 16}, 0},
{{1|(6<<4)}, {102, 16}, 0},
{{2|(6<<4)}, {102, 32}, 0},
{{2|(5<<4)}, { 85, 32}, 0},
{{1|(1<<4)}, { 17, 16}, 4},
{{1|(2<<4)}, { 34, 16}, 4},
{{1|(3<<4)}, { 51, 16}, 4},
{{1|(4<<4)}, { 68, 16}, 4},
{{1|(5<<4)}, { 85, 16}, 4},
{{1|(6<<4)}, {102, 16}, 4},
{{2|(6<<4)}, {102, 32}, 4},
{{2|(5<<4)}, { 85, 32}, 4},
{{3|(2<<4)}, { 32, 48}, 0}, //D1-D16
{{3|(2<<4)}, { 32, 48}, 4}, //D1-D16
//D2
{{3|(0<<4)}, { 10, 48}, 1},
{{2|(0<<4)}, { 0, 32}, 1},
{{2|(1<<4)}, { 17, 32}, 0},
{{2|(2<<4)}, { 34, 32}, 0},
{{2|(3<<4)}, { 51, 32}, 0},
{{2|(4<<4)}, { 68, 32}, 0},
{{3|(3<<4)}, { 51, 48}, 0},
{{3|(4<<4)}, { 68, 48}, 0},
{{3|(5<<4)}, { 85, 48}, 0},
{{3|(6<<4)}, {102, 48}, 0},
{{4|(3<<4)}, {102, 64}, 0},
{{2|(1<<4)}, { 17, 32}, 4},
{{2|(2<<4)}, { 34, 32}, 4},
{{2|(3<<4)}, { 51, 32}, 4},
{{2|(4<<4)}, { 68, 32}, 4},
{{3|(3<<4)}, { 51, 48}, 4},
{{3|(4<<4)}, { 68, 48}, 4},
{{3|(5<<4)}, { 85, 48}, 4},
{{3|(6<<4)}, {102, 48}, 4},
{{4|(3<<4)}, {102, 64}, 4},
{{4|(2<<4)}, { 34, 68}, 1},
{{4|(1<<4)}, { 17, 68}, 1},
{{4|(0<<4)}, { 0, 68}, 1}
@@ -319,7 +319,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{1, C9_16, C7_15, C6_15} //D16
};
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
//
// C7, C6, C5, C4, C3, C2, C1, A7, A6, A5, A4, A3, A2, A1,
// C8, C9, C10, C11, C12, C13, C14, A8, A9, A10, A11, A12, A13, ---,
@@ -328,70 +328,70 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
// D16, D15, D14, ---, ---, ---, D13, ---, ---, ---, B14, B13, B12, B11
/* {row | col << 4}
* | {x=0..224, y=0..64}
* | | modifier
* | | flags
* | | | */
{{0|(13<<4)}, {224, 0}, 1}, //A1-A16
{{0|(12<<4)}, {204, 0}, 0},
{{0|(11<<4)}, {187, 0}, 0},
{{0|(10<<4)}, {170, 0}, 0},
{{0|(9<<4)}, {153, 0}, 0},
{{0|(8<<4)}, {136, 0}, 0},
{{0|(7<<4)}, {119, 0}, 0},
{{1|(7<<4)}, {119, 16}, 0},
{{1|(8<<4)}, {136, 16}, 0},
{{1|(9<<4)}, {153, 16}, 0},
{{1|(10<<4)}, {170, 16}, 0},
{{1|(11<<4)}, {187, 16}, 0},
{{1|(12<<4)}, {204, 16}, 0},
{{0|(12<<4)}, {204, 0}, 4},
{{0|(11<<4)}, {187, 0}, 4},
{{0|(10<<4)}, {170, 0}, 4},
{{0|(9<<4)}, {153, 0}, 4},
{{0|(8<<4)}, {136, 0}, 4},
{{0|(7<<4)}, {119, 0}, 4},
{{1|(7<<4)}, {119, 16}, 4},
{{1|(8<<4)}, {136, 16}, 4},
{{1|(9<<4)}, {153, 16}, 4},
{{1|(10<<4)}, {170, 16}, 4},
{{1|(11<<4)}, {187, 16}, 4},
{{1|(12<<4)}, {204, 16}, 4},
{{2|(13<<4)}, {224, 8}, 1},
{{2|(12<<4)}, {204, 32}, 0},
{{2|(11<<4)}, {187, 32}, 0},
{{2|(12<<4)}, {204, 32}, 4},
{{2|(11<<4)}, {187, 32}, 4},
{{3|(10<<4)}, {170, 48}, 0}, //B1-B14
{{3|(9<<4)}, {153, 48}, 0},
{{3|(8<<4)}, {136, 48}, 0},
{{3|(7<<4)}, {119, 48}, 0},
{{2|(7<<4)}, {119, 32}, 0},
{{2|(8<<4)}, {136, 32}, 0},
{{2|(9<<4)}, {153, 32}, 0},
{{2|(10<<4)}, {170, 32}, 0},
{{3|(11<<4)}, {187, 48}, 0},
{{3|(10<<4)}, {170, 48}, 4}, //B1-B14
{{3|(9<<4)}, {153, 48}, 4},
{{3|(8<<4)}, {136, 48}, 4},
{{3|(7<<4)}, {119, 48}, 4},
{{2|(7<<4)}, {119, 32}, 4},
{{2|(8<<4)}, {136, 32}, 4},
{{2|(9<<4)}, {153, 32}, 4},
{{2|(10<<4)}, {170, 32}, 4},
{{3|(11<<4)}, {187, 48}, 4},
{{3|(13<<4)}, {214, 48}, 1},
{{4|(13<<4)}, {224, 64}, 1},
{{4|(12<<4)}, {204, 64}, 1},
{{4|(11<<4)}, {187, 64}, 1},
{{4|(10<<4)}, {170, 64}, 1},
{{0|(6<<4)}, {102, 0}, 0}, //C1-C16
{{0|(5<<4)}, { 85, 0}, 0},
{{0|(4<<4)}, { 68, 0}, 0},
{{0|(3<<4)}, { 51, 0}, 0},
{{0|(2<<4)}, { 34, 0}, 0},
{{0|(1<<4)}, { 17, 0}, 0},
{{0|(6<<4)}, {102, 0}, 4}, //C1-C16
{{0|(5<<4)}, { 85, 0}, 4},
{{0|(4<<4)}, { 68, 0}, 4},
{{0|(3<<4)}, { 51, 0}, 4},
{{0|(2<<4)}, { 34, 0}, 4},
{{0|(1<<4)}, { 17, 0}, 4},
{{0|(0<<4)}, { 0, 0}, 1},
{{1|(0<<4)}, { 0, 16}, 1},
{{1|(1<<4)}, { 17, 16}, 0},
{{1|(2<<4)}, { 34, 16}, 0},
{{1|(3<<4)}, { 51, 16}, 0},
{{1|(4<<4)}, { 68, 16}, 0},
{{1|(5<<4)}, { 85, 16}, 0},
{{1|(6<<4)}, {102, 16}, 0},
{{2|(6<<4)}, {102, 32}, 0},
{{2|(5<<4)}, { 85, 32}, 0},
{{1|(1<<4)}, { 17, 16}, 4},
{{1|(2<<4)}, { 34, 16}, 4},
{{1|(3<<4)}, { 51, 16}, 4},
{{1|(4<<4)}, { 68, 16}, 4},
{{1|(5<<4)}, { 85, 16}, 4},
{{1|(6<<4)}, {102, 16}, 4},
{{2|(6<<4)}, {102, 32}, 4},
{{2|(5<<4)}, { 85, 32}, 4},
{{3|(2<<4)}, { 32, 48}, 0}, //D1-D16
{{3|(1<<4)}, { 17, 48}, 0},
{{3|(2<<4)}, { 32, 48}, 4}, //D1-D16
{{3|(1<<4)}, { 17, 48}, 4},
{{3|(0<<4)}, { 0, 48}, 1},
{{2|(0<<4)}, { 0, 32}, 1},
{{2|(1<<4)}, { 17, 32}, 0},
{{2|(2<<4)}, { 34, 32}, 0},
{{2|(3<<4)}, { 51, 32}, 0},
{{2|(4<<4)}, { 68, 32}, 0},
{{3|(3<<4)}, { 51, 48}, 0},
{{3|(4<<4)}, { 68, 48}, 0},
{{3|(5<<4)}, { 85, 48}, 0},
{{3|(6<<4)}, {102, 48}, 0},
{{4|(3<<4)}, {102, 64}, 0},
{{2|(1<<4)}, { 17, 32}, 4},
{{2|(2<<4)}, { 34, 32}, 4},
{{2|(3<<4)}, { 51, 32}, 4},
{{2|(4<<4)}, { 68, 32}, 4},
{{3|(3<<4)}, { 51, 48}, 4},
{{3|(4<<4)}, { 68, 48}, 4},
{{3|(5<<4)}, { 85, 48}, 4},
{{3|(6<<4)}, {102, 48}, 4},
{{4|(3<<4)}, {102, 64}, 4},
{{4|(2<<4)}, { 34, 68}, 1},
{{4|(1<<4)}, { 17, 68}, 1},
{{4|(0<<4)}, { 0, 68}, 1}

View File

@@ -21,13 +21,13 @@
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b \
k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b \
) \
{ \
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \
{ k30, k31, k32, k33, k34, k35, KC_NO, k37, k38, k39, k3a, k3b } \
{ k30, k31, k32, k33, k34, k35, KC_NO, k37, k38, k39, k3a, k3b } \
}
// The PCB does support a grid layout, but the case does not.
@@ -35,11 +35,24 @@
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \
) \
{ \
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \
}
#define LAYOUT_kc_ortho_4x12( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \
) \
{ \
{ KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b }, \
{ KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b }, \
{ KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b }, \
{ KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b } \
}

View File

@@ -65,7 +65,7 @@ BOOTLOADER = atmel-dfu
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = yes # Console for debug(+400)
CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE = yes # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
@@ -79,3 +79,5 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
LAYOUTS = ortho_4x12 planck_mit

View File

@@ -123,6 +123,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_LED_PROCESS_LIMIT 15
#define RGB_MATRIX_LED_FLUSH_LIMIT 10
#define RGB_MATRIX_EXTRA_TOG
#include "config_led.h"

View File

@@ -20,122 +20,122 @@
//
// There is a quick-and-dirty implementation of this under ledvis.html
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
/* 0 */ { { (0)|(0 << 4) }, { 8, 56 }, 0 }, // KC_ESC
/* 1 */ { { (0)|(1 << 4) }, { 22, 56 }, 0 }, // KC_1
/* 2 */ { { (0)|(2 << 4) }, { 35, 56 }, 0 }, // KC_2
/* 3 */ { { (0)|(3 << 4) }, { 49, 56 }, 0 }, // KC_3
/* 4 */ { { (0)|(4 << 4) }, { 63, 56 }, 0 }, // KC_4
/* 5 */ { { (0)|(5 << 4) }, { 77, 56 }, 0 }, // KC_5
/* 6 */ { { (0)|(6 << 4) }, { 91, 56 }, 0 }, // KC_6
/* 7 */ { { (0)|(7 << 4) }, { 105, 56 }, 0 }, // KC_7
/* 8 */ { { (0)|(8 << 4) }, { 118, 56 }, 0 }, // KC_8
/* 9 */ { { (0)|(9 << 4) }, { 132, 56 }, 0 }, // KC_9
/* 10 */ { { (0)|(10 << 4) }, { 146, 56 }, 0 }, // KC_0
/* 11 */ { { (0)|(11 << 4) }, { 160, 56 }, 0 }, // KC_MINS
/* 12 */ { { (0)|(12 << 4) }, { 174, 56 }, 0 }, // KC_EQL
/* 13 */ { { (0)|(13 << 4) }, { 195, 56 }, 0 }, // KC_BSPC
/* 14 */ { { (0)|(14 << 4) }, { 215, 56 }, 0 }, // KC_DEL
/* 15 */ { { (1)|(0 << 4) }, { 11, 44 }, 0 }, // KC_TAB
/* 16 */ { { (1)|(1 << 4) }, { 28, 44 }, 0 }, // KC_Q
/* 17 */ { { (1)|(2 << 4) }, { 42, 44 }, 0 }, // KC_W
/* 18 */ { { (1)|(3 << 4) }, { 56, 44 }, 0 }, // KC_E
/* 19 */ { { (1)|(4 << 4) }, { 70, 44 }, 0 }, // KC_R
/* 20 */ { { (1)|(5 << 4) }, { 84, 44 }, 0 }, // KC_T
/* 21 */ { { (1)|(6 << 4) }, { 98, 44 }, 0 }, // KC_Y
/* 22 */ { { (1)|(7 << 4) }, { 112, 44 }, 0 }, // KC_U
/* 23 */ { { (1)|(8 << 4) }, { 125, 44 }, 0 }, // KC_I
/* 24 */ { { (1)|(9 << 4) }, { 139, 44 }, 0 }, // KC_O
/* 25 */ { { (1)|(10 << 4) }, { 153, 44 }, 0 }, // KC_P
/* 26 */ { { (1)|(11 << 4) }, { 167, 44 }, 0 }, // KC_LBRC
/* 27 */ { { (1)|(12 << 4) }, { 181, 44 }, 0 }, // KC_RBRC
/* 28 */ { { (1)|(13 << 4) }, { 198, 44 }, 0 }, // KC_BSLS
/* 29 */ { { (1)|(14 << 4) }, { 215, 44 }, 0 }, // KC_HOME
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
/* 0 */ { { (0)|(0 << 4) }, { 8, 56 }, 4 }, // KC_ESC
/* 1 */ { { (0)|(1 << 4) }, { 22, 56 }, 4 }, // KC_1
/* 2 */ { { (0)|(2 << 4) }, { 35, 56 }, 4 }, // KC_2
/* 3 */ { { (0)|(3 << 4) }, { 49, 56 }, 4 }, // KC_3
/* 4 */ { { (0)|(4 << 4) }, { 63, 56 }, 4 }, // KC_4
/* 5 */ { { (0)|(5 << 4) }, { 77, 56 }, 4 }, // KC_5
/* 6 */ { { (0)|(6 << 4) }, { 91, 56 }, 4 }, // KC_6
/* 7 */ { { (0)|(7 << 4) }, { 105, 56 }, 4 }, // KC_7
/* 8 */ { { (0)|(8 << 4) }, { 118, 56 }, 4 }, // KC_8
/* 9 */ { { (0)|(9 << 4) }, { 132, 56 }, 4 }, // KC_9
/* 10 */ { { (0)|(10 << 4) }, { 146, 56 }, 4 }, // KC_0
/* 11 */ { { (0)|(11 << 4) }, { 160, 56 }, 4 }, // KC_MINS
/* 12 */ { { (0)|(12 << 4) }, { 174, 56 }, 4 }, // KC_EQL
/* 13 */ { { (0)|(13 << 4) }, { 195, 56 }, 4 }, // KC_BSPC
/* 14 */ { { (0)|(14 << 4) }, { 215, 56 }, 4 }, // KC_DEL
/* 15 */ { { (1)|(0 << 4) }, { 11, 44 }, 4 }, // KC_TAB
/* 16 */ { { (1)|(1 << 4) }, { 28, 44 }, 4 }, // KC_Q
/* 17 */ { { (1)|(2 << 4) }, { 42, 44 }, 4 }, // KC_W
/* 18 */ { { (1)|(3 << 4) }, { 56, 44 }, 4 }, // KC_E
/* 19 */ { { (1)|(4 << 4) }, { 70, 44 }, 4 }, // KC_R
/* 20 */ { { (1)|(5 << 4) }, { 84, 44 }, 4 }, // KC_T
/* 21 */ { { (1)|(6 << 4) }, { 98, 44 }, 4 }, // KC_Y
/* 22 */ { { (1)|(7 << 4) }, { 112, 44 }, 4 }, // KC_U
/* 23 */ { { (1)|(8 << 4) }, { 125, 44 }, 4 }, // KC_I
/* 24 */ { { (1)|(9 << 4) }, { 139, 44 }, 4 }, // KC_O
/* 25 */ { { (1)|(10 << 4) }, { 153, 44 }, 4 }, // KC_P
/* 26 */ { { (1)|(11 << 4) }, { 167, 44 }, 4 }, // KC_LBRC
/* 27 */ { { (1)|(12 << 4) }, { 181, 44 }, 4 }, // KC_RBRC
/* 28 */ { { (1)|(13 << 4) }, { 198, 44 }, 4 }, // KC_BSLS
/* 29 */ { { (1)|(14 << 4) }, { 215, 44 }, 4 }, // KC_HOME
/* 30 */ { { (2)|(0 << 4) }, { 13, 32 }, 1 }, // KC_CAPS
/* 31 */ { { (2)|(1 << 4) }, { 32, 32 }, 0 }, // KC_A
/* 32 */ { { (2)|(2 << 4) }, { 46, 32 }, 0 }, // KC_S
/* 33 */ { { (2)|(3 << 4) }, { 60, 32 }, 0 }, // KC_D
/* 34 */ { { (2)|(4 << 4) }, { 73, 32 }, 0 }, // KC_F
/* 35 */ { { (2)|(5 << 4) }, { 87, 32 }, 0 }, // KC_G
/* 36 */ { { (2)|(6 << 4) }, { 101, 32 }, 0 }, // KC_H
/* 37 */ { { (2)|(7 << 4) }, { 115, 32 }, 0 }, // KC_J
/* 38 */ { { (2)|(8 << 4) }, { 129, 32 }, 0 }, // KC_K
/* 39 */ { { (2)|(9 << 4) }, { 143, 32 }, 0 }, // KC_L
/* 40 */ { { (2)|(10 << 4) }, { 156, 32 }, 0 }, // KC_SCLN
/* 41 */ { { (2)|(11 << 4) }, { 170, 32 }, 0 }, // KC_QUOT
/* 31 */ { { (2)|(1 << 4) }, { 32, 32 }, 4 }, // KC_A
/* 32 */ { { (2)|(2 << 4) }, { 46, 32 }, 4 }, // KC_S
/* 33 */ { { (2)|(3 << 4) }, { 60, 32 }, 4 }, // KC_D
/* 34 */ { { (2)|(4 << 4) }, { 73, 32 }, 4 }, // KC_F
/* 35 */ { { (2)|(5 << 4) }, { 87, 32 }, 4 }, // KC_G
/* 36 */ { { (2)|(6 << 4) }, { 101, 32 }, 4 }, // KC_H
/* 37 */ { { (2)|(7 << 4) }, { 115, 32 }, 4 }, // KC_J
/* 38 */ { { (2)|(8 << 4) }, { 129, 32 }, 4 }, // KC_K
/* 39 */ { { (2)|(9 << 4) }, { 143, 32 }, 4 }, // KC_L
/* 40 */ { { (2)|(10 << 4) }, { 156, 32 }, 4 }, // KC_SCLN
/* 41 */ { { (2)|(11 << 4) }, { 170, 32 }, 4 }, // KC_QUOT
/* _________________________________________ */ // ____
/* 42 */ { { (2)|(13 << 4) }, { 193, 32 }, 0 }, // KC_ENT
/* 43 */ { { (2)|(14 << 4) }, { 215, 32 }, 0 }, // KC_PGUP
/* 44 */ { { (3)|(0 << 4) }, { 16, 19 }, 0 }, // KC_LSFT
/* 45 */ { { (3)|(2 << 4) }, { 39, 19 }, 0 }, // KC_Z
/* 46 */ { { (3)|(3 << 4) }, { 53, 19 }, 0 }, // KC_X
/* 47 */ { { (3)|(4 << 4) }, { 67, 19 }, 0 }, // KC_C
/* 48 */ { { (3)|(5 << 4) }, { 80, 19 }, 0 }, // KC_V
/* 49 */ { { (3)|(6 << 4) }, { 94, 19 }, 0 }, // KC_B
/* 50 */ { { (3)|(7 << 4) }, { 108, 19 }, 0 }, // KC_N
/* 51 */ { { (3)|(8 << 4) }, { 122, 19 }, 0 }, // KC_M
/* 52 */ { { (3)|(9 << 4) }, { 136, 19 }, 0 }, // KC_COMM
/* 53 */ { { (3)|(10 << 4) }, { 150, 19 }, 0 }, // KC_DOT
/* 54 */ { { (3)|(11 << 4) }, { 163, 19 }, 0 }, // KC_SLSH
/* 55 */ { { (3)|(12 << 4) }, { 182, 19 }, 0 }, // KC_RSFT
/* 42 */ { { (2)|(13 << 4) }, { 193, 32 }, 4 }, // KC_ENT
/* 43 */ { { (2)|(14 << 4) }, { 215, 32 }, 4 }, // KC_PGUP
/* 44 */ { { (3)|(0 << 4) }, { 16, 19 }, 4 }, // KC_LSFT
/* 45 */ { { (3)|(2 << 4) }, { 39, 19 }, 4 }, // KC_Z
/* 46 */ { { (3)|(3 << 4) }, { 53, 19 }, 4 }, // KC_X
/* 47 */ { { (3)|(4 << 4) }, { 67, 19 }, 4 }, // KC_C
/* 48 */ { { (3)|(5 << 4) }, { 80, 19 }, 4 }, // KC_V
/* 49 */ { { (3)|(6 << 4) }, { 94, 19 }, 4 }, // KC_B
/* 50 */ { { (3)|(7 << 4) }, { 108, 19 }, 4 }, // KC_N
/* 51 */ { { (3)|(8 << 4) }, { 122, 19 }, 4 }, // KC_M
/* 52 */ { { (3)|(9 << 4) }, { 136, 19 }, 4 }, // KC_COMM
/* 53 */ { { (3)|(10 << 4) }, { 150, 19 }, 4 }, // KC_DOT
/* 54 */ { { (3)|(11 << 4) }, { 163, 19 }, 4 }, // KC_SLSH
/* 55 */ { { (3)|(12 << 4) }, { 182, 19 }, 4 }, // KC_RSFT
/* _________________________________________ */ // ____
/* 56 */ { { (3)|(13 << 4) }, { 201, 19 }, 0 }, // KC_UP
/* 57 */ { { (3)|(14 << 4) }, { 215, 19 }, 0 }, // KC_PGDN
/* 58 */ { { (4)|(0 << 4) }, { 9, 7 }, 0 }, // KC_LCTL
/* 59 */ { { (4)|(1 << 4) }, { 27, 7 }, 0 }, // KC_LGUI
/* 60 */ { { (4)|(2 << 4) }, { 44, 7 }, 0 }, // KC_LALT
/* 56 */ { { (3)|(13 << 4) }, { 201, 19 }, 4 }, // KC_UP
/* 57 */ { { (3)|(14 << 4) }, { 215, 19 }, 4 }, // KC_PGDN
/* 58 */ { { (4)|(0 << 4) }, { 9, 7 }, 4 }, // KC_LCTL
/* 59 */ { { (4)|(1 << 4) }, { 27, 7 }, 4 }, // KC_LGUI
/* 60 */ { { (4)|(2 << 4) }, { 44, 7 }, 4 }, // KC_LALT
/* _________________________________________ */ // ____
/* _________________________________________ */ // ____
/* _________________________________________ */ // ____
/* 61 */ { { (4)|(6 << 4) }, { 96, 7 }, 0 }, // KC_SPC
/* 61 */ { { (4)|(6 << 4) }, { 96, 7 }, 4 }, // KC_SPC
/* _________________________________________ */ // ____
/* _________________________________________ */ // ____
/* _________________________________________ */ // ____
/* 62 */ { { (4)|(10 << 4) }, { 148, 7 }, 0 }, // KC_RALT
/* 63 */ { { (4)|(11 << 4) }, { 165, 7 }, 0 }, // MO(1)
/* 64 */ { { (4)|(12 << 4) }, { 188, 7 }, 0 }, // KC_LEFT
/* 65 */ { { (4)|(13 << 4) }, { 201, 7 }, 0 }, // KC_DOWN
/* 66 */ { { (4)|(14 << 4) }, { 215, 7 }, 0 }, // KC_RGHT
/* 62 */ { { (4)|(10 << 4) }, { 148, 7 }, 4 }, // KC_RALT
/* 63 */ { { (4)|(11 << 4) }, { 165, 7 }, 4 }, // MO(1)
/* 64 */ { { (4)|(12 << 4) }, { 188, 7 }, 4 }, // KC_LEFT
/* 65 */ { { (4)|(13 << 4) }, { 201, 7 }, 4 }, // KC_DOWN
/* 66 */ { { (4)|(14 << 4) }, { 215, 7 }, 4 }, // KC_RGHT
// Underglow LEDs
{ { 255 }, { 1, 1 }, 0 },
{ { 255 }, { 15, 0 }, 0 },
{ { 255 }, { 31, 0 }, 0 },
{ { 255 }, { 47, 0 }, 0 },
{ { 255 }, { 63, 0 }, 0 },
{ { 255 }, { 79, 0 }, 0 },
{ { 255 }, { 95, 0 }, 0 },
{ { 255 }, { 112, 0 }, 0 },
{ { 255 }, { 128, 0 }, 0 },
{ { 255 }, { 144, 0 }, 0 },
{ { 255 }, { 160, 0 }, 0 },
{ { 255 }, { 176, 0 }, 0 },
{ { 255 }, { 192, 0 }, 0 },
{ { 255 }, { 208, 0 }, 0 },
{ { 255 }, { 222, 1 }, 0 },
{ { 255 }, { 224, 13 }, 0 },
{ { 255 }, { 224, 25 }, 0 },
{ { 255 }, { 224, 38 }, 0 },
{ { 255 }, { 224, 50 }, 0 },
{ { 255 }, { 222, 62 }, 0 },
{ { 255 }, { 191, 64 }, 0 },
{ { 255 }, { 179, 64 }, 0 },
{ { 255 }, { 167, 64 }, 0 },
{ { 255 }, { 153, 64 }, 0 },
{ { 255 }, { 139, 64 }, 0 },
{ { 255 }, { 125, 64 }, 0 },
{ { 255 }, { 112, 64 }, 0 },
{ { 255 }, { 98, 64 }, 0 },
{ { 255 }, { 84, 64 }, 0 },
{ { 255 }, { 70, 64 }, 0 },
{ { 255 }, { 56, 64 }, 0 },
{ { 255 }, { 42, 64 }, 0 },
{ { 255 }, { 28, 64 }, 0 },
{ { 255 }, { 1, 62 }, 0 },
{ { 255 }, { 0, 50 }, 0 },
{ { 255 }, { 0, 38 }, 0 },
{ { 255 }, { 0, 25 }, 0 },
{ { 255 }, { 0, 13 }, 0 },
{ { 255 }, { 1, 1 }, 2 },
{ { 255 }, { 15, 0 }, 2 },
{ { 255 }, { 31, 0 }, 2 },
{ { 255 }, { 47, 0 }, 2 },
{ { 255 }, { 63, 0 }, 2 },
{ { 255 }, { 79, 0 }, 2 },
{ { 255 }, { 95, 0 }, 2 },
{ { 255 }, { 112, 0 }, 2 },
{ { 255 }, { 128, 0 }, 2 },
{ { 255 }, { 144, 0 }, 2 },
{ { 255 }, { 160, 0 }, 2 },
{ { 255 }, { 176, 0 }, 2 },
{ { 255 }, { 192, 0 }, 2 },
{ { 255 }, { 208, 0 }, 2 },
{ { 255 }, { 222, 1 }, 2 },
{ { 255 }, { 224, 13 }, 2 },
{ { 255 }, { 224, 25 }, 2 },
{ { 255 }, { 224, 38 }, 2 },
{ { 255 }, { 224, 50 }, 2 },
{ { 255 }, { 222, 62 }, 2 },
{ { 255 }, { 191, 64 }, 2 },
{ { 255 }, { 179, 64 }, 2 },
{ { 255 }, { 167, 64 }, 2 },
{ { 255 }, { 153, 64 }, 2 },
{ { 255 }, { 139, 64 }, 2 },
{ { 255 }, { 125, 64 }, 2 },
{ { 255 }, { 112, 64 }, 2 },
{ { 255 }, { 98, 64 }, 2 },
{ { 255 }, { 84, 64 }, 2 },
{ { 255 }, { 70, 64 }, 2 },
{ { 255 }, { 56, 64 }, 2 },
{ { 255 }, { 42, 64 }, 2 },
{ { 255 }, { 28, 64 }, 2 },
{ { 255 }, { 1, 62 }, 2 },
{ { 255 }, { 0, 50 }, 2 },
{ { 255 }, { 0, 38 }, 2 },
{ { 255 }, { 0, 25 }, 2 },
{ { 255 }, { 0, 13 }, 2 },
};
#ifdef USB_LED_INDICATOR_ENABLE

View File

@@ -95,6 +95,32 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
}
return false;
case RGB_TOG:
if (record->event.pressed) {
switch (rgb_matrix_get_flags()) {
case LED_FLAG_ALL: {
rgb_matrix_set_flags(LED_FLAG_KEYLIGHT);
rgb_matrix_set_color_all(0, 0, 0);
}
break;
case LED_FLAG_KEYLIGHT: {
rgb_matrix_set_flags(LED_FLAG_UNDERGLOW);
rgb_matrix_set_color_all(0, 0, 0);
}
break;
case LED_FLAG_UNDERGLOW: {
rgb_matrix_set_flags(LED_FLAG_NONE);
rgb_matrix_disable_noeeprom();
}
break;
default: {
rgb_matrix_set_flags(LED_FLAG_ALL);
rgb_matrix_enable_noeeprom();
}
break;
}
}
return false;
default:
return true; //Process all other keycodes normally
}

View File

@@ -95,6 +95,32 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
}
return false;
case RGB_TOG:
if (record->event.pressed) {
switch (rgb_matrix_get_flags()) {
case LED_FLAG_ALL: {
rgb_matrix_set_flags(LED_FLAG_KEYLIGHT);
rgb_matrix_set_color_all(0, 0, 0);
}
break;
case LED_FLAG_KEYLIGHT: {
rgb_matrix_set_flags(LED_FLAG_UNDERGLOW);
rgb_matrix_set_color_all(0, 0, 0);
}
break;
case LED_FLAG_UNDERGLOW: {
rgb_matrix_set_flags(LED_FLAG_NONE);
rgb_matrix_disable_noeeprom();
}
break;
default: {
rgb_matrix_set_flags(LED_FLAG_ALL);
rgb_matrix_enable_noeeprom();
}
break;
}
}
return false;
default:
return true; //Process all other keycodes normally
}

View File

@@ -95,6 +95,32 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
}
return false;
case RGB_TOG:
if (record->event.pressed) {
switch (rgb_matrix_get_flags()) {
case LED_FLAG_ALL: {
rgb_matrix_set_flags(LED_FLAG_KEYLIGHT);
rgb_matrix_set_color_all(0, 0, 0);
}
break;
case LED_FLAG_KEYLIGHT: {
rgb_matrix_set_flags(LED_FLAG_UNDERGLOW);
rgb_matrix_set_color_all(0, 0, 0);
}
break;
case LED_FLAG_UNDERGLOW: {
rgb_matrix_set_flags(LED_FLAG_NONE);
rgb_matrix_disable_noeeprom();
}
break;
default: {
rgb_matrix_set_flags(LED_FLAG_ALL);
rgb_matrix_enable_noeeprom();
}
break;
}
}
return false;
default:
return true; //Process all other keycodes normally
}

View File

@@ -123,6 +123,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_LED_PROCESS_LIMIT 15
#define RGB_MATRIX_LED_FLUSH_LIMIT 10
#define RGB_MATRIX_EXTRA_TOG
#include "config_led.h"

View File

@@ -5,133 +5,133 @@
#include "rgb_matrix.h"
#include "config_led.h"
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
// KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS
{ { 0|(0<<4) }, { 7, 5 }, 0 },
{ { 0|(1<<4) }, { 31, 5 }, 0 },
{ { 0|(2<<4) }, { 43, 5 }, 0 },
{ { 0|(3<<4) }, { 55, 5 }, 0 },
{ { 0|(4<<4) }, { 67, 5 }, 0 },
{ { 0|(5<<4) }, { 85, 5 }, 0 },
{ { 0|(6<<4) }, { 97, 5 }, 0 },
{ { 0|(7<<4) }, { 109, 5 }, 0 },
{ { 6|(0<<4) }, { 121, 5 }, 0 },
{ { 6|(1<<4) }, { 139, 5 }, 0 },
{ { 6|(2<<4) }, { 151, 5 }, 0 },
{ { 6|(3<<4) }, { 163, 5 }, 0 },
{ { 6|(4<<4) }, { 175, 5 }, 0 },
{ { 6|(5<<4) }, { 193, 5 }, 0 },
{ { 0|(0<<4) }, { 7, 5 }, 4 },
{ { 0|(1<<4) }, { 31, 5 }, 4 },
{ { 0|(2<<4) }, { 43, 5 }, 4 },
{ { 0|(3<<4) }, { 55, 5 }, 4 },
{ { 0|(4<<4) }, { 67, 5 }, 4 },
{ { 0|(5<<4) }, { 85, 5 }, 4 },
{ { 0|(6<<4) }, { 97, 5 }, 4 },
{ { 0|(7<<4) }, { 109, 5 }, 4 },
{ { 6|(0<<4) }, { 121, 5 }, 4 },
{ { 6|(1<<4) }, { 139, 5 }, 4 },
{ { 6|(2<<4) }, { 151, 5 }, 4 },
{ { 6|(3<<4) }, { 163, 5 }, 4 },
{ { 6|(4<<4) }, { 175, 5 }, 4 },
{ { 6|(5<<4) }, { 193, 5 }, 4 },
{ { 6|(6<<4) }, { 205, 5 }, 1 },
{ { 6|(7<<4) }, { 217, 5 }, 0 },
{ { 6|(7<<4) }, { 217, 5 }, 4 },
// KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP
{ { 1|(0<<4) }, { 7, 20 }, 0 },
{ { 1|(1<<4) }, { 19, 20 }, 0 },
{ { 1|(2<<4) }, { 31, 20 }, 0 },
{ { 1|(3<<4) }, { 43, 20 }, 0 },
{ { 1|(4<<4) }, { 55, 20 }, 0 },
{ { 1|(5<<4) }, { 67, 20 }, 0 },
{ { 1|(6<<4) }, { 79, 20 }, 0 },
{ { 1|(7<<4) }, { 91, 20 }, 0 },
{ { 7|(0<<4) }, { 103, 20 }, 0 },
{ { 7|(1<<4) }, { 115, 20 }, 0 },
{ { 7|(2<<4) }, { 127, 20 }, 0 },
{ { 7|(3<<4) }, { 139, 20 }, 0 },
{ { 7|(4<<4) }, { 151, 20 }, 0 },
{ { 7|(5<<4) }, { 169, 20 }, 0 },
{ { 7|(6<<4) }, { 193, 20 }, 0 },
{ { 7|(7<<4) }, { 205, 20 }, 0 },
{ { 9|(7<<4) }, { 217, 20 }, 0 },
{ { 1|(0<<4) }, { 7, 20 }, 4 },
{ { 1|(1<<4) }, { 19, 20 }, 4 },
{ { 1|(2<<4) }, { 31, 20 }, 4 },
{ { 1|(3<<4) }, { 43, 20 }, 4 },
{ { 1|(4<<4) }, { 55, 20 }, 4 },
{ { 1|(5<<4) }, { 67, 20 }, 4 },
{ { 1|(6<<4) }, { 79, 20 }, 4 },
{ { 1|(7<<4) }, { 91, 20 }, 4 },
{ { 7|(0<<4) }, { 103, 20 }, 4 },
{ { 7|(1<<4) }, { 115, 20 }, 4 },
{ { 7|(2<<4) }, { 127, 20 }, 4 },
{ { 7|(3<<4) }, { 139, 20 }, 4 },
{ { 7|(4<<4) }, { 151, 20 }, 4 },
{ { 7|(5<<4) }, { 169, 20 }, 4 },
{ { 7|(6<<4) }, { 193, 20 }, 4 },
{ { 7|(7<<4) }, { 205, 20 }, 4 },
{ { 9|(7<<4) }, { 217, 20 }, 4 },
// KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN
{ { 2|(0<<4) }, { 10, 30 }, 0 },
{ { 2|(1<<4) }, { 25, 30 }, 0 },
{ { 2|(2<<4) }, { 37, 30 }, 0 },
{ { 2|(3<<4) }, { 49, 30 }, 0 },
{ { 2|(4<<4) }, { 61, 30 }, 0 },
{ { 2|(5<<4) }, { 73, 30 }, 0 },
{ { 2|(6<<4) }, { 85, 30 }, 0 },
{ { 2|(7<<4) }, { 97, 30 }, 0 },
{ { 8|(0<<4) }, { 109, 30 }, 0 },
{ { 8|(1<<4) }, { 121, 30 }, 0 },
{ { 8|(2<<4) }, { 133, 30 }, 0 },
{ { 8|(3<<4) }, { 145, 30 }, 0 },
{ { 8|(4<<4) }, { 157, 30 }, 0 },
{ { 8|(5<<4) }, { 172, 30 }, 0 },
{ { 8|(6<<4) }, { 193, 30 }, 0 },
{ { 8|(7<<4) }, { 205, 30 }, 0 },
{ { 9|(6<<4) }, { 217, 30 }, 0 },
{ { 2|(0<<4) }, { 10, 30 }, 4 },
{ { 2|(1<<4) }, { 25, 30 }, 4 },
{ { 2|(2<<4) }, { 37, 30 }, 4 },
{ { 2|(3<<4) }, { 49, 30 }, 4 },
{ { 2|(4<<4) }, { 61, 30 }, 4 },
{ { 2|(5<<4) }, { 73, 30 }, 4 },
{ { 2|(6<<4) }, { 85, 30 }, 4 },
{ { 2|(7<<4) }, { 97, 30 }, 4 },
{ { 8|(0<<4) }, { 109, 30 }, 4 },
{ { 8|(1<<4) }, { 121, 30 }, 4 },
{ { 8|(2<<4) }, { 133, 30 }, 4 },
{ { 8|(3<<4) }, { 145, 30 }, 4 },
{ { 8|(4<<4) }, { 157, 30 }, 4 },
{ { 8|(5<<4) }, { 172, 30 }, 4 },
{ { 8|(6<<4) }, { 193, 30 }, 4 },
{ { 8|(7<<4) }, { 205, 30 }, 4 },
{ { 9|(6<<4) }, { 217, 30 }, 4 },
// KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT
{ { 3|(0<<4) }, { 11, 39 }, 1 },
{ { 3|(1<<4) }, { 28, 39 }, 0 },
{ { 3|(2<<4) }, { 40, 39 }, 0 },
{ { 3|(3<<4) }, { 52, 39 }, 0 },
{ { 3|(4<<4) }, { 64, 39 }, 0 },
{ { 3|(5<<4) }, { 76, 39 }, 0 },
{ { 3|(6<<4) }, { 88, 39 }, 0 },
{ { 3|(7<<4) }, { 100, 39 }, 0 },
{ { 9|(0<<4) }, { 112, 39 }, 0 },
{ { 9|(1<<4) }, { 124, 39 }, 0 },
{ { 9|(2<<4) }, { 136, 39 }, 0 },
{ { 9|(3<<4) }, { 148, 39 }, 0 },
{ { 9|(4<<4) }, { 168, 39 }, 0 },
{ { 3|(1<<4) }, { 28, 39 }, 4 },
{ { 3|(2<<4) }, { 40, 39 }, 4 },
{ { 3|(3<<4) }, { 52, 39 }, 4 },
{ { 3|(4<<4) }, { 64, 39 }, 4 },
{ { 3|(5<<4) }, { 76, 39 }, 4 },
{ { 3|(6<<4) }, { 88, 39 }, 4 },
{ { 3|(7<<4) }, { 100, 39 }, 4 },
{ { 9|(0<<4) }, { 112, 39 }, 4 },
{ { 9|(1<<4) }, { 124, 39 }, 4 },
{ { 9|(2<<4) }, { 136, 39 }, 4 },
{ { 9|(3<<4) }, { 148, 39 }, 4 },
{ { 9|(4<<4) }, { 168, 39 }, 4 },
// KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP
{ { 4|(0<<4) }, { 14, 49 }, 0 },
{ { 4|(1<<4) }, { 34, 49 }, 0 },
{ { 4|(2<<4) }, { 46, 49 }, 0 },
{ { 4|(3<<4) }, { 58, 49 }, 0 },
{ { 4|(4<<4) }, { 70, 49 }, 0 },
{ { 4|(5<<4) }, { 82, 49 }, 0 },
{ { 4|(6<<4) }, { 94, 49 }, 0 },
{ { 4|(7<<4) }, { 106, 49 }, 0 },
{ { 10|(0<<4) }, { 118, 49 }, 0 },
{ { 10|(1<<4) }, { 130, 49 }, 0 },
{ { 10|(2<<4) }, { 142, 49 }, 0 },
{ { 10|(3<<4) }, { 165, 49 }, 0 },
{ { 9|(5<<4) }, { 205, 49 }, 0 },
{ { 4|(0<<4) }, { 14, 49 }, 4 },
{ { 4|(1<<4) }, { 34, 49 }, 4 },
{ { 4|(2<<4) }, { 46, 49 }, 4 },
{ { 4|(3<<4) }, { 58, 49 }, 4 },
{ { 4|(4<<4) }, { 70, 49 }, 4 },
{ { 4|(5<<4) }, { 82, 49 }, 4 },
{ { 4|(6<<4) }, { 94, 49 }, 4 },
{ { 4|(7<<4) }, { 106, 49 }, 4 },
{ { 10|(0<<4) }, { 118, 49 }, 4 },
{ { 10|(1<<4) }, { 130, 49 }, 4 },
{ { 10|(2<<4) }, { 142, 49 }, 4 },
{ { 10|(3<<4) }, { 165, 49 }, 4 },
{ { 9|(5<<4) }, { 205, 49 }, 4 },
// KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
{ { 5|(0<<4) }, { 8, 59 }, 0 },
{ { 5|(1<<4) }, { 23, 59 }, 0 },
{ { 5|(2<<4) }, { 38, 59 }, 0 },
{ { 5|(3<<4) }, { 83, 59 }, 0 },
{ { 5|(4<<4) }, { 129, 59 }, 0 },
{ { 5|(5<<4) }, { 144, 59 }, 0 },
{ { 5|(6<<4) }, { 159, 59 }, 0 },
{ { 5|(7<<4) }, { 174, 59 }, 0 },
{ { 10|(4<<4) }, { 193, 59 }, 0 },
{ { 10|(5<<4) }, { 205, 59 }, 0 },
{ { 10|(6<<4) }, { 217, 59 }, 0 },
{ { 5|(0<<4) }, { 8, 59 }, 4 },
{ { 5|(1<<4) }, { 23, 59 }, 4 },
{ { 5|(2<<4) }, { 38, 59 }, 4 },
{ { 5|(3<<4) }, { 83, 59 }, 4 },
{ { 5|(4<<4) }, { 129, 59 }, 4 },
{ { 5|(5<<4) }, { 144, 59 }, 4 },
{ { 5|(6<<4) }, { 159, 59 }, 4 },
{ { 5|(7<<4) }, { 174, 59 }, 4 },
{ { 10|(4<<4) }, { 193, 59 }, 4 },
{ { 10|(5<<4) }, { 205, 59 }, 4 },
{ { 10|(6<<4) }, { 217, 59 }, 4 },
// Underglow / Border
{ { 0xFF }, { 222, 64 }, 0 },
{ { 0xFF }, { 204, 64 }, 0 },
{ { 0xFF }, { 186, 64 }, 0 },
{ { 0xFF }, { 167, 64 }, 0 },
{ { 0xFF }, { 149, 64 }, 0 },
{ { 0xFF }, { 130, 64 }, 0 },
{ { 0xFF }, { 112, 64 }, 0 },
{ { 0xFF }, { 94, 64 }, 0 },
{ { 0xFF }, { 75, 64 }, 0 },
{ { 0xFF }, { 57, 64 }, 0 },
{ { 0xFF }, { 38, 64 }, 0 },
{ { 0xFF }, { 20, 64 }, 0 },
{ { 0xFF }, { 0, 64 }, 0 },
{ { 0xFF }, { 0, 47 }, 0 },
{ { 0xFF }, { 0, 32 }, 0 },
{ { 0xFF }, { 0, 17 }, 0 },
{ { 0xFF }, { 0, 0 }, 0 },
{ { 0xFF }, { 20, 0 }, 0 },
{ { 0xFF }, { 38, 0 }, 0 },
{ { 0xFF }, { 57, 0 }, 0 },
{ { 0xFF }, { 75, 0 }, 0 },
{ { 0xFF }, { 94, 0 }, 0 },
{ { 0xFF }, { 112, 0 }, 0 },
{ { 0xFF }, { 130, 0 }, 0 },
{ { 0xFF }, { 149, 0 }, 0 },
{ { 0xFF }, { 167, 0 }, 0 },
{ { 0xFF }, { 186, 0 }, 0 },
{ { 0xFF }, { 204, 0 }, 0 },
{ { 0xFF }, { 222, 1 }, 0 },
{ { 0xFF }, { 224, 17 }, 0 },
{ { 0xFF }, { 224, 32 }, 0 },
{ { 0xFF }, { 224, 47 }, 0 },
{ { 0xFF }, { 222, 64 }, 2 },
{ { 0xFF }, { 204, 64 }, 2 },
{ { 0xFF }, { 186, 64 }, 2 },
{ { 0xFF }, { 167, 64 }, 2 },
{ { 0xFF }, { 149, 64 }, 2 },
{ { 0xFF }, { 130, 64 }, 2 },
{ { 0xFF }, { 112, 64 }, 2 },
{ { 0xFF }, { 94, 64 }, 2 },
{ { 0xFF }, { 75, 64 }, 2 },
{ { 0xFF }, { 57, 64 }, 2 },
{ { 0xFF }, { 38, 64 }, 2 },
{ { 0xFF }, { 20, 64 }, 2 },
{ { 0xFF }, { 0, 64 }, 2 },
{ { 0xFF }, { 0, 47 }, 2 },
{ { 0xFF }, { 0, 32 }, 2 },
{ { 0xFF }, { 0, 17 }, 2 },
{ { 0xFF }, { 0, 0 }, 2 },
{ { 0xFF }, { 20, 0 }, 2 },
{ { 0xFF }, { 38, 0 }, 2 },
{ { 0xFF }, { 57, 0 }, 2 },
{ { 0xFF }, { 75, 0 }, 2 },
{ { 0xFF }, { 94, 0 }, 2 },
{ { 0xFF }, { 112, 0 }, 2 },
{ { 0xFF }, { 130, 0 }, 2 },
{ { 0xFF }, { 149, 0 }, 2 },
{ { 0xFF }, { 167, 0 }, 2 },
{ { 0xFF }, { 186, 0 }, 2 },
{ { 0xFF }, { 204, 0 }, 2 },
{ { 0xFF }, { 222, 1 }, 2 },
{ { 0xFF }, { 224, 17 }, 2 },
{ { 0xFF }, { 224, 32 }, 2 },
{ { 0xFF }, { 224, 47 }, 2 },
};
#ifdef USB_LED_INDICATOR_ENABLE

View File

@@ -98,6 +98,32 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
}
return false;
case RGB_TOG:
if (record->event.pressed) {
switch (rgb_matrix_get_flags()) {
case LED_FLAG_ALL: {
rgb_matrix_set_flags(LED_FLAG_KEYLIGHT);
rgb_matrix_set_color_all(0, 0, 0);
}
break;
case LED_FLAG_KEYLIGHT: {
rgb_matrix_set_flags(LED_FLAG_UNDERGLOW);
rgb_matrix_set_color_all(0, 0, 0);
}
break;
case LED_FLAG_UNDERGLOW: {
rgb_matrix_set_flags(LED_FLAG_NONE);
rgb_matrix_disable_noeeprom();
}
break;
default: {
rgb_matrix_set_flags(LED_FLAG_ALL);
rgb_matrix_enable_noeeprom();
}
break;
}
}
return false;
default:
return true; //Process all other keycodes normally
}

View File

@@ -98,6 +98,32 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
}
return false;
case RGB_TOG:
if (record->event.pressed) {
switch (rgb_matrix_get_flags()) {
case LED_FLAG_ALL: {
rgb_matrix_set_flags(LED_FLAG_KEYLIGHT);
rgb_matrix_set_color_all(0, 0, 0);
}
break;
case LED_FLAG_KEYLIGHT: {
rgb_matrix_set_flags(LED_FLAG_UNDERGLOW);
rgb_matrix_set_color_all(0, 0, 0);
}
break;
case LED_FLAG_UNDERGLOW: {
rgb_matrix_set_flags(LED_FLAG_NONE);
rgb_matrix_disable_noeeprom();
}
break;
default: {
rgb_matrix_set_flags(LED_FLAG_ALL);
rgb_matrix_enable_noeeprom();
}
break;
}
}
return false;
default:
return true; //Process all other keycodes normally
}

View File

@@ -46,34 +46,34 @@ void set_led_to(int led, uint8_t r, uint8_t g, uint8_t b) {
#ifdef RGB_MATRIX_ENABLE
__attribute__ ((weak))
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{0x73}, { 3, 35}, 0},
{{0x72}, { 0, 26}, 0},
{{0x71}, { 0, 17}, 0},
{{0x70}, { 0, 6}, 0},
{{0x60}, { 14, 5}, 0},
{{0x61}, { 15, 16}, 0},
{{0x62}, { 16, 25}, 0},
{{0x63}, { 17, 34}, 0},
{{0x53}, { 31, 29}, 0},
{{0x52}, { 31, 19}, 0},
{{0x51}, { 30, 11}, 0},
{{0x50}, { 30, 1}, 0},
{{0x40}, { 45, 0}, 0},
{{0x41}, { 45, 8}, 0},
{{0x42}, { 46, 17}, 0},
{{0x43}, { 46, 27}, 0},
{{0x33}, { 60, 27}, 0},
{{0x32}, { 60, 18}, 0},
{{0x31}, { 60, 9}, 0},
{{0x30}, { 60, 0}, 0},
{{0x20}, { 74, 2}, 0},
{{0x21}, { 74, 11}, 0},
{{0x22}, { 75, 20}, 0},
{{0x23}, { 74, 28}, 0},
{{0x12}, { 89, 30}, 0},
{{0x11}, { 89, 19}, 0},
{{0x10}, { 89, 7}, 0},
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{0x73}, { 3, 35}, 4},
{{0x72}, { 0, 26}, 4},
{{0x71}, { 0, 17}, 4},
{{0x70}, { 0, 6}, 4},
{{0x60}, { 14, 5}, 4},
{{0x61}, { 15, 16}, 4},
{{0x62}, { 16, 25}, 4},
{{0x63}, { 17, 34}, 4},
{{0x53}, { 31, 29}, 4},
{{0x52}, { 31, 19}, 4},
{{0x51}, { 30, 11}, 4},
{{0x50}, { 30, 1}, 4},
{{0x40}, { 45, 0}, 4},
{{0x41}, { 45, 8}, 4},
{{0x42}, { 46, 17}, 4},
{{0x43}, { 46, 27}, 4},
{{0x33}, { 60, 27}, 4},
{{0x32}, { 60, 18}, 4},
{{0x31}, { 60, 9}, 4},
{{0x30}, { 60, 0}, 4},
{{0x20}, { 74, 2}, 4},
{{0x21}, { 74, 11}, 4},
{{0x22}, { 75, 20}, 4},
{{0x23}, { 74, 28}, 4},
{{0x12}, { 89, 30}, 4},
{{0x11}, { 89, 19}, 4},
{{0x10}, { 89, 7}, 4},
{{0x00}, { 70, 38}, 1},
{{0x01}, { 82, 41}, 1},
{{0x02}, { 93, 45}, 1},
@@ -84,33 +84,33 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{0x76}, {130, 45}, 1},
{{0x75}, {141, 41}, 1},
{{0x74}, {153, 38}, 1},
{{0x64}, {134, 7}, 0},
{{0x65}, {134, 19}, 0},
{{0x66}, {134, 30}, 0},
{{0x57}, {149, 28}, 0},
{{0x56}, {148, 20}, 0},
{{0x55}, {149, 11}, 0},
{{0x54}, {149, 2}, 0},
{{0x44}, {163, 0}, 0},
{{0x45}, {163, 9}, 0},
{{0x46}, {163, 18}, 0},
{{0x47}, {163, 27}, 0},
{{0x37}, {177, 27}, 0},
{{0x36}, {177, 17}, 0},
{{0x35}, {178, 8}, 0},
{{0x34}, {178, 0}, 0},
{{0x24}, {193, 1}, 0},
{{0x25}, {193, 11}, 0},
{{0x26}, {192, 19}, 0},
{{0x27}, {192, 29}, 0},
{{0x17}, {206, 34}, 0},
{{0x16}, {207, 25}, 0},
{{0x15}, {208, 16}, 0},
{{0x14}, {209, 5}, 0},
{{0x04}, {224, 6}, 0},
{{0x05}, {223, 17}, 0},
{{0x06}, {223, 26}, 0},
{{0x07}, {220, 35}, 0},
{{0x64}, {134, 7}, 4},
{{0x65}, {134, 19}, 4},
{{0x66}, {134, 30}, 4},
{{0x57}, {149, 28}, 4},
{{0x56}, {148, 20}, 4},
{{0x55}, {149, 11}, 4},
{{0x54}, {149, 2}, 4},
{{0x44}, {163, 0}, 4},
{{0x45}, {163, 9}, 4},
{{0x46}, {163, 18}, 4},
{{0x47}, {163, 27}, 4},
{{0x37}, {177, 27}, 4},
{{0x36}, {177, 17}, 4},
{{0x35}, {178, 8}, 4},
{{0x34}, {178, 0}, 4},
{{0x24}, {193, 1}, 4},
{{0x25}, {193, 11}, 4},
{{0x26}, {192, 19}, 4},
{{0x27}, {192, 29}, 4},
{{0x17}, {206, 34}, 4},
{{0x16}, {207, 25}, 4},
{{0x15}, {208, 16}, 4},
{{0x14}, {209, 5}, 4},
{{0x04}, {224, 6}, 4},
{{0x05}, {223, 17}, 4},
{{0x06}, {223, 26}, 4},
{{0x07}, {220, 35}, 4},
};
static struct {

View File

@@ -79,49 +79,49 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
};
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
/*{row | col << 4}
| {x=0..224, y=0..64}
| | modifier
| | flags
| | | */
{{0|(0<<4)}, {20.36*0, 21.33*0}, 1},
{{0|(1<<4)}, {20.36*1, 21.33*0}, 0},
{{0|(2<<4)}, {20.36*2, 21.33*0}, 0},
{{0|(3<<4)}, {20.36*3, 21.33*0}, 0},
{{0|(4<<4)}, {20.36*4, 21.33*0}, 0},
{{0|(5<<4)}, {20.36*5, 21.33*0}, 0},
{{4|(0<<4)}, {20.36*6, 21.33*0}, 0},
{{4|(1<<4)}, {20.36*7, 21.33*0}, 0},
{{4|(2<<4)}, {20.36*8, 21.33*0}, 0},
{{4|(3<<4)}, {20.36*9, 21.33*0}, 0},
{{4|(4<<4)}, {20.36*10,21.33*0}, 0},
{{0|(1<<4)}, {20.36*1, 21.33*0}, 4},
{{0|(2<<4)}, {20.36*2, 21.33*0}, 4},
{{0|(3<<4)}, {20.36*3, 21.33*0}, 4},
{{0|(4<<4)}, {20.36*4, 21.33*0}, 4},
{{0|(5<<4)}, {20.36*5, 21.33*0}, 4},
{{4|(0<<4)}, {20.36*6, 21.33*0}, 4},
{{4|(1<<4)}, {20.36*7, 21.33*0}, 4},
{{4|(2<<4)}, {20.36*8, 21.33*0}, 4},
{{4|(3<<4)}, {20.36*9, 21.33*0}, 4},
{{4|(4<<4)}, {20.36*10,21.33*0}, 4},
{{4|(5<<4)}, {20.36*11,21.33*0}, 1},
{{1|(0<<4)}, {20.36*0, 21.33*1}, 1},
{{1|(1<<4)}, {20.36*1, 21.33*1}, 0},
{{1|(2<<4)}, {20.36*2, 21.33*1}, 0},
{{1|(3<<4)}, {20.36*3, 21.33*1}, 0},
{{1|(4<<4)}, {20.36*4, 21.33*1}, 0},
{{1|(5<<4)}, {20.36*5, 21.33*1}, 0},
{{5|(0<<4)}, {20.36*6, 21.33*1}, 0},
{{5|(1<<4)}, {20.36*7, 21.33*1}, 0},
{{5|(2<<4)}, {20.36*8, 21.33*1}, 0},
{{5|(3<<4)}, {20.36*9, 21.33*1}, 0},
{{5|(4<<4)}, {20.36*10,21.33*1}, 0},
{{1|(1<<4)}, {20.36*1, 21.33*1}, 4},
{{1|(2<<4)}, {20.36*2, 21.33*1}, 4},
{{1|(3<<4)}, {20.36*3, 21.33*1}, 4},
{{1|(4<<4)}, {20.36*4, 21.33*1}, 4},
{{1|(5<<4)}, {20.36*5, 21.33*1}, 4},
{{5|(0<<4)}, {20.36*6, 21.33*1}, 4},
{{5|(1<<4)}, {20.36*7, 21.33*1}, 4},
{{5|(2<<4)}, {20.36*8, 21.33*1}, 4},
{{5|(3<<4)}, {20.36*9, 21.33*1}, 4},
{{5|(4<<4)}, {20.36*10,21.33*1}, 4},
{{5|(5<<4)}, {20.36*11,21.33*1}, 1},
{{2|(0<<4)}, {20.36*0, 21.33*2}, 1},
{{2|(1<<4)}, {20.36*1, 21.33*2}, 0},
{{2|(2<<4)}, {20.36*2, 21.33*2}, 0},
{{2|(3<<4)}, {20.36*3, 21.33*2}, 0},
{{2|(4<<4)}, {20.36*4, 21.33*2}, 0},
{{2|(5<<4)}, {20.36*5, 21.33*2}, 0},
{{6|(0<<4)}, {20.36*6, 21.33*2}, 0},
{{6|(1<<4)}, {20.36*7, 21.33*2}, 0},
{{6|(2<<4)}, {20.36*8, 21.33*2}, 0},
{{6|(3<<4)}, {20.36*9, 21.33*2}, 0},
{{6|(4<<4)}, {20.36*10,21.33*2}, 0},
{{2|(1<<4)}, {20.36*1, 21.33*2}, 4},
{{2|(2<<4)}, {20.36*2, 21.33*2}, 4},
{{2|(3<<4)}, {20.36*3, 21.33*2}, 4},
{{2|(4<<4)}, {20.36*4, 21.33*2}, 4},
{{2|(5<<4)}, {20.36*5, 21.33*2}, 4},
{{6|(0<<4)}, {20.36*6, 21.33*2}, 4},
{{6|(1<<4)}, {20.36*7, 21.33*2}, 4},
{{6|(2<<4)}, {20.36*8, 21.33*2}, 4},
{{6|(3<<4)}, {20.36*9, 21.33*2}, 4},
{{6|(4<<4)}, {20.36*10,21.33*2}, 4},
{{6|(5<<4)}, {20.36*11,21.33*2}, 1},
{{3|(0<<4)}, {20.36*0, 21.33*3}, 1},
@@ -129,7 +129,7 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{3|(2<<4)}, {20.36*2, 21.33*3}, 1},
{{7|(3<<4)}, {20.36*3, 21.33*3}, 1},
{{7|(4<<4)}, {20.36*4, 21.33*3}, 1},
{{7|(5<<4)}, {20.36*5.5,21.33*3}, 0},
{{7|(5<<4)}, {20.36*5.5,21.33*3}, 4},
{{7|(0<<4)}, {20.36*7, 21.33*3}, 1},
{{7|(1<<4)}, {20.36*8, 21.33*3}, 1},
{{7|(2<<4)}, {20.36*9, 21.33*3}, 1},

View File

@@ -231,7 +231,7 @@ void rgb_matrix_indicators_user(void) {
case _RAISE:
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
led = g_rgb_leds[i];
if ( led.modifier ) {
if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
rgb_matrix_set_color(i, 0x6B, 0x00, 0x80);
} else {
rgb_matrix_set_color(i, 0x00, 0xFF, 0x00);
@@ -242,7 +242,7 @@ void rgb_matrix_indicators_user(void) {
case _LOWER:
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
led = g_rgb_leds[i];
if ( led.modifier ) {
if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
rgb_matrix_set_color(i, 0xFF, 0xA5, 0x00);
} else {
rgb_matrix_set_color(i, 0x00, 0x67, 0xC7);

View File

@@ -77,49 +77,49 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{1, C9_14, C8_14, C7_14}
};
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
/*{row | col << 4}
| {x=0..224, y=0..64}
| | modifier
| | flags
| | | */
{{0|(0<<4)}, {20.36*0, 21.33*0}, 1},
{{0|(1<<4)}, {20.36*1, 21.33*0}, 0},
{{0|(2<<4)}, {20.36*2, 21.33*0}, 0},
{{0|(3<<4)}, {20.36*3, 21.33*0}, 0},
{{0|(4<<4)}, {20.36*4, 21.33*0}, 0},
{{0|(5<<4)}, {20.36*5, 21.33*0}, 0},
{{0|(6<<4)}, {20.36*6, 21.33*0}, 0},
{{0|(7<<4)}, {20.36*7, 21.33*0}, 0},
{{0|(8<<4)}, {20.36*8, 21.33*0}, 0},
{{0|(9<<4)}, {20.36*9, 21.33*0}, 0},
{{0|(10<<4)}, {20.36*10,21.33*0}, 0},
{{0|(1<<4)}, {20.36*1, 21.33*0}, 4},
{{0|(2<<4)}, {20.36*2, 21.33*0}, 4},
{{0|(3<<4)}, {20.36*3, 21.33*0}, 4},
{{0|(4<<4)}, {20.36*4, 21.33*0}, 4},
{{0|(5<<4)}, {20.36*5, 21.33*0}, 4},
{{0|(6<<4)}, {20.36*6, 21.33*0}, 4},
{{0|(7<<4)}, {20.36*7, 21.33*0}, 4},
{{0|(8<<4)}, {20.36*8, 21.33*0}, 4},
{{0|(9<<4)}, {20.36*9, 21.33*0}, 4},
{{0|(10<<4)}, {20.36*10,21.33*0}, 4},
{{0|(11<<4)}, {20.36*11,21.33*0}, 1},
{{1|(0<<4)}, {20.36*0, 21.33*1}, 1},
{{1|(1<<4)}, {20.36*1, 21.33*1}, 0},
{{1|(2<<4)}, {20.36*2, 21.33*1}, 0},
{{1|(3<<4)}, {20.36*3, 21.33*1}, 0},
{{1|(4<<4)}, {20.36*4, 21.33*1}, 0},
{{1|(5<<4)}, {20.36*5, 21.33*1}, 0},
{{1|(6<<4)}, {20.36*6, 21.33*1}, 0},
{{1|(7<<4)}, {20.36*7, 21.33*1}, 0},
{{1|(8<<4)}, {20.36*8, 21.33*1}, 0},
{{1|(9<<4)}, {20.36*9, 21.33*1}, 0},
{{1|(10<<4)}, {20.36*10,21.33*1}, 0},
{{1|(1<<4)}, {20.36*1, 21.33*1}, 4},
{{1|(2<<4)}, {20.36*2, 21.33*1}, 4},
{{1|(3<<4)}, {20.36*3, 21.33*1}, 4},
{{1|(4<<4)}, {20.36*4, 21.33*1}, 4},
{{1|(5<<4)}, {20.36*5, 21.33*1}, 4},
{{1|(6<<4)}, {20.36*6, 21.33*1}, 4},
{{1|(7<<4)}, {20.36*7, 21.33*1}, 4},
{{1|(8<<4)}, {20.36*8, 21.33*1}, 4},
{{1|(9<<4)}, {20.36*9, 21.33*1}, 4},
{{1|(10<<4)}, {20.36*10,21.33*1}, 4},
{{1|(11<<4)}, {20.36*11,21.33*1}, 1},
{{2|(0<<4)}, {20.36*0, 21.33*2}, 1},
{{2|(1<<4)}, {20.36*1, 21.33*2}, 0},
{{2|(2<<4)}, {20.36*2, 21.33*2}, 0},
{{2|(3<<4)}, {20.36*3, 21.33*2}, 0},
{{2|(4<<4)}, {20.36*4, 21.33*2}, 0},
{{2|(5<<4)}, {20.36*5, 21.33*2}, 0},
{{2|(6<<4)}, {20.36*6, 21.33*2}, 0},
{{2|(7<<4)}, {20.36*7, 21.33*2}, 0},
{{2|(8<<4)}, {20.36*8, 21.33*2}, 0},
{{2|(9<<4)}, {20.36*9, 21.33*2}, 0},
{{2|(10<<4)}, {20.36*10,21.33*2}, 0},
{{2|(1<<4)}, {20.36*1, 21.33*2}, 4},
{{2|(2<<4)}, {20.36*2, 21.33*2}, 4},
{{2|(3<<4)}, {20.36*3, 21.33*2}, 4},
{{2|(4<<4)}, {20.36*4, 21.33*2}, 4},
{{2|(5<<4)}, {20.36*5, 21.33*2}, 4},
{{2|(6<<4)}, {20.36*6, 21.33*2}, 4},
{{2|(7<<4)}, {20.36*7, 21.33*2}, 4},
{{2|(8<<4)}, {20.36*8, 21.33*2}, 4},
{{2|(9<<4)}, {20.36*9, 21.33*2}, 4},
{{2|(10<<4)}, {20.36*10,21.33*2}, 4},
{{2|(11<<4)}, {20.36*11,21.33*2}, 1},
{{3|(0<<4)}, {20.36*0, 21.33*3}, 1},
@@ -127,9 +127,9 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{3|(2<<4)}, {20.36*2, 21.33*3}, 1},
{{3|(3<<4)}, {20.36*3, 21.33*3}, 1},
{{3|(4<<4)}, {20.36*4, 21.33*3}, 1},
{{3|(5<<4)}, {20.36*5, 21.33*3}, 0},
{{3|(5<<4)}, {20.36*5.5,21.33*3}, 0},
{{3|(6<<4)}, {20.36*6, 21.33*3}, 0},
{{3|(5<<4)}, {20.36*5, 21.33*3}, 4},
{{3|(5<<4)}, {20.36*5.5,21.33*3}, 4},
{{3|(6<<4)}, {20.36*6, 21.33*3}, 4},
{{3|(7<<4)}, {20.36*7, 21.33*3}, 1},
{{3|(8<<4)}, {20.36*8, 21.33*3}, 1},
{{3|(9<<4)}, {20.36*9, 21.33*3}, 1},

View File

@@ -2,74 +2,64 @@
"keyboard_name": "Signum 3.0",
"url": "http://troyfletcher.net/",
"maintainer": "jceb",
"width": 17,
"height": 8,
"width": 15,
"height": 6,
"layouts": {
"LAYOUT_ortho_4x12": {
"key_count": 48,
"layout": [
{ "x": 1.25, "y": 0.75, "r": 15 },
{ "x": 1.25, "y": 1.75, "r": 15 },
{ "x": 1.25, "y": 2.75, "r": 15 },
{ "x": 1.25, "y": 4.25, "r": 15 },
{ "x": 0, "y": 0.5, "r": 15 },
{ "x": 1, "y": 0.5, "r": 15 },
{ "x": 2, "y": 0.25, "r": 15 },
{ "x": 3, "y": 0, "r": 15 },
{ "x": 4, "y": 0.25, "r": 15 },
{ "x": 5, "y": 0.5, "r": 15 },
{ "x": 9, "y": 0.5, "r": -15 },
{ "x": 10, "y": 0.25, "r": -15 },
{ "x": 11, "y": 0, "r": -15 },
{ "x": 12, "y": 0.25, "r": -15 },
{ "x": 13, "y": 0.5, "r": -15 },
{ "x": 14, "y": 0.5, "r": -15 },
{ "x": 2.25, "y": 0.75, "r": 15 },
{ "x": 2.25, "y": 1.75, "r": 15 },
{ "x": 2.25, "y": 2.75, "r": 15 },
{ "x": 2.25, "y": 3.75, "r": 15 },
{ "x": 0, "y": 1.5, "r": 15 },
{ "x": 1, "y": 1.5, "r": 15 },
{ "x": 2, "y": 1.25, "r": 15 },
{ "x": 3, "y": 1, "r": 15 },
{ "x": 4, "y": 1.25, "r": 15 },
{ "x": 5, "y": 1.5, "r": 15 },
{ "x": 9, "y": 1.5, "r": -15 },
{ "x": 10, "y": 1.25, "r": -15 },
{ "x": 11, "y": 1, "r": -15 },
{ "x": 12, "y": 1.25, "r": -15 },
{ "x": 13, "y": 1.5, "r": -15 },
{ "x": 14, "y": 1.5, "r": -15 },
{ "x": 3.25, "y": 0.5, "r": 15 },
{ "x": 3.25, "y": 1.5, "r": 15 },
{ "x": 3.25, "y": 2.5, "r": 15 },
{ "x": 3.25, "y": 3.5, "r": 15 },
{ "x": 0, "y": 2.5, "r": 15 },
{ "x": 1, "y": 2.5, "r": 15 },
{ "x": 2, "y": 2.25, "r": 15 },
{ "x": 3, "y": 2, "r": 15 },
{ "x": 4, "y": 2.25, "r": 15 },
{ "x": 5, "y": 2.5, "r": 15 },
{ "x": 9, "y": 2.5, "r": -15 },
{ "x": 10, "y": 2.25, "r": -15 },
{ "x": 11, "y": 2, "r": -15 },
{ "x": 12, "y": 2.25, "r": -15 },
{ "x": 13, "y": 2.5, "r": -15 },
{ "x": 14, "y": 2.5, "r": -15 },
{ "x": 4.25, "y": 0.25, "r": 15 },
{ "x": 4.25, "y": 1.25, "r": 15 },
{ "x": 4.25, "y": 2.25, "r": 15 },
{ "x": 5.25, "y": 0.5, "r": 15 },
{ "x": 5.25, "y": 1.5, "r": 15 },
{ "x": 5.25, "y": 2.5, "r": 15 },
{ "x": 5.25, "y": 4.5, "r": 15, "h": 1.5 },
{ "x": 6.25, "y": 0.75, "r": 15 },
{ "x": 6.25, "y": 1.75, "r": 15 },
{ "x": 6.25, "y": 2.75, "r": 15 },
{ "x": 6.25, "y": 4.25, "r": 15, "h": 2 },
{ "x": 7.25, "y": 4.5, "r": 15, "h": 1.5 },
{ "x": 8.25, "y": 4.5, "r": -15, "h": 1.5 },
{ "x": 9.25, "y": 0.75, "r": -15 },
{ "x": 9.25, "y": 1.75, "r": -15 },
{ "x": 9.25, "y": 2.75, "r": -15 },
{ "x": 9.25, "y": 4.25, "r": -15, "h": 2 },
{ "x": 10.25, "y": 0.5, "r": -15 },
{ "x": 10.25, "y": 1.5, "r": -15 },
{ "x": 10.25, "y": 2.5, "r": -15 },
{ "x": 10.25, "y": 4.5, "r": -15, "h": 1.5 },
{ "x": 11.25, "y": 0.25, "r": -15 },
{ "x": 11.25, "y": 1.25, "r": -15 },
{ "x": 11.25, "y": 2.25, "r": -15 },
{ "x": 12.25, "y": 0.5, "r": -15 },
{ "x": 12.25, "y": 1.5, "r": -15 },
{ "x": 12.25, "y": 2.5, "r": -15 },
{ "x": 12.25, "y": 3.5, "r": -15 },
{ "x": 13.25, "y": 0.75, "r": -15 },
{ "x": 13.25, "y": 1.75, "r": -15 },
{ "x": 13.25, "y": 2.75, "r": -15 },
{ "x": 13.25, "y": 3.75, "r": -15 },
{ "x": 14.25, "y": 0.75, "r": -15 },
{ "x": 14.25, "y": 1.75, "r": -15 },
{ "x": 14.25, "y": 2.75, "r": -15 },
{ "x": 14.25, "y": 4.25, "r": -15 }
{ "x": 0, "y": 4, "r": 15 },
{ "x": 1, "y": 3.5, "r": 15 },
{ "x": 2, "y": 3.25, "r": 15 },
{ "x": 4, "y": 4.25, "r": 15, "h": 1.5 },
{ "x": 5, "y": 4, "r": 15, "h": 2 },
{ "x": 6, "y": 4.25, "r": 15, "h": 1.5 },
{ "x": 8, "y": 4.25, "r": -15, "h": 1.5 },
{ "x": 9, "y": 4, "r": -15, "h": 2 },
{ "x": 10, "y": 4.25, "r": -15, "h": 1.5 },
{ "x": 12, "y": 3.25, "r": -15 },
{ "x": 13, "y": 3.5, "r": -15 },
{ "x": 14, "y": 4, "r": -15 }
]
}

View File

@@ -1,7 +1,6 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from sortedcontainers import SortedDict
import layout
import re
@@ -11,7 +10,7 @@ import re
def gen_uc_iter():
length = len(layout.uc_dict)
for key, value in layout.uc_dict.items():
for key, value in sorted(layout.uc_dict.items()):
length -= 1
if length:
yield (key, value, False)

View File

@@ -1,11 +1,9 @@
from sortedcontainers import SortedDict
# Add all used Unicode symbols to this list.
# The key (e.g. "SNEK") is used in keymap.c for "enum", "unicode_map" and "keymaps", so it needs to be a valid C variable name.
# The key is also used in this file to define the layout, so use recognizeable names.
# The value (e.g. "0x1f40d") is used in keymap.c for "unicode_map" and to automatically generate the "ASCII"-art comments.
# When adding new Unicode names, use "0x1f40d" until you looked up the correct Unicode code point.
uc_dict = SortedDict({
uc_dict = {
"SNEK": "0x1f40d", ## Error
## qwertz
"ACUTE": "0x00b4",
@@ -329,7 +327,7 @@ uc_dict = SortedDict({
"NOT_PARA": "0x2226",
"TIMES_OP": "0x2297",
"NOT_DIV": "0x2224"
})
}
# Add all used Keycodes to this list.
# The key (e.g. "a") is used in keymap.c to automatically generate the comments. The first 7 chars will show as a keycap legend.

View File

@@ -11,10 +11,6 @@ starting point to create your own layouts for the Signum 3.0 with
# Customization
- Install `python3` and [Sorted Containers
Library](http://www.grantjenks.com/docs/sortedcontainers/), `pip
install sortedcontainers`.
- Customize `layout.py` to your liking.
- Attention 1: keycodes are either translated into symbols and
function calls via the `translate()` function in `generate_km.py`

View File

@@ -1,35 +1,35 @@
#include "sol.h"
#ifdef RGB_MATRIX_ENABLE
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
// Left Hand Mapped Left to Right
{ { 0 | (0 << 4) }, { 0, 0 }, 1},
{ { 0 | (1 << 4) }, { 22, 0 }, 0},
{ { 0 | (2 << 4) }, { 37, 0 }, 0},
{ { 0 | (3 << 4) }, { 37, 0 }, 0},
{ { 0 | (4 << 4) }, { 67, 0 }, 0},
{ { 0 | (5 << 4) }, { 82, 0 }, 0},
{ { 0 | (1 << 4) }, { 22, 0 }, 4},
{ { 0 | (2 << 4) }, { 37, 0 }, 4},
{ { 0 | (3 << 4) }, { 37, 0 }, 4},
{ { 0 | (4 << 4) }, { 67, 0 }, 4},
{ { 0 | (5 << 4) }, { 82, 0 }, 4},
{ { 0 | (6 << 4) }, { 104, 0 }, 1},
{ { 1 | (0 << 4) }, { 0, 16 }, 1},
{ { 1 | (1 << 4) }, { 22, 16 }, 0},
{ { 1 | (2 << 4) }, { 37, 16 }, 0},
{ { 1 | (3 << 4) }, { 37, 16 }, 0},
{ { 1 | (4 << 4) }, { 67, 16 }, 0},
{ { 1 | (5 << 4) }, { 82, 16 }, 0},
{ { 1 | (1 << 4) }, { 22, 16 }, 4},
{ { 1 | (2 << 4) }, { 37, 16 }, 4},
{ { 1 | (3 << 4) }, { 37, 16 }, 4},
{ { 1 | (4 << 4) }, { 67, 16 }, 4},
{ { 1 | (5 << 4) }, { 82, 16 }, 4},
{ { 1 | (6 << 4) }, { 104, 16 }, 1},
{ { 2 | (0 << 4) }, { 0, 32 }, 1},
{ { 2 | (1 << 4) }, { 22, 32 }, 0},
{ { 2 | (2 << 4) }, { 37, 32 }, 0},
{ { 2 | (3 << 4) }, { 37, 32 }, 0},
{ { 2 | (4 << 4) }, { 67, 32 }, 0},
{ { 2 | (5 << 4) }, { 82, 32 }, 0},
{ { 2 | (1 << 4) }, { 22, 32 }, 4},
{ { 2 | (2 << 4) }, { 37, 32 }, 4},
{ { 2 | (3 << 4) }, { 37, 32 }, 4},
{ { 2 | (4 << 4) }, { 67, 32 }, 4},
{ { 2 | (5 << 4) }, { 82, 32 }, 4},
{ { 2 | (6 << 4) }, { 104, 32 }, 1},
{ { 3 | (0 << 4) }, { 0, 48 }, 1},
{ { 3 | (1 << 4) }, { 22, 48 }, 0},
{ { 3 | (2 << 4) }, { 37, 48 }, 0},
{ { 3 | (3 << 4) }, { 37, 48 }, 0},
{ { 3 | (4 << 4) }, { 67, 48 }, 0},
{ { 3 | (5 << 4) }, { 82, 48 }, 0},
{ { 3 | (1 << 4) }, { 22, 48 }, 4},
{ { 3 | (2 << 4) }, { 37, 48 }, 4},
{ { 3 | (3 << 4) }, { 37, 48 }, 4},
{ { 3 | (4 << 4) }, { 67, 48 }, 4},
{ { 3 | (5 << 4) }, { 82, 48 }, 4},
{ { 3 | (6 << 4) }, { 104, 48 }, 1},
{ { 4 | (0 << 4) }, { 0, 64 }, 1},
{ { 4 | (1 << 4) }, { 22, 64 }, 1},
@@ -42,32 +42,32 @@
{ { 5 | (6 << 4) }, { 97, 55 }, 1},
// Left Hand Mapped Right to Left
{ { 6 | (0 << 4) }, { 224, 0 }, 1},
{ { 6 | (1 << 4) }, { 202, 0 }, 0},
{ { 6 | (2 << 4) }, { 187, 0 }, 0},
{ { 6 | (3 << 4) }, { 172, 0 }, 0},
{ { 6 | (4 << 4) }, { 157, 0 }, 0},
{ { 6 | (5 << 4) }, { 142, 0 }, 0},
{ { 6 | (1 << 4) }, { 202, 0 }, 4},
{ { 6 | (2 << 4) }, { 187, 0 }, 4},
{ { 6 | (3 << 4) }, { 172, 0 }, 4},
{ { 6 | (4 << 4) }, { 157, 0 }, 4},
{ { 6 | (5 << 4) }, { 142, 0 }, 4},
{ { 6 | (6 << 4) }, { 120, 0 }, 1},
{ { 7 | (0 << 4) }, { 224, 16 }, 1},
{ { 7 | (1 << 4) }, { 202, 16 }, 0},
{ { 7 | (2 << 4) }, { 187, 16 }, 0},
{ { 7 | (3 << 4) }, { 172, 16 }, 0},
{ { 7 | (4 << 4) }, { 157, 16 }, 0},
{ { 7 | (5 << 4) }, { 142, 16 }, 0},
{ { 7 | (1 << 4) }, { 202, 16 }, 4},
{ { 7 | (2 << 4) }, { 187, 16 }, 4},
{ { 7 | (3 << 4) }, { 172, 16 }, 4},
{ { 7 | (4 << 4) }, { 157, 16 }, 4},
{ { 7 | (5 << 4) }, { 142, 16 }, 4},
{ { 7 | (6 << 4) }, { 120, 16 }, 1},
{ { 8 | (0 << 4) }, { 224, 32 }, 1},
{ { 8 | (1 << 4) }, { 202, 32 }, 0},
{ { 8 | (2 << 4) }, { 187, 32 }, 0},
{ { 8 | (3 << 4) }, { 172, 32 }, 0},
{ { 8 | (4 << 4) }, { 157, 32 }, 0},
{ { 8 | (5 << 4) }, { 142, 32 }, 0},
{ { 8 | (1 << 4) }, { 202, 32 }, 4},
{ { 8 | (2 << 4) }, { 187, 32 }, 4},
{ { 8 | (3 << 4) }, { 172, 32 }, 4},
{ { 8 | (4 << 4) }, { 157, 32 }, 4},
{ { 8 | (5 << 4) }, { 142, 32 }, 4},
{ { 8 | (6 << 4) }, { 120, 32 }, 1},
{ { 9 | (0 << 4) }, { 224, 48 }, 1},
{ { 9 | (1 << 4) }, { 202, 48 }, 0},
{ { 9 | (2 << 4) }, { 187, 48 }, 0},
{ { 9 | (3 << 4) }, { 172, 48 }, 0},
{ { 9 | (4 << 4) }, { 157, 48 }, 0},
{ { 9 | (5 << 4) }, { 142, 48 }, 0},
{ { 9 | (1 << 4) }, { 202, 48 }, 4},
{ { 9 | (2 << 4) }, { 187, 48 }, 4},
{ { 9 | (3 << 4) }, { 172, 48 }, 4},
{ { 9 | (4 << 4) }, { 157, 48 }, 4},
{ { 9 | (5 << 4) }, { 142, 48 }, 4},
{ { 9 | (6 << 4) }, { 120, 48 }, 1},
{ { 10 | (0 << 4) }, { 224, 64 }, 1},
{ { 10 | (1 << 4) }, { 202, 64 }, 1},

View File

@@ -1 +1,20 @@
#include "sol.h"
#if defined(RGB_MATRIX_ENABLE)
uint8_t rgb_matrix_map_row_column_to_led_kb(uint8_t row, uint8_t column, uint8_t *led_i) {
if (row == 4 && column == 5) {
led_i[0] = 33;
return 1;
} else if (row == 4 && column == 6) {
led_i[0] = 34;
return 1;
} else if (row == 10 && column == 5) {
led_i[0] = 68;
return 1;
} else if (row == 10 && column == 6) {
led_i[0] = 69;
return 1;
}
return 0;
}
#endif

View File

@@ -405,10 +405,8 @@ void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue) {
rgb_led led;
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
led = g_rgb_leds[i];
if (led.matrix_co.raw < 0xFF) {
if (led.modifier) {
rgb_matrix_set_color( i, red, green, blue );
}
if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
rgb_matrix_set_color( i, red, green, blue );
}
}
}

View File

@@ -179,10 +179,8 @@ void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool def
rgb_led led;
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
led = g_rgb_leds[i];
if (led.matrix_co.raw < 0xFF) {
if (led.modifier) {
rgb_matrix_set_color( i, red, green, blue );
}
if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
rgb_matrix_set_color( i, red, green, blue );
}
}
}

View File

@@ -167,8 +167,8 @@ Lib8tion is pronounced like 'libation': lie-BAY-shun
#include <stdint.h>
#define LIB8STATIC __attribute__ ((unused)) static inline
#define LIB8STATIC_ALWAYS_INLINE __attribute__ ((always_inline)) static inline
#define LIB8STATIC static inline
#define LIB8STATIC_ALWAYS_INLINE static inline
#if !defined(__AVR__)
#include <string.h>

View File

@@ -147,7 +147,7 @@ LIB8STATIC int16_t cos16( uint16_t theta)
#endif
const uint8_t b_m16_interleave[] = { 0, 49, 49, 41, 90, 27, 117, 10 };
static const uint8_t b_m16_interleave[8] = { 0, 49, 49, 41, 90, 27, 117, 10 };
/// Fast 8-bit approximation of sin(x). This approximation never varies more than
/// 2% from the floating point value you'd get by doing

View File

@@ -0,0 +1,146 @@
/* Copyright 2019 Jack Humbert
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "process_space_cadet.h"
#ifndef TAPPING_TERM
#define TAPPING_TERM 200
#endif
// ********** OBSOLETE DEFINES, STOP USING! (pls?) **********
// Shift / paren setup
#ifndef LSPO_KEY
#define LSPO_KEY KC_9
#endif
#ifndef RSPC_KEY
#define RSPC_KEY KC_0
#endif
// Shift / Enter setup
#ifndef SFTENT_KEY
#define SFTENT_KEY KC_ENT
#endif
#ifdef DISABLE_SPACE_CADET_MODIFIER
#ifndef LSPO_MOD
#define LSPO_MOD KC_TRNS
#endif
#ifndef RSPC_MOD
#define RSPC_MOD KC_TRNS
#endif
#else
#ifndef LSPO_MOD
#define LSPO_MOD KC_LSFT
#endif
#ifndef RSPC_MOD
#define RSPC_MOD KC_RSFT
#endif
#endif
// **********************************************************
// Shift / paren setup
#ifndef LSPO_KEYS
#define LSPO_KEYS KC_LSFT, LSPO_MOD, LSPO_KEY
#endif
#ifndef RSPC_KEYS
#define RSPC_KEYS KC_RSFT, RSPC_MOD, RSPC_KEY
#endif
// Control / paren setup
#ifndef LCPO_KEYS
#define LCPO_KEYS KC_LCTL, KC_LCTL, KC_9
#endif
#ifndef RCPO_KEYS
#define RCPO_KEYS KC_RCTL, KC_RCTL, KC_0
#endif
// Alt / paren setup
#ifndef LAPO_KEYS
#define LAPO_KEYS KC_LALT, KC_LALT, KC_9
#endif
#ifndef RAPO_KEYS
#define RAPO_KEYS KC_RALT, KC_RALT, KC_0
#endif
// Shift / Enter setup
#ifndef SFTENT_KEYS
#define SFTENT_KEYS KC_RSFT, KC_TRNS, SFTENT_KEY
#endif
static uint8_t sc_last = 0;
static uint16_t sc_timer = 0;
void perform_space_cadet(keyrecord_t *record, uint8_t normalMod, uint8_t tapMod, uint8_t keycode) {
if (record->event.pressed) {
sc_last = normalMod;
sc_timer = timer_read ();
if (IS_MOD(normalMod)) {
register_mods(MOD_BIT(normalMod));
}
}
else {
if (IS_MOD(normalMod)) {
unregister_mods(MOD_BIT(normalMod));
}
if (sc_last == normalMod && timer_elapsed(sc_timer) < TAPPING_TERM) {
if (IS_MOD(tapMod)) {
register_mods(MOD_BIT(tapMod));
}
tap_code(keycode);
if (IS_MOD(tapMod)) {
unregister_mods(MOD_BIT(tapMod));
}
}
}
}
bool process_space_cadet(uint16_t keycode, keyrecord_t *record) {
switch(keycode) {
case KC_LSPO: {
perform_space_cadet(record, LSPO_KEYS);
return false;
}
case KC_RSPC: {
perform_space_cadet(record, RSPC_KEYS);
return false;
}
case KC_LCPO: {
perform_space_cadet(record, LCPO_KEYS);
return false;
}
case KC_RCPC: {
perform_space_cadet(record, RCPO_KEYS);
return false;
}
case KC_LAPO: {
perform_space_cadet(record, LAPO_KEYS);
return false;
}
case KC_RAPC: {
perform_space_cadet(record, RAPO_KEYS);
return false;
}
case KC_SFTENT: {
perform_space_cadet(record, SFTENT_KEYS);
return false;
}
default: {
sc_last = 0;
break;
}
}
return true;
}

View File

@@ -0,0 +1,21 @@
/* Copyright 2019 Jack Humbert
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "quantum.h"
void perform_space_cadet(keyrecord_t *record, uint8_t normalMod, uint8_t tapMod, uint8_t keycode);
bool process_space_cadet(uint16_t keycode, keyrecord_t *record);

View File

@@ -24,10 +24,6 @@
#include "outputselect.h"
#endif
#ifndef TAPPING_TERM
#define TAPPING_TERM 200
#endif
#ifndef BREATHING_PERIOD
#define BREATHING_PERIOD 6
#endif
@@ -196,30 +192,6 @@ void reset_keyboard(void) {
bootloader_jump();
}
// Shift / paren setup
#ifndef LSPO_KEY
#define LSPO_KEY KC_9
#endif
#ifndef RSPC_KEY
#define RSPC_KEY KC_0
#endif
#ifndef LSPO_MOD
#define LSPO_MOD KC_LSFT
#endif
#ifndef RSPC_MOD
#define RSPC_MOD KC_RSFT
#endif
// Shift / Enter setup
#ifndef SFTENT_KEY
#define SFTENT_KEY KC_ENT
#endif
static bool shift_interrupted[2] = {0, 0};
static uint16_t scs_timer[2] = {0, 0};
/* true if the last press of GRAVE_ESC was shifted (i.e. GUI or SHIFT were pressed), false otherwise.
* Used to ensure that the correct keycode is released if the key is released.
*/
@@ -328,6 +300,9 @@ bool process_record_quantum(keyrecord_t *record) {
#endif
#ifdef TERMINAL_ENABLE
process_terminal(keycode, record) &&
#endif
#ifdef SPACE_CADET_ENABLE
process_space_cadet(keycode, record) &&
#endif
true)) {
return false;
@@ -685,92 +660,6 @@ bool process_record_quantum(keyrecord_t *record) {
return false;
}
break;
case KC_LSPO: {
if (record->event.pressed) {
shift_interrupted[0] = false;
scs_timer[0] = timer_read ();
register_mods(MOD_BIT(KC_LSFT));
}
else {
#ifdef DISABLE_SPACE_CADET_ROLLOVER
if (get_mods() & MOD_BIT(RSPC_MOD)) {
shift_interrupted[0] = true;
shift_interrupted[1] = true;
}
#endif
if (!shift_interrupted[0] && timer_elapsed(scs_timer[0]) < TAPPING_TERM) {
#ifdef DISABLE_SPACE_CADET_MODIFIER
unregister_mods(MOD_BIT(KC_LSFT));
#else
if( LSPO_MOD != KC_LSFT ){
unregister_mods(MOD_BIT(KC_LSFT));
register_mods(MOD_BIT(LSPO_MOD));
}
#endif
register_code(LSPO_KEY);
unregister_code(LSPO_KEY);
#ifndef DISABLE_SPACE_CADET_MODIFIER
if( LSPO_MOD != KC_LSFT ){
unregister_mods(MOD_BIT(LSPO_MOD));
}
#endif
}
unregister_mods(MOD_BIT(KC_LSFT));
}
return false;
}
case KC_RSPC: {
if (record->event.pressed) {
shift_interrupted[1] = false;
scs_timer[1] = timer_read ();
register_mods(MOD_BIT(KC_RSFT));
}
else {
#ifdef DISABLE_SPACE_CADET_ROLLOVER
if (get_mods() & MOD_BIT(LSPO_MOD)) {
shift_interrupted[0] = true;
shift_interrupted[1] = true;
}
#endif
if (!shift_interrupted[1] && timer_elapsed(scs_timer[1]) < TAPPING_TERM) {
#ifdef DISABLE_SPACE_CADET_MODIFIER
unregister_mods(MOD_BIT(KC_RSFT));
#else
if( RSPC_MOD != KC_RSFT ){
unregister_mods(MOD_BIT(KC_RSFT));
register_mods(MOD_BIT(RSPC_MOD));
}
#endif
register_code(RSPC_KEY);
unregister_code(RSPC_KEY);
#ifndef DISABLE_SPACE_CADET_MODIFIER
if ( RSPC_MOD != KC_RSFT ){
unregister_mods(MOD_BIT(RSPC_MOD));
}
#endif
}
unregister_mods(MOD_BIT(KC_RSFT));
}
return false;
}
case KC_SFTENT: {
if (record->event.pressed) {
shift_interrupted[1] = false;
scs_timer[1] = timer_read ();
register_mods(MOD_BIT(KC_RSFT));
}
else if (!shift_interrupted[1] && timer_elapsed(scs_timer[1]) < TAPPING_TERM) {
unregister_mods(MOD_BIT(KC_RSFT));
register_code(SFTENT_KEY);
unregister_code(SFTENT_KEY);
}
else {
unregister_mods(MOD_BIT(KC_RSFT));
}
return false;
}
case GRAVE_ESC: {
uint8_t shifted = get_mods() & ((MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)
@@ -825,12 +714,6 @@ bool process_record_quantum(keyrecord_t *record) {
return false;
}
#endif
default: {
shift_interrupted[0] = true;
shift_interrupted[1] = true;
break;
}
}
return process_action_kb(record);

View File

@@ -131,6 +131,10 @@ extern uint32_t default_layer_state;
#include "process_terminal_nop.h"
#endif
#ifdef SPACE_CADET_ENABLE
#include "process_space_cadet.h"
#endif
#ifdef HD44780_ENABLE
#include "hd44780.h"
#endif

View File

@@ -475,6 +475,18 @@ enum quantum_keycodes {
HPT_DWLI,
HPT_DWLD,
// Left control, open paren
KC_LCPO,
// Right control, close paren
KC_RCPC,
// Left control, open paren
KC_LAPO,
// Right control, close paren
KC_RAPC,
// always leave at the end
SAFE_RANGE
};

View File

@@ -144,9 +144,14 @@ void eeconfig_debug_rgb_matrix(void) {
dprintf("rgb_matrix_config.speed = %d\n", rgb_matrix_config.speed);
}
__attribute__ ((weak))
uint8_t rgb_matrix_map_row_column_to_led_kb(uint8_t row, uint8_t column, uint8_t *led_i) {
return 0;
}
uint8_t rgb_matrix_map_row_column_to_led(uint8_t row, uint8_t column, uint8_t *led_i) {
// TODO: This is kinda expensive, fix this soonish
uint8_t led_count = 0;
uint8_t led_count = rgb_matrix_map_row_column_to_led_kb(row, column, led_i);
for (uint8_t i = 0; i < DRIVER_LED_TOTAL && led_count < LED_HITS_TO_REMEMBER; i++) {
matrix_co_t matrix_co = g_rgb_leds[i].matrix_co;
if (row == matrix_co.row && column == matrix_co.col) {
@@ -162,28 +167,11 @@ void rgb_matrix_update_pwm_buffers(void) {
}
void rgb_matrix_set_color( int index, uint8_t red, uint8_t green, uint8_t blue ) {
#ifdef RGB_MATRIX_EXTRA_TOG
const bool is_key = g_rgb_leds[index].matrix_co.raw != 0xff;
if (
(rgb_matrix_config.enable == RGB_ZONE_KEYS && !is_key) ||
(rgb_matrix_config.enable == RGB_ZONE_UNDER && is_key)
) {
rgb_matrix_driver.set_color(index, 0, 0, 0);
return;
}
#endif
rgb_matrix_driver.set_color(index, red, green, blue);
}
void rgb_matrix_set_color_all( uint8_t red, uint8_t green, uint8_t blue ) {
#ifdef RGB_MATRIX_EXTRA_TOG
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
rgb_matrix_set_color(i, red, green, blue);
}
#else
rgb_matrix_driver.set_color_all(red, green, blue);
#endif
}
bool process_rgb_matrix(uint16_t keycode, keyrecord_t *record) {
@@ -262,7 +250,7 @@ static bool rgb_matrix_none(effect_params_t* params) {
static uint8_t rgb_last_enable = UINT8_MAX;
static uint8_t rgb_last_effect = UINT8_MAX;
static effect_params_t rgb_effect_params = { 0, 0 };
static effect_params_t rgb_effect_params = { 0, 0xFF };
static rgb_task_states rgb_task_state = SYNCING;
static void rgb_task_timers(void) {
@@ -575,29 +563,31 @@ void rgb_matrix_set_suspend_state(bool state) {
}
void rgb_matrix_toggle(void) {
rgb_matrix_config.enable++;
if (!rgb_matrix_config.enable) {
rgb_task_state = STARTING;
}
rgb_matrix_config.enable ^= 1;
rgb_task_state = STARTING;
eeconfig_update_rgb_matrix(rgb_matrix_config.raw);
}
void rgb_matrix_enable(void) {
rgb_matrix_config.enable = 1;
rgb_matrix_enable_noeeprom();
eeconfig_update_rgb_matrix(rgb_matrix_config.raw);
}
void rgb_matrix_enable_noeeprom(void) {
rgb_matrix_config.enable = 1;
if (!rgb_matrix_config.enable)
rgb_task_state = STARTING;
rgb_matrix_config.enable = 1;
}
void rgb_matrix_disable(void) {
rgb_matrix_config.enable = 0;
rgb_matrix_disable_noeeprom();
eeconfig_update_rgb_matrix(rgb_matrix_config.raw);
}
void rgb_matrix_disable_noeeprom(void) {
rgb_matrix_config.enable = 0;
if (rgb_matrix_config.enable)
rgb_task_state = STARTING;
rgb_matrix_config.enable = 0;
}
void rgb_matrix_step(void) {
@@ -658,6 +648,14 @@ void rgb_matrix_decrease_speed(void) {
eeconfig_update_rgb_matrix(rgb_matrix_config.raw);//EECONFIG needs to be increased to support this
}
led_flags_t rgb_matrix_get_flags(void) {
return rgb_effect_params.flags;
}
void rgb_matrix_set_flags(led_flags_t flags) {
rgb_effect_params.flags = flags;
}
void rgb_matrix_mode(uint8_t mode) {
rgb_matrix_config.mode = mode;
rgb_task_state = STARTING;

View File

@@ -54,7 +54,9 @@
uint8_t max = DRIVER_LED_TOTAL;
#endif
extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
#define RGB_MATRIX_TEST_LED_FLAGS() if (!HAS_ANY_FLAGS(g_rgb_leds[i].flags, params->flags)) continue
extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
typedef struct
{
@@ -209,6 +211,8 @@ void rgb_matrix_increase_val(void);
void rgb_matrix_decrease_val(void);
void rgb_matrix_increase_speed(void);
void rgb_matrix_decrease_speed(void);
led_flags_t rgb_matrix_get_flags(void);
void rgb_matrix_set_flags(led_flags_t flags);
void rgb_matrix_mode(uint8_t mode);
void rgb_matrix_mode_noeeprom(uint8_t mode);
uint8_t rgb_matrix_get_mode(void);

View File

@@ -1,7 +1,7 @@
#pragma once
#ifndef DISABLE_RGB_MATRIX_ALPHAS_MODS
extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
extern rgb_config_t rgb_matrix_config;
// alphas = color1, mods = color2
@@ -14,7 +14,8 @@ bool rgb_matrix_alphas_mods(effect_params_t* params) {
RGB rgb2 = hsv_to_rgb(hsv);
for (uint8_t i = led_min; i < led_max; i++) {
if (g_rgb_leds[i].modifier) {
RGB_MATRIX_TEST_LED_FLAGS();
if (HAS_FLAGS(g_rgb_leds[i].flags, LED_FLAG_MODIFIER)) {
rgb_matrix_set_color(i, rgb2.r, rgb2.g, rgb2.b);
} else {
rgb_matrix_set_color(i, rgb1.r, rgb1.g, rgb1.b);

View File

@@ -12,6 +12,7 @@ bool rgb_matrix_breathing(effect_params_t* params) {
HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, val };
RGB rgb = hsv_to_rgb(hsv);
for (uint8_t i = led_min; i < led_max; i++) {
RGB_MATRIX_TEST_LED_FLAGS();
rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
}
return led_max < DRIVER_LED_TOTAL;

View File

@@ -2,16 +2,16 @@
#ifndef DISABLE_RGB_MATRIX_CYCLE_ALL
extern rgb_counters_t g_rgb_counters;
extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
extern rgb_config_t rgb_matrix_config;
bool rgb_matrix_cycle_all(effect_params_t* params) {
RGB_MATRIX_USE_LIMITS(led_min, led_max);
HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val };
uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4);
hsv.h = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4);
for (uint8_t i = led_min; i < led_max; i++) {
hsv.h = time;
RGB_MATRIX_TEST_LED_FLAGS();
RGB rgb = hsv_to_rgb(hsv);
rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
}

View File

@@ -2,7 +2,7 @@
#ifndef DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
extern rgb_counters_t g_rgb_counters;
extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
extern rgb_config_t rgb_matrix_config;
bool rgb_matrix_cycle_left_right(effect_params_t* params) {
@@ -11,6 +11,7 @@ bool rgb_matrix_cycle_left_right(effect_params_t* params) {
HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val };
uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4);
for (uint8_t i = led_min; i < led_max; i++) {
RGB_MATRIX_TEST_LED_FLAGS();
point_t point = g_rgb_leds[i].point;
hsv.h = point.x - time;
RGB rgb = hsv_to_rgb(hsv);

View File

@@ -2,7 +2,7 @@
#ifndef DISABLE_RGB_MATRIX_CYCLE_UP_DOWN
extern rgb_counters_t g_rgb_counters;
extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
extern rgb_config_t rgb_matrix_config;
bool rgb_matrix_cycle_up_down(effect_params_t* params) {
@@ -11,6 +11,7 @@ bool rgb_matrix_cycle_up_down(effect_params_t* params) {
HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val };
uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4);
for (uint8_t i = led_min; i < led_max; i++) {
RGB_MATRIX_TEST_LED_FLAGS();
point_t point = g_rgb_leds[i].point;
hsv.h = point.y - time;
RGB rgb = hsv_to_rgb(hsv);

View File

@@ -2,7 +2,7 @@
#ifndef DISABLE_RGB_MATRIX_DUAL_BEACON
extern rgb_counters_t g_rgb_counters;
extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
extern rgb_config_t rgb_matrix_config;
bool rgb_matrix_dual_beacon(effect_params_t* params) {
@@ -13,6 +13,7 @@ bool rgb_matrix_dual_beacon(effect_params_t* params) {
int8_t cos_value = cos8(time) - 128;
int8_t sin_value = sin8(time) - 128;
for (uint8_t i = led_min; i < led_max; i++) {
RGB_MATRIX_TEST_LED_FLAGS();
point_t point = g_rgb_leds[i].point;
hsv.h = ((point.y - 32) * cos_value + (point.x - 112) * sin_value) / 128 + rgb_matrix_config.hue;
RGB rgb = hsv_to_rgb(hsv);

View File

@@ -1,7 +1,7 @@
#pragma once
#ifndef DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
extern rgb_config_t rgb_matrix_config;
bool rgb_matrix_gradient_up_down(effect_params_t* params) {
@@ -10,6 +10,7 @@ bool rgb_matrix_gradient_up_down(effect_params_t* params) {
HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val };
uint8_t scale = scale8(64, rgb_matrix_config.speed);
for (uint8_t i = led_min; i < led_max; i++) {
RGB_MATRIX_TEST_LED_FLAGS();
point_t point = g_rgb_leds[i].point;
// The y range will be 0..64, map this to 0..4
// Relies on hue being 8-bit and wrapping

View File

@@ -2,10 +2,11 @@
#ifndef DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
extern rgb_counters_t g_rgb_counters;
extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
extern rgb_config_t rgb_matrix_config;
static void jellybean_raindrops_set_color(int i) {
static void jellybean_raindrops_set_color(int i, effect_params_t* params) {
if (!HAS_ANY_FLAGS(g_rgb_leds[i].flags, params->flags)) return;
HSV hsv = { rand() & 0xFF , rand() & 0xFF, rgb_matrix_config.val };
RGB rgb = hsv_to_rgb(hsv);
rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
@@ -15,14 +16,14 @@ bool rgb_matrix_jellybean_raindrops(effect_params_t* params) {
if (!params->init) {
// Change one LED every tick, make sure speed is not 0
if (scale16by8(g_rgb_counters.tick, qadd8(rgb_matrix_config.speed, 16)) % 5 == 0) {
jellybean_raindrops_set_color(rand() % DRIVER_LED_TOTAL);
jellybean_raindrops_set_color(rand() % DRIVER_LED_TOTAL, params);
}
return false;
}
RGB_MATRIX_USE_LIMITS(led_min, led_max);
for (int i = led_min; i < led_max; i++) {
jellybean_raindrops_set_color(i);
jellybean_raindrops_set_color(i, params);
}
return led_max < DRIVER_LED_TOTAL;
}

View File

@@ -2,7 +2,7 @@
#ifndef DISABLE_RGB_MATRIX_RAINBOW_BEACON
extern rgb_counters_t g_rgb_counters;
extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
extern rgb_config_t rgb_matrix_config;
bool rgb_matrix_rainbow_beacon(effect_params_t* params) {
@@ -13,6 +13,7 @@ bool rgb_matrix_rainbow_beacon(effect_params_t* params) {
int16_t cos_value = 2 * (cos8(time) - 128);
int16_t sin_value = 2 * (sin8(time) - 128);
for (uint8_t i = led_min; i < led_max; i++) {
RGB_MATRIX_TEST_LED_FLAGS();
point_t point = g_rgb_leds[i].point;
hsv.h = ((point.y - 32) * cos_value + (point.x - 112) * sin_value) / 128 + rgb_matrix_config.hue;
RGB rgb = hsv_to_rgb(hsv);

View File

@@ -2,7 +2,7 @@
#ifndef DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
extern rgb_counters_t g_rgb_counters;
extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
extern rgb_config_t rgb_matrix_config;
bool rgb_matrix_rainbow_moving_chevron(effect_params_t* params) {
@@ -11,6 +11,7 @@ bool rgb_matrix_rainbow_moving_chevron(effect_params_t* params) {
HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val };
uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4);
for (uint8_t i = led_min; i < led_max; i++) {
RGB_MATRIX_TEST_LED_FLAGS();
point_t point = g_rgb_leds[i].point;
hsv.h = abs8(point.y - 32) + (point.x - time) + rgb_matrix_config.hue;
RGB rgb = hsv_to_rgb(hsv);

View File

@@ -2,7 +2,7 @@
#ifndef DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS
extern rgb_counters_t g_rgb_counters;
extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
extern rgb_config_t rgb_matrix_config;
bool rgb_matrix_rainbow_pinwheels(effect_params_t* params) {
@@ -13,6 +13,7 @@ bool rgb_matrix_rainbow_pinwheels(effect_params_t* params) {
int16_t cos_value = 3 * (cos8(time) - 128);
int16_t sin_value = 3 * (sin8(time) - 128);
for (uint8_t i = led_min; i < led_max; i++) {
RGB_MATRIX_TEST_LED_FLAGS();
point_t point = g_rgb_leds[i].point;
hsv.h = ((point.y - 32) * cos_value + (56 - abs8(point.x - 112)) * sin_value) / 128 + rgb_matrix_config.hue;
RGB rgb = hsv_to_rgb(hsv);

View File

@@ -5,7 +5,8 @@
extern rgb_counters_t g_rgb_counters;
extern rgb_config_t rgb_matrix_config;
static void raindrops_set_color(int i) {
static void raindrops_set_color(int i, effect_params_t* params) {
if (!HAS_ANY_FLAGS(g_rgb_leds[i].flags, params->flags)) return;
HSV hsv = { 0 , rgb_matrix_config.sat, rgb_matrix_config.val };
// Take the shortest path between hues
@@ -25,14 +26,14 @@ bool rgb_matrix_raindrops(effect_params_t* params) {
if (!params->init) {
// Change one LED every tick, make sure speed is not 0
if (scale16by8(g_rgb_counters.tick, qadd8(rgb_matrix_config.speed, 16)) % 10 == 0) {
raindrops_set_color(rand() % DRIVER_LED_TOTAL);
raindrops_set_color(rand() % DRIVER_LED_TOTAL, params);
}
return false;
}
RGB_MATRIX_USE_LIMITS(led_min, led_max);
for (int i = led_min; i < led_max; i++) {
raindrops_set_color(i);
raindrops_set_color(i, params);
}
return led_max < DRIVER_LED_TOTAL;
}

View File

@@ -8,6 +8,7 @@ bool rgb_matrix_solid_color(effect_params_t* params) {
HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, rgb_matrix_config.val };
RGB rgb = hsv_to_rgb(hsv);
for (uint8_t i = led_min; i < led_max; i++) {
RGB_MATRIX_TEST_LED_FLAGS();
rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
}
return led_max < DRIVER_LED_TOTAL;

View File

@@ -13,6 +13,7 @@ bool rgb_matrix_solid_reactive(effect_params_t* params) {
uint16_t max_tick = 65535 / rgb_matrix_config.speed;
// Relies on hue being 8-bit and wrapping
for (uint8_t i = led_min; i < led_max; i++) {
RGB_MATRIX_TEST_LED_FLAGS();
uint16_t tick = max_tick;
for(uint8_t j = 0; j < g_last_hit_tracker.count; j++) {
if (g_last_hit_tracker.index[j] == i && g_last_hit_tracker.tick[j] < tick) {

View File

@@ -2,7 +2,7 @@
#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
#if !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS)
extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
extern rgb_config_t rgb_matrix_config;
extern last_hit_t g_last_hit_tracker;
@@ -15,6 +15,7 @@ static bool rgb_matrix_solid_reactive_multicross_range(uint8_t start, effect_par
hsv.v = 0;
point_t point = g_rgb_leds[i].point;
for (uint8_t j = start; j < count; j++) {
RGB_MATRIX_TEST_LED_FLAGS();
int16_t dx = point.x - g_last_hit_tracker.x[j];
int16_t dy = point.y - g_last_hit_tracker.y[j];
uint8_t dist = sqrt16(dx * dx + dy * dy);

View File

@@ -2,7 +2,7 @@
#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
#if !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS)
extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
extern rgb_config_t rgb_matrix_config;
extern last_hit_t g_last_hit_tracker;
@@ -15,6 +15,7 @@ static bool rgb_matrix_solid_reactive_multinexus_range(uint8_t start, effect_par
hsv.v = 0;
point_t point = g_rgb_leds[i].point;
for (uint8_t j = start; j < count; j++) {
RGB_MATRIX_TEST_LED_FLAGS();
int16_t dx = point.x - g_last_hit_tracker.x[j];
int16_t dy = point.y - g_last_hit_tracker.y[j];
uint8_t dist = sqrt16(dx * dx + dy * dy);

View File

@@ -12,6 +12,7 @@ bool rgb_matrix_solid_reactive_simple(effect_params_t* params) {
// Max tick based on speed scale ensures results from scale16by8 with rgb_matrix_config.speed are no greater than 255
uint16_t max_tick = 65535 / rgb_matrix_config.speed;
for (uint8_t i = led_min; i < led_max; i++) {
RGB_MATRIX_TEST_LED_FLAGS();
uint16_t tick = max_tick;
for(uint8_t j = 0; j < g_last_hit_tracker.count; j++) {
if (g_last_hit_tracker.index[j] == i && g_last_hit_tracker.tick[j] < tick) {

View File

@@ -2,7 +2,7 @@
#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
#if !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE)
extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
extern rgb_config_t rgb_matrix_config;
extern last_hit_t g_last_hit_tracker;
@@ -15,6 +15,7 @@ static bool rgb_matrix_solid_reactive_multiwide_range(uint8_t start, effect_para
hsv.v = 0;
point_t point = g_rgb_leds[i].point;
for (uint8_t j = start; j < count; j++) {
RGB_MATRIX_TEST_LED_FLAGS();
int16_t dx = point.x - g_last_hit_tracker.x[j];
int16_t dy = point.y - g_last_hit_tracker.y[j];
uint8_t dist = sqrt16(dx * dx + dy * dy);

View File

@@ -2,7 +2,7 @@
#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
#if !defined(DISABLE_RGB_MATRIX_SOLID_SPLASH) || !defined(DISABLE_RGB_MATRIX_SOLID_MULTISPLASH)
extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
extern rgb_config_t rgb_matrix_config;
extern last_hit_t g_last_hit_tracker;
@@ -12,6 +12,7 @@ static bool rgb_matrix_solid_multisplash_range(uint8_t start, effect_params_t* p
HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, 0 };
uint8_t count = g_last_hit_tracker.count;
for (uint8_t i = led_min; i < led_max; i++) {
RGB_MATRIX_TEST_LED_FLAGS();
hsv.v = 0;
point_t point = g_rgb_leds[i].point;
for (uint8_t j = start; j < count; j++) {

View File

@@ -2,7 +2,7 @@
#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
#if !defined(DISABLE_RGB_MATRIX_SPLASH) || !defined(DISABLE_RGB_MATRIX_MULTISPLASH)
extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
extern rgb_config_t rgb_matrix_config;
extern last_hit_t g_last_hit_tracker;
@@ -12,6 +12,7 @@ static bool rgb_matrix_multisplash_range(uint8_t start, effect_params_t* params)
HSV hsv = { 0, rgb_matrix_config.sat, 0 };
uint8_t count = g_last_hit_tracker.count;
for (uint8_t i = led_min; i < led_max; i++) {
RGB_MATRIX_TEST_LED_FLAGS();
hsv.h = rgb_matrix_config.hue;
hsv.v = 0;
point_t point = g_rgb_leds[i].point;

View File

@@ -67,18 +67,20 @@ typedef union {
};
} matrix_co_t;
typedef struct PACKED {
matrix_co_t matrix_co;
point_t point;
uint8_t modifier:1;
} rgb_led;
#define HAS_FLAGS(bits, flags) ((bits & flags) == flags)
#define HAS_ANY_FLAGS(bits, flags) ((bits & flags) != 0x00)
typedef enum {
RGB_ZONE_OFF = 0,
RGB_ZONE_ALL,
RGB_ZONE_KEYS,
RGB_ZONE_UNDER,
} rgb_zone_t;
#define LED_FLAG_ALL 0xFF
#define LED_FLAG_NONE 0x00
#define LED_FLAG_MODIFIER 0x01
#define LED_FLAG_UNDERGLOW 0x02
#define LED_FLAG_KEYLIGHT 0x04
typedef struct PACKED {
matrix_co_t matrix_co;
point_t point;
uint8_t flags;
} rgb_led;
typedef union {
uint32_t raw;

View File

@@ -443,9 +443,9 @@ static void led_matrix_massdrop_config_override(int i)
uint8_t highest_active_layer = biton32(layer_state);
if (led_lighting_mode == LED_MODE_KEYS_ONLY && g_rgb_leds[i].matrix_co.raw == 0xff) {
if (led_lighting_mode == LED_MODE_KEYS_ONLY && HAS_FLAGS(g_rgb_leds[i].flags, LED_FLAG_UNDERGLOW)) {
//Do not act on this LED
} else if (led_lighting_mode == LED_MODE_NON_KEYS_ONLY && g_rgb_leds[i].matrix_co.raw != 0xff) {
} else if (led_lighting_mode == LED_MODE_NON_KEYS_ONLY && !HAS_FLAGS(g_rgb_leds[i].flags, LED_FLAG_UNDERGLOW)) {
//Do not act on this LED
} else if (led_lighting_mode == LED_MODE_INDICATORS_ONLY) {
//Do not act on this LED (Only show indicators)