Extra remote control keys

Message ID 4E0AB048CF%linux@youmustbejoking.demon.co.uk
State New
Headers

Commit Message

Darren Salt March 20, 2006, 6:22 p.m. UTC
  The attached patches provide support for three keys found on some remote
controls such as the A415 (supplied with various current Hauppauge cards).

The keys are "repeat", "skip" and "previous channel". The last of these is
obvious; the other two duplicate the functions of the yellow and green
buttons during recording playback.

(If the first two are accepted, I'll apply the third one to xine-lib CVS.)
  

Comments

Peter Juszack March 20, 2006, 7:39 p.m. UTC | #1
Darren Salt wrote:
> The attached patches provide support for three keys found on some remote
> controls such as the A415 (supplied with various current Hauppauge cards).
>
> The keys are "repeat", "skip" and "previous channel". The last of these is
> obvious; the other two duplicate the functions of the yellow and green
> buttons during recording playback.
>
> (If the first two are accepted, I'll apply the third one to xine-lib CVS.)
>
>   
>
I also wrote a patch for at least  the 'repeat' and 'skip' key. Previous 
Channel I assigned to a user
key and connected it to zaphistory plugin in keymacros.conf.

I have also made patches for dvd, mp3 and images plugins to use the 2 
new  keys. Unfortunately
not compatible to Darrens VDR patch because the k.... constant names are 
different.

Patches and zaphistory plugin can be found here:
http://vaasa.wi-bw.tfh-wildau.de/~pjuszack/digicam


best regards
Peter
  
Darren Salt March 20, 2006, 8 p.m. UTC | #2
I demand that Peter Juszack may or may not have written...

> Darren Salt wrote:
>> The attached patches provide support for three keys found on some remote
>> controls such as the A415 (supplied with various current Hauppauge cards).

>> The keys are "repeat", "skip" and "previous channel". The last of these is
>> obvious; the other two duplicate the functions of the yellow and green
>> buttons during recording playback.

>> (If the first two are accepted, I'll apply the third one to xine-lib CVS.)

> I also wrote a patch for at least  the 'repeat' and 'skip' key. 

You've used them differently, I see; only the naming is incompatible, AFAICT.
"Previous" and "Next" does seem more appropriate.

> Previous Channel I assigned to a user key and connected it to zaphistory
> plugin in keymacros.conf.

Not a problem, but it's a distinct VDR function a^\nd, since there's a key
for it on some (common?) remote controls, I think that it deserves a VDR key
code for itself.

The * and # keys don't, though; their placement on that remote control makes
them suitable for use as duplicate OK and Back buttons.

(I see that that remote control is described as "ergonomic". R808 - the older
grey/black one - has a better layout...)

[snip]
  

Patch

diff -urNad vdr-1.3.44~/keys.c vdr-1.3.44/keys.c
--- vdr-1.3.44~/keys.c	2006-03-20 04:22:15.000000000 +0000
+++ vdr-1.3.44/keys.c	2006-03-20 04:22:17.705949528 +0000
@@ -39,9 +39,12 @@ 
                     { kRecord,        "Record"     },
                     { kFastFwd,       "FastFwd"    },
                     { kFastRew,       "FastRew"    },
+                    { kSkipBack,      "SkipBack"   },
+                    { kSkipFwd,       "SkipFwd"    },
                     { kPower,         "Power"      },
                     { kChanUp,        "Channel+"   },
                     { kChanDn,        "Channel-"   },
+                    { kChanPrev,      "PrevChannel"},
                     { kVolUp,         "Volume+"    },
                     { kVolDn,         "Volume-"    },
                     { kMute,          "Mute"       },
diff -urNad vdr-1.3.44~/keys.h vdr-1.3.44/keys.h
--- vdr-1.3.44~/keys.h	2006-03-20 04:22:15.000000000 +0000
+++ vdr-1.3.44/keys.h	2006-03-20 04:22:17.705949528 +0000
@@ -33,9 +33,12 @@ 
              kRecord,
              kFastFwd,
              kFastRew,
+             kSkipBack,
+             kSkipFwd,
              kPower,
              kChanUp,
              kChanDn,
+             kChanPrev,
              kVolUp,
              kVolDn,
              kMute,
diff -urNad vdr-1.3.44~/menu.c vdr-1.3.44/menu.c
--- vdr-1.3.44~/menu.c	2006-03-20 04:22:17.000000000 +0000
+++ vdr-1.3.44/menu.c	2006-03-20 04:22:17.705949528 +0000
@@ -4174,8 +4174,12 @@ 
     case kFastFwd:
     case kRight:   Forward(); break;
     case kRed:     TimeSearch(); break;
+    case kSkipBack|k_Repeat:
+    case kSkipBack:
     case kGreen|k_Repeat:
     case kGreen:   SkipSeconds(-60); break;
+    case kSkipFwd|k_Repeat:
+    case kSkipFwd:
     case kYellow|k_Repeat:
     case kYellow:  SkipSeconds( 60); break;
     case kStop:
diff -urNad vdr-1.3.44~/vdr.c vdr-1.3.44/vdr.c
--- vdr-1.3.44~/vdr.c	2006-03-20 04:22:16.000000000 +0000
+++ vdr-1.3.44/vdr.c	2006-03-20 04:22:24.665500778 +0000
@@ -1036,6 +1036,7 @@ 
               }
            switch (key) {
              // Toggle channels:
+             case kChanPrev:
              case k0: {
                   if (PreviousChannel[PreviousChannelIndex ^ 1] == LastChannel || LastChannel != PreviousChannel[0] && LastChannel != PreviousChannel[1])
                      PreviousChannelIndex ^= 1;