zmkfirmware / zmk

ZMK Firmware Repository
https://zmk.dev/
MIT License
2.63k stars 2.69k forks source link

Feature request: Passthrough BLE mouse to selected output #2395

Open NilsIrl opened 1 month ago

NilsIrl commented 1 month ago

Effectively turn a zmk keyboard into a BLE KVM switch.

Currently when using a zmk keyboard with multiple BLE outputs when switching output for the keyboard other peripherals like mice obviously do not follow the output selection which means that multiple mice need to be used or a separate KVM switch. It would be cool to be able to connect a BLE mouse to a zmk keyboard and have the keyboard forward the events to the selected output.

Tips from @petejohanson on discord for someone who would want to have a crack at this:

You'd need to look at creating a GATT client that scans for and connects to the pointer. Then subscribes to the right HID Over GATT (HoG) characteristics to recieve HID data, and the process/forward on our HID side. You can see our split central code for examples of scanning/GATT discovery, etc.

This module can relay input for another zmk device: https://github.com/badjeff/zmk-split-peripheral-input-relay

xudongzheng commented 1 month ago

Related: #1732