cec: log keypresses in the debug log
authorLars Op den Kamp <lars@opdenkamp.eu>
Fri, 14 Oct 2011 10:22:15 +0000 (12:22 +0200)
committerLars Op den Kamp <lars@opdenkamp.eu>
Fri, 14 Oct 2011 10:22:15 +0000 (12:22 +0200)
src/lib/CECProcessor.cpp

index 7ddf61297456c8942fae0582237f33cb7c1d10c0..b5796716d099e8cf27e4ccb48a3dfdade75539bb 100644 (file)
@@ -560,7 +560,13 @@ void CCECProcessor::ParseCommand(cec_command &command)
         m_controller->AddKey();
 
         if (command.parameters[0] <= CEC_USER_CONTROL_CODE_MAX)
+        {
+          CStdString strLog;
+          strLog.Format("key pressed: %1x", command.parameters[0]);
+          m_controller->AddLog(CEC_LOG_DEBUG, strLog.c_str());
+
           m_controller->SetCurrentButton((cec_user_control_code) command.parameters[0]);
+        }
       }
       break;
     case CEC_OPCODE_USER_CONTROL_RELEASE: