| 224 | } |
| 225 | |
| 226 | std::string KeyManager::get(const BzfKeyEvent& key, |
| 227 | bool press) const { |
| 228 | const EventToCommandMap* map = press ? &pressEventToCommand : |
| 229 | &releaseEventToCommand; |
| 230 | EventToCommandMap::const_iterator index = map->find(key); |
| 231 | if (index == map->end()) { |
| 232 | return ""; |
| 233 | } |
| 234 | else { |
| 235 | return index->second; |
| 236 | } |
| 237 | } |
| 238 | |
| 239 | |
| 240 | std::vector<std::string> KeyManager::getKeysFromCommand(std::string command, bool press) const { |
no test coverage detected