Repository navigation
Name Tab as Tab in KeyChordMatcher, not its NamedKeyBegin alias [patch] - #654
Merged
Merged
Conversation
ImGuiKey.Tab shares its value with the NamedKeyBegin range marker, and
Enum.ToString() returns the marker's name. DisplayName and NoteNameOf fell
back to ToString(), so Tab displayed as "NamedKeyBegin" and was captured
as the note NAMEDKEYBEGIN, which never equals Chord.Parse("Tab"). A host
comparing chords for conflicts missed the clash with DataTableCommands'
default Tab and Shift+Tab bindings.
Both now name Tab explicitly ahead of the fallback. TryMapKey still reads
NAMEDKEYBEGIN, so keymaps saved before this keep working. A guard test
checks that no bindable key is named after a range marker.
Fixes #652
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T3apQEs8uq9BSQJ2j8Z8mr
|
This was referenced Oct 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Fixes #652
What was wrong
ImGuiKey.Tabhas the same value as theNamedKeyBeginrange marker, andEnum.ToString()returns the marker's name.DisplayNameandNoteNameOfboth fell back toToString(), which caused two problems:NAMEDKEYBEGIN. That never equalsChord.Parse("Tab"), so conflict checks missed the clash withDataTableCommands' defaultTabandShift+Tabbindings.Change
DisplayNameandNoteNameOfnow nameImGuiKey.Tabexplicitly ("Tab" and "TAB") ahead of the fallback.TryMapKeystill acceptsNAMEDKEYBEGIN, so keymaps saved before this change keep working.Tests
New cases in
KeyChordMatcherTests:Tab_IsNamedTabNotItsRangeMarkercovers every acceptance case in the issue:DisplayName,Display("Shift+Tab"), the composed note, and equality withChord.Parsefor Tab, Ctrl+Tab and Shift+Tab.TryMapKey_StillReadsTheOldNamedKeyBeginSpellingchecks the old spelling still maps to Tab.NoBindableKey_IsNamedAfterARangeMarkeris a guard test over every bindable key.With the fix reverted, two of these fail. With it, the full
ImGui.Widgets.Testsrun passes (1130/1130), as do theKeyChord*UI tests (12/12).Generated by Claude Code