cec: return the anynet return keycode directly instead of translating it to 'return...
[deb_libcec.git] / src / lib / implementations / ANCommandHandler.cpp
index d3318a18dff928d103c86da4b586f8bc4247dc1c..f8a8ade3c421aa12d00f781b03978eb1706dc9ba 100644 (file)
@@ -54,8 +54,10 @@ bool CANCommandHandler::HandleVendorRemoteButtonDown(const cec_command &command)
 
     switch (command.parameters[0])
     {
-    case CEC_AN_USER_CONTROL_CODE_RETURN:
-      key.keycode = CEC_USER_CONTROL_CODE_EXIT;
+    case CEC_USER_CONTROL_CODE_AN_RETURN:
+      key.keycode = m_processor->GetClientVersion() >= CEC_CLIENT_VERSION_1_5_0 ?
+        CEC_USER_CONTROL_CODE_AN_RETURN :
+        CEC_USER_CONTROL_CODE_EXIT;
       break;
     default:
       break;