diff options
author | Chris "koying" Browet <cbro@semperpax.com> | 2016-02-04 17:04:59 +0100 |
---|---|---|
committer | Chris "Koying" Browet <cbro@semperpax.com> | 2016-02-04 20:11:03 +0100 |
commit | cae158869b511aad9a954e2cdf09c42da7e91c93 (patch) | |
tree | eb2698489828007995b3c92be04a69eec7b09802 | |
parent | 6f5eecec2f5b5e2759a1e4aa3a211292057e97a9 (diff) |
FIX: [longpress] do not repeat long presses
-rw-r--r-- | xbmc/input/InputManager.cpp | 5 | ||||
-rw-r--r-- | xbmc/input/KeyboardStat.cpp | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/xbmc/input/InputManager.cpp b/xbmc/input/InputManager.cpp index 3345a3d906..582ab35b2b 100644 --- a/xbmc/input/InputManager.cpp +++ b/xbmc/input/InputManager.cpp @@ -459,6 +459,11 @@ bool CInputManager::OnEvent(XBMC_Event& newEvent) { case XBMC_KEYDOWN: { + if (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)) diff --git a/xbmc/input/KeyboardStat.cpp b/xbmc/input/KeyboardStat.cpp index f90973a73d..1f2c3d8cff 100644 --- a/xbmc/input/KeyboardStat.cpp +++ b/xbmc/input/KeyboardStat.cpp @@ -219,6 +219,8 @@ std::string CKeyboardStat::GetKeyName(int KeyID) keyname.append("win-"); if (KeyID & CKey::MODIFIER_META) keyname.append("meta-"); + if (KeyID & CKey::MODIFIER_LONG) + keyname.append("long-"); // Now get the key name |