Need some pointers, want to change portions of saa7134-input.c to filter out 0x80000000 events (key up)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: video4linux-list@xxxxxxxxxx
- Subject: Need some pointers, want to change portions of saa7134-input.c to filter out 0x80000000 events (key up)
- From: Ole Andre Schistad <oschista@xxxxxxxxx>
- Date: Mon, 24 Nov 2003 20:02:11 +0100
- User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4b) Gecko/20030507
Well as the subject says I need some pointers to the relevant portion of
code which generates events in /dev/input/eventN. The reason I am
looking to change the code is so that I can mask out the second event
that always shows up after a button press, what I believe to be the
button up event. The reason I wish to do this is that, as I've mentioned
before, this second event stays on the top of the stack and is read
instead of the real button code the next time a button is pressed - long
story short, this particular behaviour does not work very well at all
with lirc and I would like to remove it from the code.
I can see that there's a keypress mask being AND'ed to the input key. I
presume that this is to distinguish the button down event and to
generate an event when this AND mask produces a non-zero result.
Unfortunately the code will still end up being output (guessing here) if
it doesn't fit the mask - there just isn't a keydown event to go with
it. Guess what happens the next time a program gets a signal and wants
to read the input? Right, you get a bogus event instead of the real one,
and the NEXT time an event is generated, the previous button press is at
the top of the buffer.
My question then is simply what the easiest and/or future-proof way of
filtering out *all* codes that do not match the bitpattern (or which DO
mask the bitpattern, depending on polarity) from appearing in
/dev/input? Help me with this and I'm home free (I hope) - this is the
only real issue that remains in my setup before everything works the way
it should.
Cheers,
Ole Andre
[Index of Archives]
[Linux DVB]
[Video Disk Recorder]
[Asterisk]
[Photo]
[DCCP]
[Netdev]
[Xorg]
[Util Linux NG]
[Xfree86]
[Free Photo Albums]
[Fedora Users]
[Fedora Women]
[ALSA Users]
[ALSA Devel]
[Linux USB]