Re: detecting when keys are being pressed on a keyboard
Oliver Neukum <[email protected]>
| Newsgroups | gmane.linux.usb.devel,gmane.linux.kernel.input |
|---|---|
| Message-ID | <[email protected]> |
Am Freitag 21 September 2007 schrieb Jiri Kosina: > On Fri, 21 Sep 2007, Oliver Neukum wrote: > > > I got the strange case of a keyboard going into autosuspend while a key > > was being pressed. The key release never arrived and I had to unplug the > > keyboard to get the key unstuck. Is there a clean way to learn from > > hid-core.c if a keyboard has keys pressed? > > Hi Oliver, > > HID doesn't keep any permanent state by itself. If you want to know > whether a given key is currently pressed or not, you'd have to inspect the > bitfields inside input_dev*, I am afraid. I see no way to do this without a race condition. The field isn't locked as far as I can tell. Secondly, what is to happen in case of a system wide suspend? Will the system wake up thinking that the key is still pressed? Regards Oliver ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel