Skip to content

Commit

Permalink
[eActionMap]
Browse files Browse the repository at this point in the history
* add modal priority -20
  • Loading branch information
jbleyel committed Oct 27, 2024
1 parent c78f594 commit 2747d01
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions lib/actions/action.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,26 @@ void eActionMap::keyPressed(const std::string &device, int key, int flags)
}

std::vector<call_entry> call_list;
bool modal = false;
for (std::multimap<int64_t, eActionBinding>::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<int64_t, eActionBinding>::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)
Expand Down

0 comments on commit 2747d01

Please sign in to comment.