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

Add support for the HID Protocol. #1693

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

CrazyH2
Copy link

@CrazyH2 CrazyH2 commented Dec 9, 2024

Summary of changes

This PR adds a new protocol called Hid which works over BLE and USB.
Other protocols can't be used over BLE which this aims to solve.

Closes 1693

Pull Request Checklist

  • HID protocol added.
  • HID protocol documented.

@user202729
Copy link
Member

user202729 commented Dec 9, 2024

If I understood correctly this is just copy pasted from the plugin https://github.com/dnaq/plover-machine-hid/blob/main/plover_machine_hid.py (with the goal to make it available by default in Plover).

Technically nothing wrong (the original repository uses MIT license which allows code to be used in HID)

The motivation is to use a custom protocol over Bluetooth to allow using the standard keyboard… but this may be better off just implementing keyboard selection into Plover in the first place.

#1187

@petercpark
Copy link

I support this PR. Let's get this merged!

@dnaq
Copy link

dnaq commented Dec 10, 2024

This PR needs adding the hidapi libraries to the release files as well for it to work.

@user202729
Copy link
Member

The possible problem with merging it here is whether it would be more convenient for @dnaq / @lynn to maintain it here compared to the original repository.

Plus if we merge it here it would be best for the original repository to have a disclaimer like "archived, refer to Plover main repository"

@morinted
Copy link
Member

What about adding the plugin to the default plugins and shipping it with releases? Same effect, but keeps the code ownership and parallel development intact?

@dnaq
Copy link

dnaq commented Dec 10, 2024

Sounds like a perfectly good plan, then the only thing to do in mainline plover would be to make sure hidapi is bundled in the release images (and also to make sure that the machine type is defined so we can set a default keymap).

@morinted
Copy link
Member

Yes, if I remember correctly, that was the original plan. I was having trouble bundling HID with the Mac release—someone would need to take that on.

@lynn
Copy link
Contributor

lynn commented Dec 11, 2024

You'll also want to copy over hid_option.py, so that you can configure things like repeat delay from the Plover UI. It'll look like this:

image

@petercpark
Copy link

Yes, if I remember correctly, that was the original plan. I was having trouble bundling HID with the Mac release—someone would need to take that on.

@morinted I have a Mac, is there any way I can help?

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

Successfully merging this pull request may close these issues.

6 participants