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

Question: Switching hosts on non-apple keyboards #34

Open
Anonymous1893 opened this issue Aug 11, 2021 · 3 comments
Open

Question: Switching hosts on non-apple keyboards #34

Anonymous1893 opened this issue Aug 11, 2021 · 3 comments

Comments

@Anonymous1893
Copy link

Does anyone know how to switch devices using this hub?

I can't find it anywhere in the documentation.

@Dreamsorcerer
Copy link
Collaborator

Once I can actually use the project again, I'll look at making this customisable. If you're familiar with Python, it shouldn't be difficult to look through the code and put in some kind of hack in the meantime.

@Anonymous1893
Copy link
Author

Honestly don’t have much experience with large scale python stuff like this, but if i come up with a hack i’ll be sure to share it here. Appreciate you carrying this repo while the dev is MIA.

@Dreamsorcerer
Copy link
Collaborator

Dreamsorcerer commented Aug 15, 2021

Not sure I'd call it large scale (probably <1000 lines). :P

At a quick glance, the switch happens here:

bthidhub/hid_devices.py

Lines 68 to 69 in c979471

if tm == b'\xff':
self.device_registry.bluetooth_devices.switch_host()

If you print out the value of tm when pressing the desired button, you can probably just copy that value into the if statement and get it working... in theory...

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