Per key/layer RGB underglow for 25.11#36
Conversation
|
Thanks for your work on this. I tried your PR and everything seem to work with the Glorious Engrammer v40. I enjoy finally being able to set RGB values individually. |
|
I tested using the Glove80 Layout Editor and was it worked for me! My layout can be seen here: https://dev.glove80.com/#/layout/user/6de3c382-9ced-4de8-a1a4-368b26e09d3f Is this a feature that will make it into ZMK or Glove80 main or will it will it likely stay as a PR? |
My plan is to open a similar PR on ZMK, and see if I can work on getting it merged. |
|
The latest update introduces some breaking changes:
|
49fbc27 to
15505c8
Compare
|
I used the latest This is my Layout: https://dev.glove80.com/#/layout/user/c458ddd6-cac3-4269-a578-a1d9cd506e94 |
|
Did anybody try to enable HID_POINTING and EXPERIMENTAL_RGB_LAYER on Engrammer v40 with this FW? RGB works for me but for some reason mouse is not. I did factory reset. |
15505c8 to
77fcafb
Compare
|
@darknao First of all thank you so much for this work. It makes knowing which layer I'm on with a single LED possible, which is crucial for my photoshop and blender work. I use no LEDs for the base layer and just one LED at half brightness for other layers. For some reason this PR seems to result in faster battery drain than #30 with the same sleep and deep sleep settings that I had for #30, not sure why. Also there are some bugs like the light turning off and not coming back, or the magic layer lights turning on at random, that #30 didn't have. Maybe it's just me? Or maybe it's something in the firmware bump to 25.01? |
|
I think it would be a good idea to ask on the MoErgo discord. It is much easier for me to track down those issues over there, and you can ask if anyone else has the same bugs. The changes in this PR are pretty much the same as for #30, but they are based on an updated version of ZMK. It is possible that upstream changes affected battery life. So far, I haven't noticed a big change on my side: I was close to 17 days with PR30, and I think I'm very close to that with this PR. If you build your firmware with my.glove80.com, you might be interested in testing a new version of this firmware on dev.glove80.com. The one currently on dev fixes a few bugs including when using sleep mode. |
|
@darknao All right, thank you. It's possible some of the light stuff is user error and my keyboard is tucked under my tablet and tapping the toggle base layer switch without me noticing. I may have also just flashed it incorrectly so I'll try again. |
| # Copyright (c) 2024, The ZMK Contributors | ||
| # SPDX-License-Identifier: MIT | ||
|
|
||
| description: Set underglow for num lock indicator |
There was a problem hiding this comment.
inaccurate description. This file is more general and also used for the scroll-lock indicator and capslock indicator
|
|
||
| #include <dt-bindings/zmk/hid_indicators.h> | ||
|
|
||
| / { |
There was a problem hiding this comment.
Great work on this PR, I use it for every build :)
I would love it if there was also a behavior that makes so color is changed for the specified key if ctrl, shift, or alt is pressed
would also be great if I could make a key change color if the key itself is pressed
|
Just for posterity, I think my battery drain and some other issues were just due to constant use of the keyboard while using Photoshop. I think this PR is great and very useful and helpful 👍🏽 |
This is super! Would be great if we can indicate CapsWord mode as well. |
|
I found an issue where toggling rgb patterns throught the per key rgb layer can temporarily disable rgb on the right half. how to replicate:
IMG_4406.MOV |
2dd2dec to
fad817c
Compare
fad817c to
146c713
Compare
|
|
|
I've been testing/using this for ~5 months and it's been great. I'd love to see this get integrated with the main branch. |
d82a918 to
395eb4a
Compare
ac7f8e6 to
8aeaaa6
Compare
| pixel-lookup = <57>, <56>, <55>, <74>, <73>, <72>, <16>, <28>, <40>, <58>, <5>, <17>, <29>, <41>, | ||
| <59>, <75>, <6>, <18>, <30>, <42>, <60>, <76>, <7>, <19>, <31>, <43>, <61>, <77>, | ||
| <8>, <20>, <32>, <44>, <62>, <78>, <9>, <21>, <33>, <45>, <63>, <79>; |
There was a problem hiding this comment.
| pixel-lookup = <57>, <56>, <55>, <74>, <73>, <72>, <16>, <28>, <40>, <58>, <5>, <17>, <29>, <41>, | |
| <59>, <75>, <6>, <18>, <30>, <42>, <60>, <76>, <7>, <19>, <31>, <43>, <61>, <77>, | |
| <8>, <20>, <32>, <44>, <62>, <78>, <9>, <21>, <33>, <45>, <63>, <79>; | |
| pixel-lookup = <57>, <56>, <55>, <74>, <73>, <72>, <16>, <28>, <40>, <58>, <5>, <17>, <29>, <41>, | |
| <59>, <75>, <6>, <18>, <30>, <42>, <60>, <76>, <7>, <19>, <31>, <43>, <61>, <77>, | |
| <8>, <20>, <32>, <44>, <62>, <78>, <9>, <21>, <33>, <45>, <63>, <79>; |
The misalignment is triggering me 😂
| pixel-lookup = <52>, <53>, <54>, <69>, <70>, <71>, <15>, <27>, <39>, <51>, <4>, <14>, <26>, <38>, | ||
| <50>, <68>, <3>, <13>, <25>, <37>, <49>, <67>, <2>, <12>, <24>, <36>, <48>, <66>, | ||
| <1>, <11>, <23>, <35>, <47>, <65>, <0>, <10>, <22>, <34>, <46>, <64>; |
There was a problem hiding this comment.
| pixel-lookup = <52>, <53>, <54>, <69>, <70>, <71>, <15>, <27>, <39>, <51>, <4>, <14>, <26>, <38>, | |
| <50>, <68>, <3>, <13>, <25>, <37>, <49>, <67>, <2>, <12>, <24>, <36>, <48>, <66>, | |
| <1>, <11>, <23>, <35>, <47>, <65>, <0>, <10>, <22>, <34>, <46>, <64>; | |
| pixel-lookup = <52>, <53>, <54>, <69>, <70>, <71>, <15>, <27>, <39>, <51>, <4>, <14>, <26>, <38>, | |
| <50>, <68>, <3>, <13>, <25>, <37>, <49>, <67>, <2>, <12>, <24>, <36>, <48>, <66>, | |
| <1>, <11>, <23>, <35>, <47>, <65>, <0>, <10>, <22>, <34>, <46>, <64>; |
| #define PINK 0xffc0cb | ||
| #define WHITE 0xffffff | ||
| #define ___ 0x000000 | ||
| #define BLACK 0x000000 No newline at end of file |
There was a problem hiding this comment.
| #define BLACK 0x000000 | |
| #define BLACK 0x000000 | |
Add missing newline
|
|
||
| void set_peripheral_layers_state(uint32_t new_layers); | ||
| bool peripheral_layer_active(uint8_t layer); | ||
| uint8_t peripheral_highest_layer_active(void); |
There was a problem hiding this comment.
| uint8_t peripheral_highest_layer_active(void); | |
| uint8_t peripheral_highest_layer_active(void); | |
missing newline
| const struct zmk_behavior_binding *rgb_underglow_get_bindings(uint8_t layer); | ||
|
|
||
| uint8_t rgb_underglow_top_layer_with_state(uint32_t state_to_test); | ||
| uint8_t rgb_underglow_top_layer(void); No newline at end of file |
There was a problem hiding this comment.
| uint8_t rgb_underglow_top_layer(void); | |
| uint8_t rgb_underglow_top_layer(void); | |
missing newline
| #include <zephyr/kernel.h> | ||
| #include <zmk/events/underglow_color_changed.h> | ||
|
|
||
| ZMK_EVENT_IMPL(zmk_underglow_color_changed); No newline at end of file |
There was a problem hiding this comment.
| ZMK_EVENT_IMPL(zmk_underglow_color_changed); | |
| ZMK_EVENT_IMPL(zmk_underglow_color_changed); | |
missing newline
| } | ||
| } | ||
| return 0; | ||
| } |
There was a problem hiding this comment.
| } | |
| } | |
missing newline
| return peripheral_highest_layer_active(); | ||
| #endif | ||
| } | ||
| #endif /* DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) */ No newline at end of file |
There was a problem hiding this comment.
| #endif /* DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) */ | |
| #endif /* DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) */ | |
missing newline
8aeaaa6 to
9e4729d
Compare
|
Curious what holds this PR from getting merged? |
f90cd0e to
512f756
Compare
|
Go60 RH thumb pixel-lookup appears reversed. The first three entries in In practice, setting a color at keymap position 59 (RH T1) lights up the physical T3 key, and vice versa. The main grid keys are fine, only the three thumb keys are affected. I'd expect the fix is changing the RH pixel-lookup to |
Use &trans behavior to use color from the next visible rgb layer in the stack.
That's correct. |
|
@darknao I opened a PR to this PR's branch with the fix, feel free to merge it :) |
Thanks, but the fix is already included in this branch |
|
I love the work here and I'm no stranger to run my own zmk forks and experiments, but i still wonder why this ist still a PR. Seems stable to me and a basic functionality, is the moergo fork of zmk moving that slow really ? |
This adds per key / per layer RGB underglow configuration on top of 25.11.
It's mainly based on @valdur mod with additional changes to make it configurable via devicetree.
This supersedes #30.
It includes:
How to use:
Full example on the Layout Editor here
To preserve battery life, I recommend enabling the
ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLEKConfig to automatically turn off underglow afterZMK_IDLE_TIMEOUTms (default to 30 seconds).From my limited experience, you can expect around one week of battery life with no RGB on the base layer.
Upstream PR: zmkfirmware#2752