From 99f576c2affa3687520cda0e74143ad36f246d6d Mon Sep 17 00:00:00 2001 From: "Chris \"Koying\" Browet" Date: Fri, 4 Mar 2016 00:28:47 +0100 Subject: FIX: [longpress] do not eat keypress after a longpress A longpress triggers the action before the keyup, which is not called at all if a window/dialog is popped up. Result is m_Lastkey not being reset, and whatever keypress after returning to the original window being ignored. --- xbmc/input/InputManager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xbmc/input/InputManager.cpp b/xbmc/input/InputManager.cpp index 582ab35b2b..1e21e7bf7a 100644 --- a/xbmc/input/InputManager.cpp +++ b/xbmc/input/InputManager.cpp @@ -459,13 +459,13 @@ bool CInputManager::OnEvent(XBMC_Event& newEvent) { case XBMC_KEYDOWN: { - if (m_LastKey.GetButtonCode() & CKey::MODIFIER_LONG) + m_Keyboard.ProcessKeyDown(newEvent.key.keysym); + CKey key = m_Keyboard.TranslateKey(newEvent.key.keysym); + if (key.GetButtonCode() == m_LastKey.GetButtonCode() && m_LastKey.GetButtonCode() & CKey::MODIFIER_LONG) { // Do not repeat long presses break; } - m_Keyboard.ProcessKeyDown(newEvent.key.keysym); - CKey key = m_Keyboard.TranslateKey(newEvent.key.keysym); if (!CButtonTranslator::GetInstance().HasLonpressMapping(g_windowManager.GetActiveWindowID(), key)) { m_LastKey.Reset(); -- cgit v1.2.3