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

Why must keyd have only one instance? #105

Closed
canadaduane opened this issue Jan 16, 2022 · 2 comments
Closed

Why must keyd have only one instance? #105

canadaduane opened this issue Jan 16, 2022 · 2 comments

Comments

@canadaduane
Copy link
Contributor

canadaduane commented Jan 16, 2022

This might be just a question for curiosity's sake, but I realized from discussion at #104 that I don't know why it's important for keyd to have only one process (daemon) running.

Is it perhaps because the conf files directory is not configurable, and so any two instances will have the same configuration? Or is it because it would be inefficient, maybe?

It seems on the surface that if you could configure one keyd instance to remap one keyboard, it would be ok to have another keyd instance remapping another keyboard. Theoretically :)

@canadaduane canadaduane changed the title Why must keyd have only one process running? Why must keyd have only one instance? Jan 16, 2022
@rvaiya
Copy link
Owner

rvaiya commented Jan 16, 2022

The main reason is because only one process can control an input device at a given time. When you combine this with the fact that it is not a good idea to give normal users direct access to /dev/input/* and that there is no way for the disparate processes to communicate to resolve conflicts, the problem naturally lends itself to a single system service.

Finally, keyd was originally designed to feel like QMK which works everywhere and is baked into the keyboard. Though this last reason is less important than it used to be.

You may want to read #70.

It seems on the surface that if you could configure one keyd instance to remap one keyboard, it would be ok to have another keyd instance remapping another keyboard. Theoretically :)

This is true, but I can't think of any reason why this would be preferable to the current approach.

@canadaduane
Copy link
Contributor Author

This is true, but I can't think of any reason why this would be preferable to the current approach.

Agreed, and thanks for the explanation. I'll close this now.

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