Skip to content

fix: SG-44533: Insert new line on keyboard shortcut - #1397

Merged
eloisebrosseau merged 1 commit into
AcademySoftwareFoundation:mainfrom
eloisebrosseau:insert-new-line-on-hotkey
Sep 9, 2026
Merged

fix: SG-44533: Insert new line on keyboard shortcut#1397
eloisebrosseau merged 1 commit into
AcademySoftwareFoundation:mainfrom
eloisebrosseau:insert-new-line-on-hotkey

Conversation

@eloisebrosseau

@eloisebrosseau eloisebrosseau commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

fix: SG-44533: Insert new line on hotkey

Summarize your change.

A new on_text_new_line method was added to insert a new line when the shift-enter keyboard 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 the enter keyboard shortcut for committing text. strip() was added to _commit_text to make sure not to commit annotations that are only spaces or newlines. Note that the shift_map logic was removed because while investigating this shift key issue, I saw that it was actually not used at all. For instance, "!" is already received as key-down--! not key-down--shift--1, and "A" is key-down--A not key-down--shift--a.

Describe the reason for the change.

The new annotation tool was missing support for multi-line text annotations. The shift-enter keyboard 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-enter keyboard shortcut was tested on macOS.

Comment thread src/plugins/rv-packages/annotate_beta/annotate_beta_engine.py
Signed-off-by: Éloïse Brosseau <eloise.brosseau@autodesk.com>
@eloisebrosseau
eloisebrosseau force-pushed the insert-new-line-on-hotkey branch from f7c03c5 to 9446084 Compare September 2, 2026 21:21
@eloisebrosseau
eloisebrosseau merged commit 163c5ca into AcademySoftwareFoundation:main Sep 9, 2026
29 of 30 checks passed
@eloisebrosseau
eloisebrosseau deleted the insert-new-line-on-hotkey branch September 9, 2026 19:56
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.

3 participants