aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Blake <oak99sky@yahoo.co.uk>2020-07-15 12:27:05 +0100
committerGitHub <noreply@github.com>2020-07-15 12:27:05 +0100
commit439cd8cdbb0e6ca9d68bcb9863714f1356d4406d (patch)
tree9cfc56ca609d4629cfae1e1effb16860991b1e2d
parent345ca6438da79e2262ad150a85cef39e613146c4 (diff)
parent0636483d8ee35b5b6205abb393c8b49cdd09188a (diff)
Merge pull request #18045 from mglae/leia_event-server-keyboard-longpress-keys
Event server keyboard events dont work for keys that have long press defined
-rw-r--r--xbmc/input/InputManager.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/xbmc/input/InputManager.cpp b/xbmc/input/InputManager.cpp
index e10505e79e..012866c566 100644
--- a/xbmc/input/InputManager.cpp
+++ b/xbmc/input/InputManager.cpp
@@ -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);
}
@@ -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);