[PD] Using two qwerty keyboards (one standard, one USB) attached to the

Hans-Christoph Steiner hans at eds.org
Sun Oct 31 15:56:11 CET 2004


On Oct 30, 2004, at 11:33 PM, ClaudiusMaximus wrote:

> Hans-Christoph Steiner wrote:
>> Yes, this should be quite easy to do on GNU/Linux as long as you are   
>> using the Linux input event system.  Any relatively recent 2.4.x  
>> kernel  will support it, or all 2.6.x kernels.  Basically, if you  
>> load the  'evdev' module, all USB devices get their own  
>> /dev/input/event? device.   So your USB keyboard will show up there.   
>> What I don't know off hand  is how the console and X/GNOME/KDE will  
>> deal with multiple keyboards.   I'd be interested to hear whether   
>> all of the keyboards' output is  grabbed.
>
> It seems that it is the case that all of the keyboards are grabbed: I  
> plugged in both keyboards (one normal, one USB) and typing on both  
> showed up in the same terminal window (this is a gterm in GNOME).   
> This was without evdev loaded.
>
> Then I did an /sbin/modprobe evdev, and it behaved the same way - both  
> keyboards had the same effect when typing.

I haven't ever looked deeply into how the keyboard output is grabbed  
and handled, so I don't know the details.  It would be great to know  
for just this reason.  evdev gives you the /dev/input/event? devices,  
so that's not how your setup is getting keyboard output.  My guess is  
that the console is getting the keyboard output, then X/GNOME gets it  
from the console.  One way to test that is to see whether both  
keyboards work in a plain console window (i.e. no X) without evdev or  
any extra modules loaded.

With evdev, you will be able to get the info from each keyboard  
separately.  Each keyboard will have its own /dev/input/event? device.   
PS/2 keyboards will only have a /dev/input/event? device with 2.6  
kernels. AFAIK, PS/2 keyboards and mice are not supported by the Linux  
input event system in 2.4.

.hc

________________________________________________________________________ 
____

Man has survived hitherto because he was too ignorant to know how to  
realize his wishes.
Now that he can realize them, he must either change them, or perish.
		                                     -William Carlos Williams





More information about the Pd-list mailing list