From: Lars Op den Kamp Date: Fri, 14 Oct 2011 10:22:15 +0000 (+0200) Subject: cec: log keypresses in the debug log X-Git-Tag: upstream/2.2.0~1^2~229 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=3cf3a86ea90fed1cdfeb1d31720677b14a1fc44b;p=deb_libcec.git cec: log keypresses in the debug log --- diff --git a/src/lib/CECProcessor.cpp b/src/lib/CECProcessor.cpp index 7ddf612..b579671 100644 --- a/src/lib/CECProcessor.cpp +++ b/src/lib/CECProcessor.cpp @@ -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: