ruundii / bthidhub

Bluetooth HID hub
MIT License
309 stars 50 forks source link

Pass Plover Steno output to bthidhub #36

Open robert-winkler opened 3 years ago

robert-winkler commented 3 years ago

Plover is an open stenography software, based on python http://www.openstenoproject.org/plover/.

The setup of the keyboard and the customization of the software is not so easy; why do the users look for portable solutions, such as the Stenogotchi https://github.com/Anodynous/stenogotchi/.

Of course, it would be very cool, to pass the Plover output through bthidhub to the target device(s).

In Stenogotchi, this is done via the Plover plugin https://github.com/Anodynous/stenogotchi/blob/dev/plover_plugin/stenogotchi_link/stenogotchi_link.py

I am running now on my RPi 0W Plover and bthidhub, but only the standard keyboard works. If I switch the keyboard to Plover, the output is not sent to BlueTooth, but to my local Pi.

Does anyone have an idea, how the stenogotchi_link.py Plover plugin needs to be modified to send its output to bthidhub?

Dreamsorcerer commented 3 years ago

I don't know the details for sure. But, I think we are looking at the raw HID events from the device and then sending (after modification) to the host device.

I would assume that whatever the plover stuff is doing is probably happening in userspace, so would need to be installed on the host system.

If it's actually just rewriting HID events (as we do), then you'd need figure out a way to have it rewrite the HID events within our program (or write some new code to do the remapping).

For this, you'll need to add a custom filter, see for example the mouse filter: https://github.com/ruundii/bthidhub/blob/master/mouse_message_filter.py I also wrote an (incomplete) tutorial on the process: https://github.com/ruundii/bthidhub/blob/master/FILTERS.md