daisyUniverse / Keebie

Easy Second Keyboard support in Linux (With layers!)
84 stars 17 forks source link

Multi process device sharing #28

Closed Michael-E-B closed 3 years ago

Michael-E-B commented 3 years ago

Changes keebie.py to write its PID into a file when starting normally, when another instance of Keebie needs to grab the devices (for adding a macro etc.) it sends the signal SIGUSR1 to the main Keebie process which then ungrabs and closes its devices for the second instance to use. When the second instance is done it sends SIGUSR2 the the main process which then grabs the devices back.

In short this lets Keebie instances started with --add, --settings, --edit, --new, or --remove work without having to stop a running process.

Michael-E-B commented 3 years ago

Also did anyone know for/else was a thing? I didn't know that!

daisyUniverse commented 3 years ago

I did not, and this is a really good change! I never really considered that running keebie as a service would make it kind of awkward to use those shells, but that does make perfect sense. Good work :D