More code exploration... in the guts of IRReceiverBase.cpp - I found the method that appears to deal with received codes and even the section that seems to implement the "remote mapping hierarchy"-
void IRReceiverBase::ReceivedCode(int PK_Device_Remote,const char *pCode,const char *pRepeat, int iRepeat)
{
if( m_bIgnore )
return;
#ifdef DEBUG
LoggerWrapper::GetInstance()->Write(LV_STATUS,"IRReceiverBase::ReceivedCode device %d code %s repeat %s/%d",
PK_Device_Remote,pCode,pRepeat,iRepeat);
#endif
char cRemoteLayout = m_mapRemoteLayout[PK_Device_Remote];
map<string,MapKeysToMessages *>::iterator it = m_mapKeyMapping.find(StringUtils::ToUpper(pCode));
if( it!=m_mapKeyMapping.end() )
{
MapKeysToMessages *pMapKeysToMessages = it->second;
MapKeysToMessages::iterator itMessage;
itMessage = pMapKeysToMessages->find(make_pair<char,char> (cRemoteLayout,m_cCurrentScreen) );
if( itMessage==pMapKeysToMessages->end() )
itMessage = pMapKeysToMessages->find(make_pair<char,char> (cRemoteLayout,0) );
if( itMessage==pMapKeysToMessages->end() )
itMessage = pMapKeysToMessages->find(make_pair<char,char> (0,m_cCurrentScreen) );
if( itMessage==pMapKeysToMessages->end() )
itMessage = pMapKeysToMessages->find(make_pair<char,char> (0,0) );
.
.
.
.
And I think that what is happening here is that the pMapKeysToMessages structure at this point first line is trying to find a match for this particular command for a specific RemoteLayout, CurrentScreen. Then, if that fails, it tries to find one for a RemoteLayout and any screen. Then, if *that* fails, it tries to find one for any RemoteLayout and a specific screen and if that fails it tries to just find a command match.
Interesting.
The assumption, of course, is that at this point the cRemoteLayout and m_cCurrentScreen variables are appropriately set. Who knows if that is the case or not. Presumably m_CurrentScreen is correctly set as per the CMD_Set_Screen_Type below but... who knows? Esp since that one isn't logged.
The cRemoteLayout var is set in this method but is set to a value in the m_mapRemoteLayout[] structure matched to the primary key of the remote. And I don't know where that structure is populated.
Tshak mentioned earlier that the remotelayout is not used. If that is the case, then this would be an empty structure and presumably cRemoteLayout a null or something that would fail for the first and second itMessage assignments and drop through to the third.