FolkComputer / folk

🎁 Physical computing system.
https://folk.computer
Apache License 2.0
75 stars 4 forks source link

Allow hotplug keyboards and/or restart system from unconnected keyboard #131

Open osnr opened 5 months ago

cwervo commented 3 months ago

@s-ol if you have time & interest feel free to try tackling this as a separate PR. Thanks for #148 !

s-ol commented 3 months ago

I guess hotplug should be implemented simply by polling for event devices? /dev/input could be watched by with inotify but that's not portable to Mac OS.

EDIT: Ah, so is evdev input itself, so I guess we're only targeting Linux at this level. Still not sure that avoiding a polling loop here here warrants the complexity of using a C API though.

cwervo commented 3 months ago

Yeah, right now the whole keyboard stack is only supported on Linux. Polling is what I was initially imagining, yep!