refs #318 Let CInputManager forward HotkeyFunc events

This commit is contained in:
Roland Winklmeier
2014-08-20 01:29:58 +02:00
parent f970e7cfaa
commit bdd7de1459
2 changed files with 14 additions and 0 deletions

View File

@@ -87,6 +87,9 @@ namespace BlackCore
void CInputManager::callFunctionsBy(const CHotkeyFunction &hotkeyFunction, bool isKeyDown)
{
BlackMisc::Event::CEventHotkeyFunction hotkeyEvent(hotkeyFunction, isKeyDown);
if(m_eventForwardingEnabled) emit hotkeyFuncEvent(hotkeyEvent);
if (!m_hashRegisteredFunctions.contains(hotkeyFunction)) return;
auto func = m_hashRegisteredFunctions.value(hotkeyFunction);
func(isKeyDown);