Skip to content
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

Bluetooth connection sometimes lost when sending unicode to M1 Mac #38

Open
sallygal1 opened this issue Feb 29, 2024 · 6 comments
Open

Comments

@sallygal1
Copy link

I have setup zmk-nodefree-config to work with HOST_OS 2 / macOS and I'm using the Unicode Hex Input. The keyboard is connected via bluetooth, I have CONFIG_ZMK_BLE_PASSKEY_ENTRY enabled.

Now every once in a while, when typing my ZMK_UNICODE_PAIR the connection suddenly closes. The Mac shows that the keyboard is disconnected and the computer does not take any inputs from either halve.

I then have to remove the connection on the Mac "Forget...", remove the profile on the keyboard and connect again. It then works again.

This only happens sometime and cannot be reproduced consistently, however, it often occurs when I press another letter immediately after the ZMK_UNICODE_PAIR. It seems to me, that while sending the unicode sequence, inbetween it tries to send the other letter I pressed and then is stuck.

Does anyone else have this problem and is there a solution to it?

Thanks.

@urob
Copy link
Owner

urob commented Feb 29, 2024

Which version of zmk are you running? I don't use Mac but apparently some connection issues have been fixed in the latest upgrade to zephyr 3.5 (see the blog post on the official zmk site on how to utilize them)

@urob
Copy link
Owner

urob commented Feb 29, 2024

Also does the issue occur without the passkey option?

@urob
Copy link
Owner

urob commented Feb 29, 2024

In either case probably better to ask on the zmk discord since the macros here don't affect the connections directly.

@sallygal1
Copy link
Author

Thank you for your answers! It also occurs without the passkey option, rather often unfortunately.

I opened the issue here because it only happens with ZMK_UNICODE_PAIR keys, not others. I have ä and ü on my upper layer, and it only happens with them. No other keys cause this.

I type, then press the combination for ü then it freezes up. I have to click on "Forget..." on the Mac's bluetooth settings and reconnect again. Once it's reconnected and the cursor is still in the textbox, it types 4498 or something similar.

So it does seem to be related to the Unicode, like I said somehow it locks up and once it's connected again it sends the rest of the unicode it tried to send. Strange thing is 4498 is not related to ü unicode so not sure what is going there.

@urob
Copy link
Owner

urob commented Mar 5, 2024

Behind the scenes, ZMK_UNICODE_PAIR is simply a Mod-morph that binds two ZMK Macros. I don't use Mac OS so I can't really help with this. I know others have reported issues with mod-morphs on Mac OS in conjunction with karabiner. In either case, might be worth asking on the ZMK discord -- this is all core functionality (the helpers simplify writing the config but don't add functionality by themselves).

@sallygal1
Copy link
Author

@urob I see, thank you for your help. It seems that there is some kind of "lock-up" happening sometimes, but only when the keyboard is on battery. Using the bluetooth logging of the Mac I can see there's a disconnect happening. I'm not using karabiner.

I've also commented here: zmkfirmware/zmk#2252

I'm using other mod-morphs (without zmk-nodefree-config helper) and it hasn't happened with these so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants