Repository navigation
fix(muya): correct inline code/math shortcut labels in the format toolbar - #4611
Merged
Merged
Conversation
…lbar The inline format toolbar advertised `Cmd/Ctrl+E` for inline code and `Shift+Cmd/Ctrl+E` for inline math, but no platform binds those keys. The actual defaults are `Cmd/Ctrl+\`` for inline code (Linux uses `Ctrl+Y`) and `Shift+Cmd/Ctrl+M` for inline math, so the tooltips disagreed with the keyboard-shortcut settings. Update the labels to match the real default keybindings. Fixes #3630 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This was referenced Jun 21, 2026
Jocs
pushed a commit
that referenced
this pull request
Jun 21, 2026
) #4611 corrected the inline format toolbar labels to match the real keybindings (inline code Ctrl+`, inline math Shift+Ctrl+M), but the characterization tests in format-menu-state.spec.ts still asserted the old, buggy Ctrl+E / Shift+Ctrl+E toolbar values, so they fail on develop. Bring the tests in line with the corrected behavior: - inline_math now agrees with the Format menu on Windows and Linux, so it moves into the reconcilable (matches) set. - inline_code now matches on Windows (Ctrl+`); Linux intentionally binds Ctrl+Y, so the remaining Linux-only divergence is what the test pins.
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.
Summary
The inline format toolbar's tooltips advertised
Cmd/Ctrl+Efor inline code andShift+Cmd/Ctrl+Efor inline math, but no platform binds those keys. The actual defaults (inkeybindings{Darwin,Windows,Linux}.ts) are:Cmd+\`` /Ctrl+`(Linux:Ctrl+Y`)Shift+Cmd+M/Ctrl+Shift+MSo the popup's shortcuts disagreed with the keyboard-shortcut settings — exactly the reporter's complaint.
Fix
Update the two labels in
inlineFormatToolbar/config.tsto the backtick (inline code) andM(inline math) defaults.Scope
This corrects the displayed labels (the reported mismatch). The toolbar's separate in-editor key-interception layer (
index.tsFORMAT_SHORTCUTS) and propagation of user-customized keybindings into muya are a deeper concern tracked under #3681 — out of scope here.Tests (TDD)
Added to
config.spec.ts(deterministic, verified RED→GREEN):Verified:
lint,lint:typesclean.Fixes #3630
🤖 Generated with Claude Code