[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Keyboards, other questions



On Fri, Oct 9, 2009 at 6:33 PM, PierreLafrance1@xxxxxxxxxxxx
<PierreLafrance1@xxxxxxxxxxxx> wrote:
> Hi
> If I have a Linux base application, with 2 USB keyboards connected to
> it, is it possible to know, when a key is press, from wich keyboard the
> command is from ?
>
> Thanks
>
> --
> Pierre
>

AFAIK, by default most Linux setups treat multiple keyboards as though
they were all the same device. This is true for tty's as well as X. I
believe this is handled by the kernel, but I could be wrong. Getting
multiple keyboards to work as separate devices would definitely
require some per-system configuration requiring root privileges, and
would not be easy to do from within a Python app, assuming it is even
possible.