Conversation
This change make it supports multiple keyboards at the same time, as before it was a nightmare to use it in a docked laptop. This makes it possible to use an external keyboard and the laptop keyboard without having to change the keyboard order manually every time.
|
Thanks for your PR @SamuelFontes! I would like a little bit of time to look at this because the way you're treating all the captured keyboards as one makes me think you're going to have strange edge cases with pressed keys or modes. I'm guessing, but is it possible with this change to press and hold
Could you describe this a little more? If you put the external keyboard first in the list, it should pick that up when docked and then pick up the laptop keyboard when not docked. I think it was planned to detect keyboard plug/unplug and then reload captured devices. Do you think that might be an acceptable solution to your problem? |
With the changes I've made, they are all really treated as the same keyboard, meaning holding space on my external keyboard activates the shortcuts on my laptop also as a side effect.
I had no idea this was a feature. I've tested it, and it really works if my external keyboard is at the top of the list. Maybe this could be better explained in the Readme, as if I knew this was a feature I wouldn't have gone through the trouble of adding multiple keyboard support. Although this requires restarting the service for the changes to apply.
That would definitely solve the problem, and it would not require changing everything like I did. Thanks for taking a look at it, if it can detect the keyboard was unplugged, that would solve my problem and I can stop using my hacky fork. |
The service should capture all keyboards and emit events to a single output. It can then track modifier presses across keyboards and only emit once, and only emit a release after the last is released. |
This change make it supports multiple keyboards at the same time, as before it was a nightmare to use in a laptop when switching between my dock station and the couch. This makes it possible to use an external keyboard and the laptop keyboard without having to change the keyboard order manually every time.
Not sure this will be useful as it requires a lot of changes, I made this change for myself and think it might be useful for people that have the same problem.