Fix for hotkey collisions when modifiers are used.

This commit is contained in:
Chris Pavlina 2015-03-16 10:34:45 +01:00 committed by Maciej Suminski
parent 900ecbae9d
commit be29952819
1 changed files with 2 additions and 2 deletions

View File

@ -116,13 +116,13 @@ bool ACTION_MANAGER::RunHotKey( int aHotKey ) const
HOTKEY_LIST::const_iterator it = m_actionHotKeys.find( key | mod );
// If no luck, try without modifier, to handle keys that require a modifier
// If no luck, try without Shift, to handle keys that require it
// e.g. to get ? you need to press Shift+/ without US keyboard layout
// Hardcoding ? as Shift+/ is a bad idea, as on another layout you may need to press a
// different combination
if( it == m_actionHotKeys.end() )
{
it = m_actionHotKeys.find( key );
it = m_actionHotKeys.find( key | (mod & ~MD_SHIFT) );
if( it == m_actionHotKeys.end() )
return false; // no appropriate action found for the hotkey