Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions rts/Game/UI/KeyBindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -662,15 +662,16 @@ bool CKeyBindings::Bind(const std::string& keystr, const std::string& line)
bool CKeyBindings::UnBind(const std::string& keystr, const std::string& command)
{
RECOIL_DETAILED_TRACY_ZONE;
CKeySet ks;
if (!ks.Parse(keystr)) {
CKeyChain kc;
if (!ParseKeyChain(keystr, &kc) || kc.empty()) {
LOG_L(L_WARNING, "UnBind: could not parse key: %s", keystr.c_str());
return false;
}

if (debugEnabled)
LOG("[CKeyBindings::%s] keystr=%s command=%s", __func__, keystr.c_str(), command.c_str());

const CKeySet& ks = kc.back();
KeyMap& bindings = ks.IsKeyCode() ? codeBindings : scanBindings;
const auto it = bindings.find(ks);

Expand Down