From: Vojtech P. <vo...@su...> - 2002-10-08 08:33:24
|
On Fri, Sep 27, 2002 at 01:22:39PM -0600, Brad Midgley wrote: > > Right now i am putting together a system which (among other) uses > > a userspace mechanism to determine the vt which it should bind > > keyboards to. for conveniance i am useing the hotplug interface > > and consider extending hotplug to return vt numbers. > > i wrote an app a while ago that put up "press 0" and "press 1" etc on each head and used the result to map keyboards. (it was in conjunction with a failed attempt to patch the kernel for multihead) > > i looked a bit and couldn't find the source, but you get the idea. > > one problem is that two usb keyboards would come up in a random order and you'd have to do this at every boot and every time keyboards were plugged/unplugged. not fun. do usb keyboards have a serial number? (dreaming i'm sure) No, but they have the "PHYS" value readable from either /dev/input/event devices using an ioctl, or from /proc/bus/input/devices. This reflects which connector on the USB Hub they're connected to. -- Vojtech Pavlik SuSE Labs |