-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
feature request: Passing the very first key presses to host while the keyboard is in deep sleep #2686
Comments
Anybody? |
I can't tell you off the top of my head how this interacts. I am fairly sure that it could be bypassed with adjustments to firmware if it interacts poorly. ZMK does have some fairly nice control over keyboards sleeping, perhaps you could describe your use case a bit better? |
Thanks you for your reply Nicolas, The idea is to buffer all the key presses happened while the keyboard was asleep, and push them to host as soon as the connection is awaken. BTW, that's the way all the proprietary RF-dongle keyboards work - not a single press is lost with them. As I mentioned earlier, two cheap BT keyboards I have do that, too, so the behavior must be quite common. About the use case, it's quite often 10 min or so of idle timeout are expired within normal workflow (e.g. when you just browsing with mouse, etc.), so loosing the keypresses when you start typing just after that is very annoying. Even with 30 min timeout, the problem still exists. So if ZMK allow us to implement the feature, I would really love to see it happen, as compromise between battery saving and good user experience. PS:
https://www.reddit.com/r/Keychron/comments/i8rdpb/do_you_guys_have_sleep_mode_on/ Thank you. |
Almost certainly.
I have no idea, you'd need to test that on your own most likely unless someone else happens to have stumbled into the same rabbit hole. If it isn't yet a feature, you'd most likely need to adjust the firmware accordingly yourself (or commission someone to do it) as there are other priorities ATM.
Even without deep sleep ZMK keyboards are very energy efficient. You could easily disable the deep sleep feature and still have multiple months worth of battery life, depending on your keyboard and battery size. That's what I was referring to. See the power profiler.
I am fairly certain that Keychron keyboards from that time used QMK. Some more modern ones use ZMK. You may want to look for details from the past year or more recent than that, as other points are most likely outdated. |
Unfortunately, I don't have any QMK/ZMK keyboards to test yet, and the feature is important factor to purchase for me. Do you have idea maybe where in code this could be implemented? Just curious.
That's interesting, thanks for informing me.
Yes I'm considering Keychron b1 pro for purchase. Didn't found if any others relatively cheap pre-made ZMK keyboards exist. |
Keychron didn't release their ZMK code (yet?). |
In theory someone could reverse engineer the firmware if they haven't released it. That would be an undertaking though. Try bakeneko60 go I'd say. |
@lokher Could you express your position here? |
The keyboard in question has MCU: NRF52840-QIAA-R_AQFN73: What would be next steps to reverse engineer it? |
To eliminate the need to rebuild the firmware every time we need to change the deep sleep timeout parameter, could we expose it to ZMK Studio? |
Hi,
I'm new to ZMK, but a long time BT keyboards user.
One behavior driving me nuts is the loosing of the first key-presses if the keyboard is in deep sleep (and thus disconnected itself from BT host).
As it's turned out, one half of the problem is a regression in Linux BT stack (Bluez), when the key events gotten by host are just discarded until the keyboard fully re-connects (from host POV). The optional fix (workaround?) for Bluez was recently introduced:
bluez/bluez#737
That still wasn't the end of the story, unfortunately:
apparently, some BT keyboards (even modern ones, with BT 5.0) do not pass the key events to host at all, if they were in deep sleep!:
bluez/bluez#737 (comment)
That was quite unexpected to me, because even ancient BT 3.0 "Microsoft" keyboard didn't have the issue, as well as the other cheap one.
I really upset about this situation. The proper behavior in this case is essential to me.
My only hope is ZMK (and others free keyboard firmwares) do that properly.
Any insight how things are really going?
Could we implement the feature in ZMK, if it doesn't do that yet?
Thanks.
The text was updated successfully, but these errors were encountered: