On 9/24/07, Oliver Neukum [off-list ref] wrote:
Am Montag 24 September 2007 schrieb Dmitry Torokhov:
quoted
Hi Oliver,
On 9/24/07, Oliver Neukum [off-list ref] wrote:
quoted
Am Freitag 21 September 2007 schrieb Jiri Kosina:
quoted
quoted
quoted
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.
You can take input_dev->event_lock to stop event from propagating
through input core while you are evaluating the bits. Input lcoking
changes are im -mm and will be merged into 2.6.24.
Hi Dmitry,
I was thinking about a second approach. As all keypresses run through
the interrupt handlers of the hid driver, how about checking the bit field
in the interrupt handler after calling hid_input_report() ?
That should work as well I think.
--
Dmitry