I have a spare USB qwerty keyboard lying around not doing anything useful, and I was wondering whether it is possible to have two keyboards connected to the same PC (running GNU/Linux Red Hat 9 PlanetCCRMA) without the OS getting horribly confused. Has anyone tried this successfully? How do you set it up (what externals etc do I need)?
The plan is to have the USB keyboard as an interface to trigger Pd events (I like the tracker-style 2.5 octave set-up) while the normal keyboard is used simultaneously for text entry.
Extending this idea, what about one standard qwerty keyboard for typing and multiple USB qwerty keyboards (with multiple humans) for controlling Pd?
I'm too poor to afford all these fancy OSC control surfaces that seem to be all the rage these days...
I read:
I have a spare USB qwerty keyboard lying around not doing anything useful, and I was wondering whether it is possible to have two keyboards connected to the same PC (running GNU/Linux Red Hat 9 PlanetCCRMA) without the OS getting horribly confused. Has anyone tried this successfully?
I'm curenntly investigating this, but it looks like what was easy with the mouse is a terrible mess with keyboards (I'd love to be corrected)
see-> http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html_single/XFree-... -> http://www.linuxplanet.com/linuxplanet/tutorials/3100/1/ -> http://www.ltn.lv/~aivils/
How do you set it up (what externals etc do I need)?
see above, hans' linux hid/event objects wil come in handy once it works I guess.
HTH
x
On Oct 27, 2004, at 6:16 AM, CK wrote:
I read:
I have a spare USB qwerty keyboard lying around not doing anything useful, and I was wondering whether it is possible to have two
keyboards connected to the same PC (running GNU/Linux Red Hat 9 PlanetCCRMA) without the OS getting horribly confused. Has anyone tried this successfully?I'm curenntly investigating this, but it looks like what was easy with the mouse is a terrible mess with keyboards (I'd love to be corrected)
see->
http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html_single/ XFree-Local-multi-user-HOWTO.html -> http://www.linuxplanet.com/linuxplanet/tutorials/3100/1/ -> http://www.ltn.lv/~aivils/
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.
How do you set it up (what externals etc do I need)?
see above, hans' linux hid/event objects wil come in handy once it
works I guess.
Yup, the [hid] object I am working on right now will do this now no
problem. This works with [linuxevent] as well, but my [linux*] objects
are deprecated since [hid] does all that they do and much more in a
cross-platform manner. I'd love to have alpha/beta testers!
.hc
"If nature has made any one thing less susceptible than all others of
exclusive property, it is the action of the thinking power called an
idea, which an individual may exclusively possess as long as he keeps
it to himself; but the moment it is divulged, it forces itself into the
possession of everyone, and the receiver cannot dispossess himself of
it."
- Thomas Jefferson
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.
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
On Sunday 31 October 2004 03:33, ClaudiusMaximus wrote:
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.
But do you want this? I had a problem with using a keypress to trigger a loop, because pd also sents it to the currently clicked numberbox f.i. What happended: I just set the tempo to 170 BPM in a numberbox and didn't bother clicking the canvas afterwards. Then I pressed 1 to start the first loop, and behold, the tempo got set to 1 BPM as well, so not much was happening. The focus is visible if you use numberbox2, but not on a "classic"-numberbox/ So using a secondary keyboard, it might be better to disable it as an X-windows ikeyboard-device, and use the hid-object to parse the input. That way you won't get these nasty surprises.
ciao
Gerard
Then I did an /sbin/modprobe evdev, and it behaved the same way - both keyboards had the same effect when typing.
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://iem.at/cgi-bin/mailman/listinfo/pd-list
vanDongen/Gilcher wrote:
On Sunday 31 October 2004 03:33, ClaudiusMaximus wrote:
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.
But do you want this?
No!
I had a problem with using a keypress to trigger a loop, because pd also sents it to the currently clicked numberbox f.i. What happended: I just set the tempo to 170 BPM in a numberbox and didn't bother clicking the canvas afterwards. Then I pressed 1 to start the first loop, and behold, the tempo got set to 1 BPM as well, so not much was happening. The focus is visible if you use numberbox2, but not on a "classic"-numberbox/
So using a secondary keyboard, it might be better to disable it as an X-windows ikeyboard-device, and use the hid-object to parse the input. That way you won't get these nasty surprises.
That's exactly what I want to do and why I want to do it, but I don't know how!
The links that CK provided earlier in this thread seemed to be about dual-head systems (with multiple Linux consoles each with their own keyboard) and require kernel and X-server patches, whereas what I want seems to be a lot simpler on the surface, just requires stopping the X-server from recognising the USB keyboard as an input device.
ciao
Gerard
Hallo, ClaudiusMaximus hat gesagt: // ClaudiusMaximus wrote:
The links that CK provided earlier in this thread seemed to be about dual-head systems (with multiple Linux consoles each with their own keyboard) and require kernel and X-server patches, whereas what I want seems to be a lot simpler on the surface, just requires stopping the X-server from recognising the USB keyboard as an input device.
You probably need some magic inside XF86Config-4 or whatever version of X you use. I'm sure it's possible, but you might want to search for X-experts, which I'm not. ;(
Frank Barknecht _ ______footils.org__