You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Equivalent key names compare unequal: "Ctrl+Plus" ≠ "Ctrl++", "Ctrl+Comma" ≠ "Ctrl+,", "Back" ≠ "Backspace", and "LWin+A" displays as "A+LWIN" #166
CanonicalizeKey (Keybinding/Models/MusicalTypes.cs:67-91) maps aliases to one canonical key name, so that "every way of building a note (parsing, constructing directly, or loading a stored profile) compares and hashes the same". It already accepts framework key names (WinForms/WPF D0-D9), plus Control, Option, Esc, Return, PgUp and others. But several common spellings are missing.
IsModifierNote (:221-225) has a separate hard-coded list, so left/right modifier variants also aren't treated as modifiers.
The library's own docs describe these spellings as equivalent: KeyStringTokenizer.cs:8-9 reads "Ctrl++" as "Ctrl and Plus" and "Ctrl+," as "Ctrl and Comma".
Why it matters
There are two common input paths, and both fail silently: the lookup just doesn't find the stored binding.
A host app builds chords from its UI framework's Key.ToString(). For example WinForms Keys.Back, Keys.Oemplus, Keys.LWin, Keys.ControlKey, or WPF Key.LeftCtrl, Key.Prior, Key.Next, Key.Capital.
A user writes Ctrl+Plus or Ctrl+Comma in a profile.
Suggested fix / acceptance criteria
Extend CanonicalizeKey, and have IsModifierNote / the modifier ordering work on the canonical names, with at least:
Add DataRow tests (e.g. in Keybinding.Test/ModifierAliasNormalizationTests.cs) asserting that each alias equals its canonical form and has the same hash code. Also assert that a left/right modifier variant sorts and displays as a modifier (LWin+A → Meta+A).
Related: this continues the alias work from #164 (commits 1b2f521, 9b19096).
Priority: Medium. Common key spellings, from framework Key.ToString() output and from user profiles, silently fail to match stored bindings. The fix extends CanonicalizeKey and unifies the IsModifierNote list.
Activity
matt-edmondson commentedon Oct 5, 2026
Triage
Key.ToString()output and from user profiles, silently fail to match stored bindings. The fix extendsCanonicalizeKeyand unifies theIsModifierNotelist.Keybinding/Models/MusicalTypes.cs(key canonicalisation). Suggested owner: @matt-edmondsonGenerated by Claude Code