diff --git a/HISTORY b/HISTORY index da1741f6..bb3d7039 100644 --- a/HISTORY +++ b/HISTORY @@ -9348,7 +9348,7 @@ Video Disk Recorder Revision History Senzel). - Official release. -2019-05-07: Version 2.4.1 +2019-05-13: Version 2.4.1 - Fixed handling the tfRecording flag in the SVDRP commands MODT and UPDT (reported by Johann Friedrichs). @@ -9404,3 +9404,4 @@ Video Disk Recorder Revision History - Fixed handling remote timers in case the response to LSTT is '550 No timers defined'. - Fixed a compiler warning in cIndexFile::ConvertToPes() and added __attribute__((packed)) to tIndexPes and tIndexTs (suggested by Helmut Binder). +- Fixed handling repeat function for keyboards. diff --git a/remote.c b/remote.c index ac10dce7..cc802442 100644 --- a/remote.c +++ b/remote.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: remote.c 3.3 2015/01/20 14:53:57 kls Exp $ + * $Id: remote.c 4.1 2019/05/13 13:01:44 kls Exp $ */ #include "remote.h" @@ -307,7 +307,7 @@ void cKbdRemote::PutKey(uint64_t Code, bool Repeat, bool Release) int cKbdRemote::ReadKey(void) { cPoller Poller(STDIN_FILENO); - if (Poller.Poll(50)) { + if (Poller.Poll(Setup.RcRepeatDelta * 3 / 2)) { uchar ch = 0; int r = safe_read(STDIN_FILENO, &ch, 1); if (r == 1) @@ -431,6 +431,11 @@ void cKbdRemote::Action(void) FirstCommand = 0; FirstTime.Set(); } + else if (FirstCommand && FirstTime.Elapsed() > (uint)Setup.RcRepeatDelay) { + // Don't wait too long for that second key press: + Delayed = false; + FirstCommand = 0; + } LastCommand = Command; } }