-
Notifications
You must be signed in to change notification settings - Fork 157
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
Modernise the LED interface. #37
Comments
Been waiting for this for quite some time. Stragenly the issue I'm following to track the hooks changes hasn't been updated. I'll be working on this tomorrow, it's something I already have coded up. |
So far I'm really very impressed with it. |
I've spent my afternoon playing with the new hook code and I noticed one problem. It's currently conflicting with the existing led code. On first boot the led is set by our old code. But if you change the layer then it uses the new code. And if you toggle numlock or capslock it goes back to the old code. So basically whatever state change was most recent decides which code is active. I'm also don't think you need hooks for both layer commands. Based on what I read in the docs the layer_state will always have the default_layer_state bits flipped on |
That would make sense. I can try toggling caps lock tomorrow. It would be easy for me to over look it as I don't use any of the lock keys. I did find it necessary to set both although I could probably do something smarter by querying both values before my switch. |
There have been some massive improvements to tmk concerning hooks.
This makes it trivial to setup your own LED scheme directly from within your keymap. For example, I currently only use 4 layers, and rarely use caps, num or scroll lock. As a result I have the following in my keymap:
Taking full advantage of this would help clean up
matrix.c
. I don't feel there is anything wrong with the current defaults inled.c
, so these could be sane defaults in case users do not want to customise this.The text was updated successfully, but these errors were encountered: