Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: usb device modifying state of another driver on plug/unplug event
On Wed, Jun 19, 2019 at 07:36:37AM +0200, Michael van Elst wrote:
>
> The only way to identify a device is its driver name. So it is pretty
> trivial to identify mice (ums), keyboards (ukbd) or flash drives (umass).
>
Ah, ok. That should do the trick then.
> But what if you have two mice and want one to have precedence over the other?
>
No, just simply disable the trackpad when a mouse is plugged in, enable
it again when the mouse is detached. Having multiple mice attached is
not something that I feel needs to be catered for. The worst that would
happen is the trackpad would get enabled if a second mouse was
attached/detached... that's fine.
>
> Disabling a mouse can be done without detaching the driver. Mice
> automatically attach as wsmouse* to wsmux0. You can use wsmuxctl
> to attach/detach specific mice. A simple strategy would be to
> keep the highest numbered wsmouse* device as internal devices
> usually attach before external ones, but that's not a guarantee,
> in particular if the internal device is also USB.
>
I was going to just follow the FreeBSD example and set the finger
pressure so high that it would never detect and event which is good
enough for me.
Thanks for everyones patience and guidance on this. I am glad that we
can do this without any extra hacking.
I will try and put together a section in the NetBSD guide for this. At
the moment it seems that the only mention in the guide related to
devpubd is managing removable media.
--
Sent from my NetBSD device.
"We are were wolves",
"You mean werewolves?",
"No we were wolves, now we are something else entirely",
"Oh"
Home |
Main Index |
Thread Index |
Old Index