-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Forward mouse events from USB over Bluetooth #1732
Comments
I've been looking for something that'd be able to do this for a while. My use-case is that I have 3 devices I want to switch between but my bluetooth mouse only lets me switch between two, so being able to connect the mouse to a keyboard that can then switch between 3+ devices and forward the mouse connection would be great. I think it's technically possible to transparently forward the HID events, not sure what processing would need to be done on them to merge the mouse and keyboard events? |
Connecting Bluetooth mouse would be the easiest and not require additional hardware. Stock ZMK central supports connecting to one ZMK peripheral, #836 extends that to multiple ZMK peripherals, and extending that to support generic HID peripherals is a matter of implementation. One does need to consider the total amount of CPU/radio time available. Connecting too many peripherals simultaneously will likely increase latency. Integrating a USB HID device would require USB host support. That's not yet in Zephyr but appears to be under development with new USB stack zephyrproject-rtos/zephyr#42066. In terms of hardware, the easiest would be Nordic nRF52 with a chip like MAX3421E for USB host support. There are lots of alternatives such as using RP2040 for USB host https://github.com/sekigon-gonnoc/Pico-PIO-USB and defining your own communication protocol, or reimplementing the RP2040 PIO USB parts in Zephyr and using Zephyr's split host/controller setup for Bluetooth. USB host support can be useful for other HID devices (foot pedals, joysticks), MIDI input, among other stuff. It can also be useful for a dongle similar to the Hasu USB to USB converter and allow ZMK to be used for arbitrary USB keyboards. |
Hello,
I may have a edge case here, so context:
I currently use a USB ergodox. Every switch is a pain in the a**, so I ended up using barrier/input-leap, which is not a smooth experience (layout incompatibilities), and is not very conform on a professional laptop.
So the perfect combination would be a bluetooth (split) keyboard, with mouse dongle plugged in a keyboard’s USB port, and have ZMK forward mouse HID event over Bluetooth. A keyboard switch of bluetooth bond would also switch the mouse.
I can also imagine, using a bluetooth mouse, being able to directly pair the mouse with the keyboard.
So questions and consideration :
The text was updated successfully, but these errors were encountered: