Skip to content

Allow AltGr in label editing - #10776

Merged
kryksyh merged 2 commits into
audacity:audacity3from
DPDmancul:fix/altGrInLabelEdit
Apr 23, 2026
Merged

kryksyh merged 2 commits into
audacity:audacity3from
DPDmancul:fix/altGrInLabelEdit

Conversation

@DPDmancul

@DPDmancul DPDmancul commented Apr 22, 2026 •

Copy link
Copy Markdown

Resolves: #2748

Previously, while editing the label text, using the AltGr modifier was inhibited. Now you can freely access the third and fourth level of keys to write.

  • I signed CLA
  • 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

QA:

  • Testflow test cases have been run

@coderabbitai

coderabbitai Bot commented Apr 22, 2026 •

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: 826d0a8d-91b3-4e49-945c-ee763ddf83e3

📥 Commits

Reviewing files that changed from the base of the PR and between 91e2a09f273fcb9acd1e9671070c378a6941051b and 850bfd1.

📒 Files selected for processing (2)
  • src/tracks/labeltrack/ui/LabelTrackView.cpp
  • src/tracks/ui/TextEditHelper.cpp

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes
    • Improved keyboard input handling so label editing and inline text entry correctly recognize AltGr/Ctrl and common modifier combinations, reducing missed or misrouted keypresses for international keyboards.
    • Refined platform-specific modifier behavior to prevent valid text-producing key events from being incorrectly skipped on macOS and other systems.

Walkthrough

The change tightens modifier-key filtering for text input in label editing across two UI modules. LabelTrackView::DoChar and TextEditHelper::CaptureKey now only accept modifier combinations within the mask wxMOD_SHIFT | wxMOD_ALTGR; events with other modifier bits are ignored. Platform-specific branching changes handling of AltGr: non-macOS builds permit AltGr cases where Alt maps to AltGr/Ctrl, while macOS excludes plain Alt-derived cases. No public APIs were added or removed.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: allowing AltGr modifier support in label editing, which directly matches the primary objective.
Description check ✅ Passed The PR description follows the template structure, includes the resolved issue link, explains the motivation, and has all required checkboxes completed.
Linked Issues check ✅ Passed The code changes directly address issue #2748 by modifying modifier key handling in LabelTrackView and TextEditHelper to permit AltGr-derived characters in label editing.
Out of Scope Changes check ✅ Passed Changes are limited to LabelTrackView and TextEditHelper components directly related to the AltGr modifier support requirement; whitespace normalizations are incidental.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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 and usage tips.

@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

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: 47d2d3aa-545c-401e-9bd2-119c196ce2b8

📥 Commits

Reviewing files that changed from the base of the PR and between ac9b01f and 5f0239bb079f7adb3ec48de708d4792311acf7f3.

📒 Files selected for processing (1)
  • src/tracks/labeltrack/ui/LabelTrackView.cpp

@kryksyh

kryksyh commented Apr 22, 2026

Copy link
Copy Markdown
Member

@DPDmancul thank you for this contribution. While you are at it, would you mind also fixing the same issue with clip name editing?

You will need to do a similar fix to bool TextEditHelper::CaptureKey(int, int mods)

@DPDmancul
DPDmancul force-pushed the fix/altGrInLabelEdit branch from 5f0239b to 91e2a09 Compare April 22, 2026 21:41
@DPDmancul
DPDmancul requested a review from kryksyh April 22, 2026 21:45

@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

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: 56b23236-cbec-4ed0-bb42-35605deca363

📥 Commits

Reviewing files that changed from the base of the PR and between 5f0239bb079f7adb3ec48de708d4792311acf7f3 and 91e2a09f273fcb9acd1e9671070c378a6941051b.

📒 Files selected for processing (2)
  • src/tracks/labeltrack/ui/LabelTrackView.cpp
  • src/tracks/ui/TextEditHelper.cpp

Comment thread src/tracks/ui/TextEditHelper.cpp Resolved
@kryksyh
kryksyh force-pushed the fix/altGrInLabelEdit branch from 91e2a09 to 850bfd1 Compare April 23, 2026 11:01
@kryksyh
kryksyh merged commit fc91e54 into audacity:audacity3 Apr 23, 2026
@DPDmancul
DPDmancul deleted the fix/altGrInLabelEdit branch April 23, 2026 11:04
@kryksyh kryksyh linked an issue May 25, 2026 that may be closed by this pull request

wxString text, left, right;

// if text data is available

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Am interested

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.

Cannot type certain regional characters into a label

3 participants