Ok so after a little more investigation, seems like a little bug that maybe corrected for Eden (well i hope :p)
This is not the good thread to post but since i know you read here often i try here.
When i send a key from eventclient in logs we got :
Quote:DEBUG: CApplication::OnKey: d (f044) pressed, trying keyboard action 61440
When using real keyboard we got :
Quote:DEBUG: CApplication::OnKey: d (f044) pressed, trying keyboard action 61793
The only difference is that the flag KEY_ASCII (and KEY_UNICODE on unicode keys) is not set, and that's make all the difference.
In xbmc code there's a lot of special things about real keyboard or httpapi, but nothing for event client.
The main problem seems related to (
Application.cpp) in
OnKey:
Code:
if (key.GetUnicode())
action = CAction(key.GetAscii() | KEY_ASCII, key.GetUnicode());
else
action = CAction(key.GetVKey() | KEY_VKEY);
With a root cause in (
guiilib/Key.cpp) :
Code:
CKey::CKey(uint8_t vkey, wchar_t unicode, char ascii, uint32_t modifiers, unsigned int held)
{
Reset();
if (vkey) // FIXME: This needs cleaning up - should we always use the unicode key where available?
m_buttonCode = vkey | KEY_VKEY;
else
m_buttonCode = KEY_UNICODE;
With the httpapi having a special treatment :
Code:
void CKey::SetFromHttpApi(bool bFromHttpApi)
{
if(bFromHttpApi && (m_buttonCode & KEY_ASCII) )
{
m_unicode = m_buttonCode - KEY_ASCII;
}
m_fromHttpApi = bFromHttpApi;
}
that set the unicode part.
I don't know what's the solution, but since to send real keyboard char we need to set the VKEY flag but after that it seems that when coming from event client we don't detect ascii / unicode chars, this can not work. But since there's a big FIXME on the part that seems to be problematic, i'm sure someone have the answer.