Well, it’s obviously possible, since for example the Gimp is able to
automagically change tool and settings based on what input device is
active (ie each mouse, tablet device, etc has its own settings). In
multiple-device ignorant apps, everything just works as a regular mouse.
That are good news. Just in general: same situation in the Win32
(Win2K, …) OSes?
For this to work, X has to be aware of all input devices you want to
use, so you’ve got to have an InputDevice section for each input device
in XF86Config or xorg.conf. I’ve got mouse on /dev/input/mouse0, and
tablet devices (cursor, stylus and mouse) on /dev/input/event2, for
example. Even though three of these are on event2, this gives me 4
different device IDs that can be used independently in the Gimp, so it
seems the ID doesn’t actually rely on device.
Here I had no success: a mouse definition with /dev/input/event2
fails, cause the mouse is not recognized.
Then I tried three mouse section in the XF86Config:
Mouse with /dev/mouse (ps2)
Mouse with /dev/mouse0 (usb)
Mouse with /dev/mouse1 (usb)
The there mouses are recogniced and are working but all of them
have the same ID (here: 72). Any ideas?
I don’t know how to use this, but since GTK+ seems to do it right, that
might be a good place to start looking.
That are not good news. Gtk+/Gimp is not a small application
which I can use to browse and understand the source code…
Funny someone should bring this up now, I just thought about the
possibilities of using two mice in a game yesterday =).
That’s what I’m working on… but without success until now
Btw, anyone know if there’s any plans for multiple device support in SDL
1.3 or 2 ?
As long as I see there is at least a field in the
SDL_MouseButtonEvent structure (SDL_events.h:
event->which /* the mouse device index */).
May be someone can fill it with live
| Triad Berlin Projektgesellschaft mbH | http://www.triad.de/ |