Bangle 2 kb.tap() sending same key over and over. #5157
Replies: 1 comment
-
Posted at 2022-08-28 by khromov After adding debug logging to a file, I found that the following error is thrown when the key stops working.
Based on some googling this seems to correspond to "NRF_ERROR_TIMEOUT". Any advice on how to handle these errors (maybe to retry, or at the very least make sure the keyboard doesn't go into a broken state) would be much appreciated! Edit Posted at 2022-09-05 by @gfwilliams Which firmware version are you on? It'd be good to know to track down what place that error comes from. And when this happens, does the You probably figured this out, but the repetition is because the Mac didn't get the 'key up' event and it still thinks the key is pressed down. So as a quick, hacky fix you could call One potential reason for issues could be connection power saving - so you could try calling
Yes, that's a pain. I believe it's an OS-related thing though, and if you were able to develop on Android/Chrome OS/Linux I believe those would at least work (maybe windows, but I'm not 100% sure). |
Beta Was this translation helpful? Give feedback.
-
Posted at 2022-08-28 by khromov
I think I have the same problem as this thread, but with the Bangle 2. I'm trying to make a simple presentation remote app that will send left/right arrow HID keyboard events. Everything works, except after a couple of keypresses the last pressed key just starts repeating. I'm attaching a gif to show the problem.
In the gif I first press the Bangle 2 button a couple of times which triggers a right key press. After a few presses, the right key just starts repeating over and over. Not even closing the app helps, which leads me to believe this is a problem where the second command calling
NRF.sendHIDReport([0,0,0,0,0,0,0,0]...
which is supposed to reset the key press doesn't get triggered for some reason. It happens super frequently though, only requiring 3-4 presses to go into this error state every time.Below is my app. This is the second iteration where I tried to prevent multiple key presses by keeping track of a key currently being sent using a "currentlySendingKey" boolean. What I found was that it seems like my callback for the tap() event doesn't trigger, so once one buggy key has been sent, currentlySendingKey stays true forever.
PS. I would also love some guidance on how I can connect my app to the console when it's in a paired HID state, it doesn't show up in the Web IDE if it's paired to the Mac.
Beta Was this translation helpful? Give feedback.
All reactions