Disable +xxx binds when pressing ctrl+shift

Seems a bit more general than hardcoding ctrl+shift+d, ctrl+shift+g, ctrl+shift+e
This commit is contained in:
def 2020-10-03 10:03:16 +02:00
parent 830352fd70
commit 1e900af5fa

View file

@ -143,7 +143,9 @@ bool CBinds::OnInput(IInput::CEvent e)
}
}
if(m_aapKeyBindings[0][e.m_Key] && (!ret || m_aapKeyBindings[0][e.m_Key][0] == '+')) // always trigger +xxx binds despite any modifier
// shift for emoticons works while moving through map
// When ctrl+shift are pressed (ctrl+shift binds and also the hard-coded ctrl+shift+d, ctrl+shift+g, ctrl+shift+e), ignore other +xxx binds
if(m_aapKeyBindings[0][e.m_Key] && Mask != ((1 << MODIFIER_CTRL) | (1 << MODIFIER_SHIFT)) && (!ret || m_aapKeyBindings[0][e.m_Key][0] == '+'))
{
if(e.m_Flags & IInput::FLAG_PRESS)
Console()->ExecuteLineStroked(1, m_aapKeyBindings[0][e.m_Key]);