Thread (8 messages) 8 messages, 3 authors, 2007-09-24

Re: detecting when keys are being pressed on a keyboard

flat view

From: Jiri Kosina <hidden>
Date: 2007-09-24 13:45:59

On Mon, 24 Sep 2007, Oliver Neukum wrote:
quoted
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.
Hi Oliver,

Dmitry (CC added) has been doing a lot of rework of locking in input as 
far as I know. He would know this better.
Secondly, what is to happen in case of a system wide suspend? Will
the system wake up thinking that the key is still pressed?
If the release event didn't happen before the machine went to suspend, I'd 
say so.

-- 
Jiri Kosina

-------------------------------------------------------------------------
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/
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help