inputs icon indicating copy to clipboard operation
inputs copied to clipboard

Keyboard devices dont show up in Docker / VM

Open madhavajay opened this issue 7 years ago • 2 comments
trafficstars

It seems that for some reason the inputs.devices.keyboards is empty in Docker and in Virtual Machines. I have tried running xinput and can see that there are virtual devices but there are no /dev/inputs which is what the library relies on.

See screenshot here: https://imgur.com/a/8z6cKev

Any ideas on how to fix this, or is it just not possible? I know you can run xinputs and get the state of key presses on the virtual devices so I guess theres the chance of writing a different code path to poll this utility but that seems ugly.

madhavajay avatar May 28 '18 16:05 madhavajay

Fascinating.

Have you tried something like this? https://dummdida.tumblr.com/post/121087781445/re-udev-events-in-a-container

zeth avatar Jul 08 '18 19:07 zeth

Im not entirely sure what that is, but my guess is that won't work on Mac / Windows where the Host is just a hidden VM?

The strange thing is this happens in VM's too so im surprised im the first person to notice that there are no /dev/inputs on VMs or Docker containers...?

madhavajay avatar Jul 10 '18 22:07 madhavajay