This won't work - the vkey version will never implicitly equal the vsc version. This is just busted.

This commit is contained in:
Mike Griese 2021-08-04 16:41:50 -05:00
parent fb844430f0
commit 85421029d3

View file

@ -604,7 +604,13 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation
}
// Handle collisions
const auto oldKeyPair{ _KeyMap.find(keys) };
auto oldKeyPair{ _KeyMap.find(keys) }; // pair<Control::KeyChord, InternalActionID>
// If we didn't find the key, then try again, but with the scan code
if (oldKeyPair == _KeyMap.end() && keys.ScanCode())
{
oldKeyPair = _KeyMap.find(Control::KeyChord{ keys.Modifiers(), 0, keys.ScanCode() });
}
if (oldKeyPair != _KeyMap.end())
{
// Collision: The key chord was already in use.