| 238 | |
| 239 | |
| 240 | std::vector<std::string> KeyManager::getKeysFromCommand(std::string command, bool press) const { |
| 241 | std::vector<std::string> keys; |
| 242 | EventToCommandMap::const_iterator index; |
| 243 | if (press) { |
| 244 | for (index = pressEventToCommand.begin(); index != pressEventToCommand.end(); ++index) { |
| 245 | if (index->second == command) { |
| 246 | keys.push_back(this->keyEventToString(index->first)); |
| 247 | } |
| 248 | } |
| 249 | } |
| 250 | else { |
| 251 | for (index = releaseEventToCommand.begin(); index != releaseEventToCommand.end(); ++index) { |
| 252 | if (index->second == command) { |
| 253 | keys.push_back(this->keyEventToString(index->first)); |
| 254 | } |
| 255 | } |
| 256 | } |
| 257 | return keys; |
| 258 | } |
| 259 | |
| 260 | |
| 261 | std::string KeyManager::keyEventToString( |
no test coverage detected