Index: libs/libmyth/mythcontext.h
===================================================================
--- libs/libmyth/mythcontext.h	(revision 8529)
+++ libs/libmyth/mythcontext.h	(working copy)
@@ -391,6 +391,7 @@
 
     // get the current status
     bool GetScreensaverEnabled(void);
+    bool GetScreenIsAsleep(void);
 
     void addPrivRequest(MythPrivRequest::Type t, void *data);
     void waitPrivRequest() const;
Index: libs/libmyth/mythdialogs.cpp
===================================================================
--- libs/libmyth/mythdialogs.cpp	(revision 8529)
+++ libs/libmyth/mythdialogs.cpp	(working copy)
@@ -816,6 +816,12 @@
         LircKeycodeEvent *lke = (LircKeycodeEvent *)ce;
         int keycode = lke->getKeycode();
 
+        if (gContext->GetScreenIsAsleep())
+        {
+            gContext->ResetScreensaver();
+            return;
+        }
+
         if (keycode) 
         {
             gContext->ResetScreensaver();
@@ -863,6 +869,12 @@
         JoystickKeycodeEvent *jke = (JoystickKeycodeEvent *)ce;
         int keycode = jke->getKeycode();
 
+        if (gContext->GetScreenIsAsleep())
+        {
+            gContext->ResetScreensaver();
+            return;
+        }
+
         if (keycode) 
         {
             gContext->ResetScreensaver();
Index: libs/libmyth/mythcontext.cpp
===================================================================
--- libs/libmyth/mythcontext.cpp	(revision 8529)
+++ libs/libmyth/mythcontext.cpp	(working copy)
@@ -2572,6 +2572,12 @@
     return d->screensaverEnabled;
 }
 
+bool MythContext::GetScreenIsAsleep(void)
+{
+    if (!d->screensaver)
+        return false;
+    return d->screensaver->Asleep();
+}
 
 void MythContext::LogEntry(const QString &module, int priority,
                            const QString &message, const QString &details)
