| 176 | }; |
| 177 | |
| 178 | int BindingManager::GetBoundKeyID(BindingProfileID profileID, ActionID actionID) const |
| 179 | { |
| 180 | // Find binding profile. |
| 181 | auto profileIt = _bindings.find(profileID); |
| 182 | if (profileIt == _bindings.end()) |
| 183 | return OIS::KC_UNASSIGNED; |
| 184 | |
| 185 | // Get binding profile. |
| 186 | const auto& [inputDeviceID, profile] = *profileIt; |
| 187 | |
| 188 | // Find key-action binding. |
| 189 | auto keyIt = profile.find(actionID); |
| 190 | if (keyIt == profile.end()) |
| 191 | return OIS::KC_UNASSIGNED; |
| 192 | |
| 193 | // Return key binding. |
| 194 | const auto& [keyActionID, keyID] = *keyIt; |
| 195 | return keyID; |
| 196 | } |
| 197 | |
| 198 | const BindingProfile& BindingManager::GetBindingProfile(BindingProfileID profileID) const |
| 199 | { |