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:
Peter Juszack wrote:
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 don't really see the reason why there should be yet another pair of keys for switching channels up/down - there is already kChanUp/kChanDn. Wouldn't it make more sense to use kPrev/kNext for jumping between channel groups?
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)
I've added that.
Klaus