From: Vojtech P. <vo...@su...> - 2000-07-04 12:46:52
|
On Tue, Jul 04, 2000 at 02:12:28PM +0200, Franz Sirl wrote: > > > Hmm. Let me think about that... What will the application see? I don't see > > > a type like EV_STATUSCHANGE with events like CONNECT, DISCONNECT, CHANGED? > > > >Right now, the events from the device will just stop coming in. > > Hmm, this means even input layer aware applications will have no chance to > react? Is anything planned in this area? This has to be solved. I'm open to suggestions, here go two that could work: 1) Have a /proc/bus/input/devices file (or some elseplace a similar node) that'd list currently existant input devices. select() on it would tell the app that the list has changed and should be reread. Nothing needs to be changed in evdev.c behaviour. 2) Like 1 but also return -ENODEV on read to non-existing devices (instead blocking / returning -EAGAIN forever). 3) As you suggest, EV_STATUS or something like that telling the app the device is gone and/or reconnected. > Heh, but they mix to "legacy" console devices (or do I miss something > here?), I want an event protocol device :-). Remember, on PPC we used ADB > scancodes so far. I don't wan't to change to AT scancodes now and then > again to events, when the input layer is 100% ready. That's why I want a > /dev/input/keyboards, running the event protocol. I'll make it CONFIG_PPC > specific if you want. I think it'd be better to solve the connect/disconnect issue once and forever and mix the data in userland. You'd need to add a lot of stuff to evdev.c (usecounting ala mousedev.c which is plain ugly) to implement the keyboards device. > I have a feeling that this might be related to key repeat. What happens to > the repeat timers on console switch? The repeat is handled in input.c. It doesn't know of console switches. > Also do you know if the LED's on USB keyboards work correctly on a PC? Yes, both with plain 2.4 kernels and 2.4+ruby. > Benjamin is working with the USB analyzer today and will look at this. > Benjamin Herrenschmidt wrote a few minutes ago on IRC/#mklinux/EFnet: > <BenH> Also, I have the HID specs, I'll be able to look at those LEDs > problems. I'd like to know if they work on PC however They do. > <BenH> Looks like apple leaves KBDs in boot protocol on MacOS 9 We'll have to switch it to full HID then. But I think we're already doing that in hid.c > <BenH> They do a SetProtocol(0), a SetIdle, a few SetReport and that's all Makes sense. -- Vojtech Pavlik SuSE Labs |