Skip to content

Keep numpad Add distinct from the main-row plus key [patch] - #200

Merged
matt-edmondson merged 1 commit into
mainfrom
fix/numpad-keys-stay-distinct
Oct 30, 2026
Merged

matt-edmondson merged 1 commit into
mainfrom
fix/numpad-keys-stay-distinct

Conversation

@matt-edmondson

Copy link
Copy Markdown
Contributor

Fixes #197

What changed

Note.CanonicalizeKey folded ADD, the WinForms/WPF name for numpad plus, into +. None of the other numpad keys were folded. As a result, Ctrl+Add matched Ctrl+Plus, but Ctrl+Subtract didn't match Ctrl+Minus, and numpad plus couldn't be bound on its own.

I took the safer option from the triage and dropped ADD from the + alias. Now every numpad key (Add, Subtract, Decimal, Multiply, Divide, NumPad0–9) stays distinct from its main-row counterpart, and a comment at the alias table records the rule.

Tests

  • I added KeyAliasEquivalenceTests.NumpadKey_StaysDistinctFromTheMainRowKey. It pins Add, Subtract, Decimal, Multiply, Divide and NumPad1 as distinct from +, -, ., *, / and 1.
  • With the fix reverted, the Ctrl+Add row fails ("Expected values to differ").
  • With the fix in place, the full Keybinding.Test suite passes: 308/308.

Generated by Claude Code

Numpad Add was the only numpad key folded into a main-row alias, so
Ctrl+Add fired Ctrl+Plus while Ctrl+Subtract, Decimal, Multiply, Divide
and NumPad0-9 stayed distinct. Drop ADD from the + alias so every numpad
key can be bound separately, and pin that in KeyAliasEquivalenceTests.

Fixes #197

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017vfJW6CpCSCzyWrJduFwhr
@sonarqubecloud

Copy link
Copy Markdown

@matt-edmondson
matt-edmondson merged commit dfde2c6 into main Oct 30, 2026
15 checks passed
@matt-edmondson
matt-edmondson deleted the fix/numpad-keys-stay-distinct branch October 30, 2026 02:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Numpad "+" now matches the main "+" key but numpad "−", ".", "*", "/" and digits don't: Ctrl+Add fires Ctrl+Plus, Ctrl+Subtract misses Ctrl+Minus

2 participants