Skip to content

Fix default shortcuts - #12570

Merged
saintmatthieu merged 2 commits into
audacity:masterfrom
kryksyh:fix-default-shortcuts
Oct 28, 2026
Merged

saintmatthieu merged 2 commits into
audacity:masterfrom
kryksyh:fix-default-shortcuts

Conversation

@kryksyh

@kryksyh kryksyh commented Oct 23, 2026

Copy link
Copy Markdown
Member

Resolves: #11192
Resolves: #11866
Resolves: #12149
Resolves: #12150

  • I signed CLA
  • This PR includes AI assistance
  • If the PR is AI-assisted, I have read, understood and complied with the guidelines for AI-assisted contributions
  • The title of the pull request describes an issue it addresses
  • If changes are extensive, then there is a sequence of easily reviewable commits
  • Each commit's message describes its purpose and effects
  • There are no behavior changes unnecessary for the stated purpose of the PR

Recommended:

  • Each commit compiles and runs on my machine without known undesirable changes of behavior

@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI (base), Organization UI (inherited)
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2a990606-cde9-48f2-ae9f-d32648fc3766
📥 Commits

Reviewing files that changed from the base of the PR and between 86451e1 and 6bf6dbf.

📒 Files selected for processing: 1
  • src/projectscene/internal/projectscenecommandsregister.cpp

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

📝 Walkthrough

The shortcut configuration changes identifiers for trim, clear selection, and zoom-to-selection. It adds zoom bindings for Ctrl+1 and Ctrl+3, assigns Ctrl+2 to zoom-default, and adds PgUp and PgDown for timeline paging. New timeline actions connect to view-controller methods that shift frame time by one visible frame duration.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~12 minutes

Severity of issue fixed: Medium

Sequence Diagram(s)

sequenceDiagram
  actor User
  participant ShortcutConfig
  participant ProjectSceneActionsController
  participant TimelineViewController
  User->>ShortcutConfig: Press PgUp or PgDown
  ShortcutConfig->>ProjectSceneActionsController: Dispatch timeline paging action
  ProjectSceneActionsController->>TimelineViewController: Call pageLeft() or pageRight()
  TimelineViewController->>TimelineViewController: Shift frame time by visible frame duration
Loading
Merge Risk: 🔵 Low · up to 6bf6d

PgUp/PgDown still provide the wrong navigation behavior, but the impact is limited to shortcut functionality with manual alternatives.

