[ltp] Kernel 2.6 and two mice
James Hawtin
linux-thinkpad@linux-thinkpad.org
Tue, 25 May 2004 19:26:32 +0000
On Tue, May 25, 2004 at 12:03:45PM +0200, Edi Weitz wrote:
> I think the 2.6 way to do this is with udev instead of devfs. I had
> already tried that (see my original email) and, in fact,
> /dev/input/mouse1 disappears if I unplug the mouse and it re-appears
> if I plug it in again. But, still, mouse movements can only be
> observed through /dev/input/mice, not through /dev/input/mouse1 after
> unplugging.
No that is as it should be mice is the unified device for all (USB) mice on the
system, mouse1 one mouse currently plugged in. If you unplug it, mouse1
stops being a valid mouse device, when you plug it back it is a new mouse,
and is assigned the the first available mouse device mouse1. Just because it
was assigned the same device it does not mean that all programs have to keep
working with it. It could have been a completely different mouse...
Think of it this way if you tail -f a file then delete the file then create
a new file with the same name, tail -f does not magically pick up the new
file it just stops.... The same is true of mouse1 the name may be the same
but its a different device. "mice" a special device to unify mice on the
system and to be aways present.
James