fix: SG-44533: Insert new line on keyboard shortcut - #1397
Merged
eloisebrosseau merged 1 commit intoSep 9, 2026
Merged
Conversation
eloisebrosseau
requested review from
bernie-laberge and
cedrik-fuoco-adsk
as code owners
September 1, 2026 21:03
bernie-laberge
approved these changes
Sep 1, 2026
Signed-off-by: Éloïse Brosseau <eloise.brosseau@autodesk.com>
eloisebrosseau
force-pushed
the
insert-new-line-on-hotkey
branch
from
September 2, 2026 21:21
f7c03c5 to
9446084
Compare
cedrik-fuoco-adsk
approved these changes
Sep 9, 2026
eloisebrosseau
merged commit Sep 9, 2026
163c5ca
into
AcademySoftwareFoundation:main
29 of 30 checks passed
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.
fix: SG-44533: Insert new line on hotkey
Summarize your change.
A new
on_text_new_linemethod was added to insert a new line when theshift-enterkeyboard shortcut is detected. This was a missing method that is present in the current annotation code in Mu. Note that both "enter" keys (i.e. the regular one and the numpad one) are detected to mirror the same logic as with theenterkeyboard shortcut for committing text.strip()was added to_commit_textto make sure not to commit annotations that are only spaces or newlines. Note that theshift_maplogic was removed because while investigating this shift key issue, I saw that it was actually not used at all. For instance, "!" is already received askey-down--!notkey-down--shift--1, and "A" iskey-down--Anotkey-down--shift--a.Describe the reason for the change.
The new annotation tool was missing support for multi-line text annotations. The
shift-enterkeyboard shortcut should add a new line, just like the current annotation tool does.Describe what you have tested and on which operating system.
Adding new lines to text annotations using the
shift-enterkeyboard shortcut was tested on macOS.