Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event server keyboard events dont work for keys that have long press defined #18045

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion xbmc/input/InputManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ bool CInputManager::ProcessEventServer(int windowId, float frameTime)
if (wKeyID & ES_FLAG_UNICODE)
{
key = CKey(0u, 0u, static_cast<wchar_t>(wKeyID & ~ES_FLAG_UNICODE), 0, 0, 0, 0);
key.SetFromService(true);
return OnKey(key);
}

Expand Down Expand Up @@ -461,7 +462,11 @@ bool CInputManager::OnKey(const CKey& key)
}
else
{
if (!m_buttonTranslator->HasLongpressMapping(CServiceBroker::GetGUI()->GetWindowManager().GetActiveWindowOrDialog(), key))
// Event server keyboard doesn't give normal key up and key down, so don't
// process for long press if that is the source
if (key.GetFromService() ||
!m_buttonTranslator->HasLongpressMapping(
CServiceBroker::GetGUI()->GetWindowManager().GetActiveWindowOrDialog(), key))
{
m_LastKey.Reset();
bHandled = HandleKey(key);
Expand Down