Re: 'key repeat' in lirc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Thu, 10 May 2001, Adam wrote:
> However, the big problem is repeat stuff, and I'm wondering what's
> "The Right Way(tm)" to solve this problem.


I'm not sure I understand what the problem is.  Is the problem that there is
no way to see if a key has been pressed recently?  i.e. if you read the data
from GPIO you get the scan code of the last key pressed, even if it was
pressed 30 seconds ago and you have read the same data 300 times already?

Or is the problem that there is no way to tell the difference between someone
holding down a key, or pushing it repeatedly?

If it's the first problem, then that's a real bitch.  Maybe there should be an
interrupt generated on a key press?  I think you'll have to generate an event
only when the scan code changes, which would make it impossible to push the
same key twice in a row.

If it's the second, that's not much of a problem.  Some remotes generate a
special code when a key is held down, like the packard bell fastmedia remote. 
Other's omit the header code on repeat keys, like my JVC VCR.  But a lot of
others don't do anything at all, they just send the exact same code over again
when a key is held down.

What I did was just have the repeat count increase if the key is the same, and
some threshold time had't elapsed.  Clients can choose if they want to do
something on every repeat of a key, or only the first one.  For instance, when
changing channels, if you push '1' you get a single '1', not '11' or '111'. 
But if you push the channel + key, the channels keep going up as you hold it
down.

You can't tell it very well by looking at the code or credits, but I wrote
much of LIRC.  Some hosers just took my code and deleted my name and stuck
theirs in.  Somehow blatant plagiarism is ok if you steal from an open source
project, but do it from a book and you can get expelled or your career ruined.





[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]

Powered by Linux