--- org/remote.c	2006-05-13 09:57:25.000000000 +0200
+++ ./remote.c	2006-05-13 10:04:54.000000000 +0200
@@ -22,6 +22,7 @@
 #define REPEATTIMEOUT  1000 // ms

 eKeys cRemote::keys[MaxKeys];
+bool cRemote::disabled = false;
 int cRemote::in = 0;
 int cRemote::out = 0;
 cTimeMs cRemote::repeatTimeout;
@@ -180,7 +181,7 @@
             out = 0;
          if ((k & k_Repeat) != 0)
             repeatTimeout.Set(REPEATTIMEOUT);
-         return k;
+         return disabled ? kNone : k;
          }
       else if (learning && UnknownCode && unknownCode) {
          *UnknownCode = unknownCode;
--- org/remote.h	2006-05-13 09:57:25.000000000 +0200
+++ ./remote.h	2006-05-13 10:00:13.000000000 +0200
@@ -30,6 +30,7 @@
   static cCondVar keyPressed;
   static const char *plugin;
   char *name;
+  static bool disabled;
 protected:
   cRemote(const char *Name);
   const char *GetSetup(void);
@@ -43,6 +44,8 @@
   const char *Name(void) { return name; }
   static void SetLearning(cRemote *Learning) { learning = Learning; }
   static bool IsLearning() { return learning != NULL; }
+  static void Disable() { disabled = true; }
+  static void Enable() { disabled = false; }
   static void Clear(void);
   static bool Put(eKeys Key, bool AtFront = false);
   static bool PutMacro(eKeys Key);
--- org/svdrp.c	2006-05-13 09:50:50.000000000 +0200
+++ ./svdrp.c	2006-05-13 10:25:45.000000000 +0200
@@ -187,6 +187,8 @@
   "    it returns the current channel number and name.",
   "CLRE\n"
   "    Clear the entire EPG list.",
+  "CTRL <on|off>\n"
+  "    Enable/Disable Input devices.",
   "DELC <number>\n"
   "    Delete channel.",
   "DELR <number>\n"
@@ -539,6 +541,26 @@
   Reply(250, "EPG data cleared");
 }

+void cSVDRP::CmdCTRL(const char *Option)
+{
+  if (*Option) {
+    if (!strcmp( Option, "on" )) {
+      cRemote::Enable();
+      Reply(250, "Input Control enabled");
+      }
+    else {
+      if (!strcmp( Option, "off" )) {
+        cRemote::Disable();
+        Reply(250, "Input Control disabled");
+        }
+      else
+        Reply(250, "Illegal Command %s", Option);
+      }
+    }
+  else
+    Reply(250, "Parameter missing");
+}
+
 void cSVDRP::CmdDELC(const char *Option)
 {
   if (*Option) {
@@ -1420,7 +1442,7 @@
   else
      Reply(550, "No recordings available");
 }
-						
+
 void cSVDRP::CmdSTAT(const char *Option)
 {
   if (*Option) {
@@ -1513,6 +1535,7 @@
   s = skipspace(s);
   if      (CMD("CHAN"))  CmdCHAN(s);
   else if (CMD("CLRE"))  CmdCLRE(s);
+  else if (CMD("CTRL"))  CmdCTRL(s);
   else if (CMD("DELC"))  CmdDELC(s);
   else if (CMD("DELR"))  CmdDELR(s);
   else if (CMD("DELT"))  CmdDELT(s);
--- org/svdrp.h	2006-05-13 09:50:50.000000000 +0200
+++ ./svdrp.h	2006-05-13 10:21:59.000000000 +0200
@@ -56,6 +56,7 @@
   void PrintHelpTopics(const char **hp);
   void CmdCHAN(const char *Option);
   void CmdCLRE(const char *Option);
+  void CmdCTRL(const char *Option);
   void CmdDELC(const char *Option);
   void CmdDELR(const char *Option);
   void CmdDELT(const char *Option);

