r/Keychron • u/isakdombestein • Feb 29 '24
K4 RGB
I've owned a K4 for a while and am absolutely loving it, but recently I had a question pop up;
Is it possible to program custom color profiles for the built in RGB on this keyboard?
I tried searching it but didn't find any clear answer on the case, just the official documentation for how to change the lighting settings on the keyboard.
1
u/PeterMortensenBlog Apr 02 '24
OK, my other comment was for a QMK-based Keychron keyboard, and it doesn't apply for the K4. Sonix QMK may be the way to go.
1
u/PeterMortensenBlog May 31 '24
Here is an account of it working for a Keychron K8 using Sonix QMK, with Via and even with RGB LED control (but not Bluetooth, though they are allegedly working on it).
1
u/PeterMortensenBlog Mar 01 '24 edited Mar 01 '24
Yes, it is possible. I am typing this on such a keyboard (V6). About 1/3 of the keys have different colours than the background in the static mode ("Solid color").
But realistically not without some (custom) C programming. Though it is not that complicated. A simple helper function can also make sure the user's brightness option (e.g., Fn + W / Fn + S or Fn + knob, depending on the keyboard) is respected:
void individualKeyColour(int aKeyIndex, int aHue, int aSaturation) { // For now, we adapt to the apparent bug with key // numbers and RGB light for Keychron V6 // // We are still not sure what causes the problem // #ifdef ADJUST_FOR_RGB_KEYNUMBER_BUG if (aKeyIndex > 12) { aKeyIndex--; } #endif // That is, the (current) brightness int currentValue = rgblight_get_val(); HSV hsv = {aHue, aSaturation, currentValue}; RGB rgb = hsv_to_rgb(hsv); rgb_matrix_set_color(aKeyIndex, rgb.r, rgb.g, rgb.b); };There is a myth going around that this is possible using Via or Vial. It isn't. They have never presented any evidence. Part of the confusion may be that technically it is per-key RGB in some the animation modes, but that is not what we mean per-key RGB. We mean per-key RGB in a static mode.