mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-24 21:18:32 -05:00
Warn if multiple keys are bound to a key on removal
This commit is contained in:
@@ -156,11 +156,17 @@ void KeybindingManager::removeKeyBinding(const KeyWithModifier& key) {
|
||||
|
||||
std::vector<std::pair<KeyWithModifier, KeybindingManager::KeyInformation>>
|
||||
KeybindingManager::keyBinding(const std::string& key) const
|
||||
{
|
||||
KeyWithModifier k = stringToKey(key);
|
||||
return keyBinding(k);
|
||||
}
|
||||
|
||||
std::vector<std::pair<KeyWithModifier, KeybindingManager::KeyInformation>>
|
||||
KeybindingManager::keyBinding(const KeyWithModifier& key) const
|
||||
{
|
||||
std::vector<std::pair<KeyWithModifier, KeyInformation>> result;
|
||||
|
||||
KeyWithModifier k = stringToKey(key);
|
||||
auto itRange = _keyLua.equal_range(k);
|
||||
auto itRange = _keyLua.equal_range(key);
|
||||
for (auto it = itRange.first; it != itRange.second; ++it) {
|
||||
result.emplace_back(it->first, it->second);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user