From patchwork Mon Feb 20 13:23:21 2006 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Juszack X-Patchwork-Id: 12211 Received: from natsluvver.rzone.de ([81.169.145.176]) by www.linuxtv.org with esmtp (Exim 4.50) id 1FBB0j-0007CY-Oo for vdr@linuxtv.org; Mon, 20 Feb 2006 14:23:29 +0100 Received: from [192.168.50.4] (dialin-145-254-062-190.pools.arcor-ip.net [145.254.62.190]) (authenticated bits=0) by post.webmailer.de (8.13.1/8.13.1) with ESMTP id k1KDNL6R004048 for ; Mon, 20 Feb 2006 14:23:25 +0100 (MET) Message-ID: <43F9C2C9.5030204@unterbrecher.de> Date: Mon, 20 Feb 2006 14:23:21 +0100 From: Peter Juszack User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en MIME-Version: 1.0 To: "vdr@linuxtv.org" Subject: [vdr] Patch to use Skip keys (Next + Previous) X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: VDR Mailing List List-Id: VDR Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Feb 2006 13:23:29 -0000 Status: O X-Status: X-Keywords: X-UID: 8017 Hallo Since a long time I wondered when the very common skip keys are available in VDR. I believe these keys are available but unused on most remote controls. The attached patch adds to new keys kNext and kPrevious to keys.h and keys.c. The patch modifies vdr.c and menu.c to switch channel up/down whith the new keys. I also modified the mp3 and dvd plugins to use the new keys. I can provide patches therefor if the patch will be intergrated in VDR. As logical mp3 jumps between tracks. When playing a DVD Next and Previous have the same meaning like 4 and 6 and jump between DVD chapters. That is the common behaviour of stand-alone DVD players. Very smart when replaying music DVDs because the different songs are DVD chapters. I can also imagine to use Prev/Next to navigate between cutting marks in a recording. (not yet implemented) If you find the new keys useful please contact the list to convince Klaus to integrate the patch. Regards Peter diff -Naur vdr-1.3.43.orig/keys.c vdr-1.3.43/keys.c --- vdr-1.3.43.orig/keys.c 2006-02-20 14:04:53.000000000 +0100 +++ vdr-1.3.43/keys.c 2006-02-20 14:05:18.000000000 +0100 @@ -39,6 +39,8 @@ { kRecord, "Record" }, { kFastFwd, "FastFwd" }, { kFastRew, "FastRew" }, + { kNext, "Next" }, + { kPrevious, "Previous" }, { kPower, "Power" }, { kChanUp, "Channel+" }, { kChanDn, "Channel-" }, diff -Naur vdr-1.3.43.orig/keys.h vdr-1.3.43/keys.h --- vdr-1.3.43.orig/keys.h 2006-02-20 14:04:53.000000000 +0100 +++ vdr-1.3.43/keys.h 2006-02-20 14:05:22.000000000 +0100 @@ -33,6 +33,8 @@ kRecord, kFastFwd, kFastRew, + kNext, + kPrevious, kPower, kChanUp, kChanDn, diff -Naur vdr-1.3.43.orig/menu.c vdr-1.3.43/menu.c --- vdr-1.3.43.orig/menu.c 2006-02-20 14:04:53.000000000 +0100 +++ vdr-1.3.43/menu.c 2006-02-20 14:10:09.000000000 +0100 @@ -3170,12 +3170,16 @@ case kUp: case kDown|k_Repeat: case kDown: + case kNext|k_Repeat: + case kNext: + case kPrevious|k_Repeat: + case kPrevious: case kChanUp|k_Repeat: case kChanUp: case kChanDn|k_Repeat: case kChanDn: { eKeys k = NORMALKEY(Key); - cChannel *ch = NextAvailableChannel(channel, (k == kUp || k == kChanUp) ? 1 : -1); + cChannel *ch = NextAvailableChannel(channel, (k == kUp || k == kChanUp || k == kNext) ? 1 : -1); if (ch) channel = ch; else if (channel && channel->Number() != cDevice::CurrentChannel()) @@ -3184,6 +3188,8 @@ // no break here case kUp|k_Release: case kDown|k_Release: + case kNext|k_Release: + case kPrevious|k_Release: case kChanUp|k_Release: case kChanDn|k_Release: if (!(Key & k_Repeat) && channel && channel->Number() != cDevice::CurrentChannel()) diff -Naur vdr-1.3.43.orig/vdr.c vdr-1.3.43/vdr.c --- vdr-1.3.43.orig/vdr.c 2006-02-20 14:04:53.000000000 +0100 +++ vdr-1.3.43/vdr.c 2006-02-20 14:05:30.000000000 +0100 @@ -1018,6 +1018,11 @@ case kLeft: case kRight|k_Repeat: case kRight: + // Skip Channel Select: + case kPrevious|k_Repeat: + case kPrevious: + case kNext|k_Repeat: + case kNext: // Up/Down Channel Select: case kUp|k_Repeat: case kUp: