diff --git a/lib/actions/action.cpp b/lib/actions/action.cpp index 606b7d35fd6..0755bd59296 100644 --- a/lib/actions/action.cpp +++ b/lib/actions/action.cpp @@ -243,9 +243,26 @@ void eActionMap::keyPressed(const std::string &device, int key, int flags) } std::vector call_list; + bool modal = false; + for (std::multimap::iterator c(m_bindings.begin()); c != m_bindings.end(); ++c) + { + if (c->first == -20) + { + eTrace("[eActionMap] modal active"); + modal = true; + break; + } + } + // iterate active contexts for (std::multimap::iterator c(m_bindings.begin()); c != m_bindings.end(); ++c) { + if (modal && c->first > -20) + { + eTrace("[eActionMap] modal active / ignore key %d", key); + continue; + } + int finalFlag = flags; if (flags == eRCKey::flagMake)