Repository navigation
Shortcuts: chords with Shift and a punctuation key fire as typed - #282
Merged
bflatastic merged 1 commit intoOct 7, 2026
Merged
Conversation
… typed
egui reports the character a key types, so Cmd+Shift+[ arrives as
Cmd+Shift+{ (], / likewise as }, ?) and Shift+` as the text ~, and these
default shortcuts never matched: Bring to Front, Send to Back, Search
Commands and the Curvature tool. Command chords now also take the
shifted character, single-key tool and command shortcuts also look up
Shift+<typed text>, and the Keyboard Shortcuts editor records such a
chord as its key (Cmd+Shift+], not Cmd+Shift+}), so conflicts show.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bflatastic
force-pushed
the
fix/shifted-punctuation-shortcuts
branch
from
October 7, 2026 06:30
ef2f558 to
b6649a3
Compare
Member
|
Thanks @theironchef, merged! I rebased it on main and added a note to the M14 row of the ROADMAP. I checked it live in the app: Cmd+Shift+} and Cmd+Shift+{ bring to front and send to back, Cmd+Shift+? opens Search Commands, and Shift+~ picks the Curvature tool. Keeping the original chord and only adding the shifted aliases means nothing changes for other layouts. |
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 #280.
Problem: egui reports the character a key types. With Shift held on US-style layouts:
[,]and/arrive asOpenCurlyBracket,CloseCurlyBracketandQuestionmark;`arrives as the text~.shortcuts::consumematched the parsed chord exactly, with an allowance only for+(#83). The single-key path looked up the typed text, which doesn't normalize toShift+~. So four defaults never fired from the keyboard: Bring to Front (Cmd+Shift+]), Send to Back (Cmd+Shift+[), Search Commands (Cmd+Shift+/, which the hint bar advertises) and the Curvature tool (Shift+~).Change (
crates/ui-egui/src/shortcuts.rs,shortcut_editor.rs)consumealso accepts the shifted character for a chord that holds Shift:[→{,]→},/→?,;→:and\→|, next to the existing=→+.Shift+<typed text>, after the existing lookups, so~typed with Shift findsShift+~. Keys bound to the character itself, like+for Add Anchor Point, still win.Cmd+Shift+], notCmd+Shift+}. That's the form the defaults use, so conflicts are reported.Non-US layouts, where these characters sit on other keys, aren't addressed here.
Tests
shortcuts::tests::shifted_punctuation_shortcuts_work_as_typed:}/{bring the selection to the front and send it to the back;?opens Search Commands;~with Shift selects the Curvature tool;}asCmd+Shift+]and Cmd+Shift+?asCmd+Shift+/.cargo test -p vectorcraft-ui-egui: 555 passed.cargo clippy -p vectorcraft-ui-egui --all-targets -- -D warnings(Rust 1.99): clean.cargo fmt --all -- --check: clean.I didn't run the full
cargo xtask ci(wasm step) here.🤖 Generated with Claude Code