Pre-merge checks: Passed 3 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Linked Issues check Warning [#11192] The current shortcut configuration maps Home and End to action://playback/rewind-start and action://playback/rewind-end. The existing playback controller registers both commands. The summ… Update the navigation and other shortcut documentation named by #12149 so that the documented shortcuts and action terminology match the current Shortcuts settings. Add or update automated coverage for clear-selection if the repository te…
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title is concise and clearly identifies the main change: correcting default shortcuts. It also covers the primary focus of the changeset, although it does not mention timeline paging.
Description check Passed The description links the relevant issues and completes the repository checklist. It does not include the required short summary of the changes and motivation, so implementation details and test resul…
Out of Scope Changes check Passed The changed source files support the linked shortcut objectives. They add timeline paging commands, add default navigation and zoom bindings, and rename shortcut identifiers to match the Shortcuts set…
Full details: Description check

Explanation

The description links the relevant issues and completes the repository checklist. It does not include the required short summary of the changes and motivation, so implementation details and test results are not documented.

Full details: Out of Scope Changes check

Explanation

The changed source files support the linked shortcut objectives. They add timeline paging commands, add default navigation and zoom bindings, and rename shortcut identifiers to match the Shortcuts settings. No unrelated functional change is established. Documentation is a missing linked objective, not an out-of-scope change.

Full details: Linked Issues check

Explanation

[#11192] The current shortcut configuration maps Home and End to action://playback/rewind-start and action://playback/rewind-end. The existing playback controller registers both commands. The summary also shows PgUp and PgDn mapped to timeline paging by one screen width. [#11866] Ctrl+Shift+A now maps to clear-selection, but the supplied evidence does not establish that the action clears the selection or that an automated test covers it. [#12149] Home, End, and Ctrl+T have default mappings. The linked documentation and terminology were not changed in the supplied file summary. [#12150] The shortcut configuration adds the classic Ctrl+1, Ctrl+2, and Ctrl+3 zoom family. On macOS, the supplied evidence does not independently verify the platform modifier conversion.

Resolution

Update the navigation and other shortcut documentation named by #12149 so that the documented shortcuts and action terminology match the current Shortcuts settings. Add or update automated coverage for clear-selection if the repository test framework supports the action, or provide reviewable implementation evidence that Ctrl+Shift+A clears the selection. Verify the macOS modifier mapping for the default Ctrl+T and zoom shortcuts.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Linked repositories: Public OSS repositories can only analyze public repositories installed in this organization. No linked repositories were analyzed; skipped musescore/musescore.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI (base), Organization UI (inherited)
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b2b2bf0e-cd96-4166-82e9-11eea229d366
📥 Commits

Reviewing files that changed from the base of the PR and between afd5b77 and 86451e1.

📒 Files selected for processing: 8
  • src/app/configs/data/shortcuts.xml
  • src/projectscene/internal/projectsceneactionscontroller.cpp
  • src/projectscene/internal/projectscenecommandsregister.cpp
  • src/projectscene/internal/projectsceneuiactions.cpp
  • src/projectscene/itimelineviewcontroller.h
  • src/projectscene/projectscenecommands.h
  • src/projectscene/view/timeline/timelineviewcontroller.cpp
  • src/projectscene/view/timeline/timelineviewcontroller.h

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

Comment on lines +953 to +960
<SC>
<key>timeline-page-left</key>
<seq>PgUp</seq>
</SC>
<SC>
<key>timeline-page-right</key>
<seq>PgDown</seq>
</SC>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🔎 Supported by static analysis

🏁 Script executed:

set -e
printf '%s\n' '--- changed shortcut context ---'
git diff --no-ext-diff afd5b774b815ed53adfe30c582e7e087c7fb5651 86451e19cb79a5f4a043c28f68ccc1651d2e1933 -- src/app/configs/data/shortcuts.xml

printf '%s\n' '--- action references ---'
rg -n -F --glob '!build/**' --glob '!dist/**' -e 'timeline-page-left' -e 'timeline-page-right' -e 'page-left' -e 'page-right' -e 'PgUp' -e 'PgDown' au3 src | head -200

Repository: audacity/audacity

Length of output: 2834


🏁 Script executed:

set -e
printf '%s\n' '--- UI action declarations ---'
nl -ba src/projectscene/internal/projectsceneuiactions.cpp | sed -n '70,110p'

printf '%s\n' '--- controller outline and relevant source ---'
ast-grep outline src/projectscene/internal/projectsceneactionscontroller.cpp --view expanded
nl -ba src/projectscene/internal/projectsceneactionscontroller.cpp | sed -n '1,240p'

printf '%s\n' '--- command declarations and consumers ---'
nl -ba src/projectscene/projectscenecommands.h | sed -n '1,80p'
rg -n -F --glob '*.cpp' --glob '*.h' --glob '*.qml' \
  -e 'PROJECTSCENE_TIMELINE_PAGE_LEFT_COMMAND' \
  -e 'PROJECTSCENE_TIMELINE_PAGE_RIGHT_COMMAND' \
  -e 'TIMELINE_PAGE_LEFT_CODE' \
  -e 'TIMELINE_PAGE_RIGHT_CODE' \
  -e 'timelinePage' -e 'pageLeft' -e 'pageRight' src/projectscene src | head -240

Repository: audacity/audacity

Length of output: 31841


🏁 Script executed:

set -e
printf '%s\n' '--- timeline page methods ---'
nl -ba src/projectscene/view/timeline/timelineviewcontroller.cpp | sed -n '1,100p'
nl -ba src/projectscene/view/timeline/timelineviewcontroller.h | sed -n '1,90p'

printf '%s\n' '--- directly bound timeline view and scroll APIs ---'
rg -n -F --glob '*.cpp' --glob '*.h' \
  -e 'void TimelineView::pageLeft' -e 'void TimelineView::pageRight' \
  -e 'pageLeft()' -e 'pageRight()' -e 'scrollLeft' -e 'scrollRight' \
  -e 'horizontalScroll' -e 'seek' -e 'playPosition' src/projectscene/view | head -300

Repository: audacity/audacity

Length of output: 11618


🏁 Script executed:

set -e
printf '%s\n' '--- shiftFrameTime and frame accessors ---'
rg -n -F -- 'TimelineContext::shiftFrameTime' 'TimelineContext::frameStartTime' 'TimelineContext::frameEndTime' src/projectscene/view/timeline/timelinecontext.cpp
nl -ba src/projectscene/view/timeline/timelinecontext.cpp | sed -n '240,310p'
nl -ba src/projectscene/view/timeline/timelinecontext.cpp | sed -n '1180,1270p'

printf '%s\n' '--- declarations and related position state ---'
rg -n -F -- 'shiftFrameTime' 'frameStartTime' 'frameEndTime' 'm_frameStartTime' 'm_frameEndTime' src/projectscene/view/timeline/timelinecontext.h src/projectscene/view/timeline/timelinecontext.cpp

Repository: audacity/audacity

Length of output: 567


🏁 Script executed:

set -e
printf '%s\n' '--- shiftFrameTime implementation ---'
rg -n -F -- 'void TimelineContext::shiftFrameTime' src/projectscene/view/timeline/timelinecontext.cpp
nl -ba src/projectscene/view/timeline/timelinecontext.cpp | sed -n '460,515p'

printf '%s\n' '--- frame accessors and declarations ---'
rg -n -F -e 'frameStartTime' -e 'frameEndTime' -e 'shiftFrameTime' src/projectscene/view/timeline/timelinecontext.cpp src/projectscene/view/timeline/timelinecontext.h

Repository: audacity/audacity

Length of output: 10537


Bind PgUp and PgDown to seek actions, not timeline-page actions.

The current actions shift the viewport by one screen width. They do not change the playback position required by issue #11192. The viewport shift is bounded, but this does not provide bounded seeking.

Comment on lines +185 to +198
CommandInfo{
PROJECTSCENE_TIMELINE_PAGE_LEFT_COMMAND,
TranslatableString("command", "Scroll timeline left one page"),
TranslatableString("command_description", "Scroll the timeline left by one screen width"),
InputSchema(),
Decoration()
},
CommandInfo{
PROJECTSCENE_TIMELINE_PAGE_RIGHT_COMMAND,
TranslatableString("command", "Scroll timeline right one page"),
TranslatableString("command_description", "Scroll the timeline right by one screen width"),
InputSchema(),
Decoration()
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets add translators comments:
//: Command title: shown as a menu item or a button label; keep it short

//: Command description: shown as a tooltip; can be a full sentence

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank!

@kryksyh
kryksyh force-pushed the fix-default-shortcuts branch from 86451e1 to 6bf6dbf Compare October 23, 2026 13:36
knd94 added a commit to knd94/audacity that referenced this pull request Oct 24, 2026
Keep default shortcut work separate from menu mnemonics. PR audacity#12570 now covers overlapping trim, selection and zoom bindings.

Assisted-by: OpenAI Codex
@saintmatthieu
saintmatthieu merged commit fd51f88 into audacity:master Oct 28, 2026
3 of 10 checks passed
saintmatthieu added a commit that referenced this pull request Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants