| 51 | } |
| 52 | |
| 53 | bool ShortcutManager::processShortcut( const ShortcutKey& key, Reason reason ) const |
| 54 | { |
| 55 | if ( !enabled_ ) |
| 56 | return false; |
| 57 | auto it = map_.find( mapKeyFromKeyAndMod( key, true ) ); |
| 58 | if ( it != map_.end() && ( reason == Reason::KeyDown || it->second.repeatable ) ) |
| 59 | { |
| 60 | it->second.action(); |
| 61 | return true; |
| 62 | } |
| 63 | return false; |
| 64 | } |
| 65 | |
| 66 | bool ShortcutManager::onKeyDown_( int key, int modifier ) |
| 67 | { |