-
Notifications
You must be signed in to change notification settings - Fork 62
Basic RGB Patterns #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…tapped to is_tap_key
Along with the example I put in the keyboard.set_default_color(r=0xFF, g=0, b=0xFF)
keyboard.rgb_mode = keyboard.RGB_TAP
def macro_handler(dev, n, is_down):
if is_down and n == 0:
if keyboard.rgb_mode == keyboard.RGB_TAP:
keyboard.rgb_mode = keyboard.RGB_FILL
elif keyboard.rgb_mode == keyboard.RGB_FILL:
keyboard.rgb_mode = keyboard.RGB_EMPTY
keyboard.backlight.on(*keyboard.default_color)
elif keyboard.rgb_mode == keyboard.RGB_EMPTY:
keyboard.rgb_mode = keyboard.RGB_OFF
keyboard.backlight.on(*keyboard.default_color)
elif keyboard.backlight.dev.any():
keyboard.backlight.off()
else:
keyboard.rgb_mode = keyboard.RGB_TAP UPDATED: updated macro to match the latest commit and cycle all of the available RGB options |
I cleaned up the implementation a little bit and separated out the RGB updating. This allows for the higher latency when the lights on keypress is enabled, but when it is set to false, the latency drops back down to 1/2 nanoseconds. Neither set ups has a noticeable lag tho even when typing at high speeds 120/130wpm which is good. |
I was thinking to add some new action codes to control the backlight. With backlight action codes, we could just modify the keymap without the macro handler. |
Ah yeah I like that solution a lot better |
Update to latest upstream
update to upstream
Just added some keycodes to control RGB backlight. We can use |
Awesome! That is amazing! Thank you so much! I'll play around with this code a bit and look into what I can add. I'm really enjoying this keeb, thanks for all your hard work! |
This adds a feature that allows you to change the default light of the keyboard and also turn on light on keypress. I have a few more ideas on patterns that I will look into implementing soon. Let me know what you think of the implementation. I think we should figure out a good place to move this code so that its easy to separate from the action of the keypress. Maybe out to its own function. But this is a good proof of concept