Skip to content

Resolve DVK F1-F12 shortcut ambiguity with CwxPanel (#2464)#2469

Merged
ten9876 merged 1 commit into
mainfrom
aetherclaude/issue-2464
May 9, 2026
Merged

Resolve DVK F1-F12 shortcut ambiguity with CwxPanel (#2464)#2469
ten9876 merged 1 commit into
mainfrom
aetherclaude/issue-2464

Conversation

@aethersdr-agent

Copy link
Copy Markdown
Contributor

Summary

Fixes #2464

What was changed

Resolve DVK F1-F12 shortcut ambiguity with CwxPanel (#2464)

Files modified

  • src/gui/CwxPanel.cpp
  • src/gui/CwxPanel.h
  • src/gui/DvkPanel.cpp
  • src/gui/DvkPanel.h
 src/gui/CwxPanel.cpp | 23 +++++++++++++++++++++++
 src/gui/CwxPanel.h   |  8 ++++++++
 src/gui/DvkPanel.cpp | 32 ++++++++++++++++++++++++++++----
 src/gui/DvkPanel.h   |  7 +++++++
 4 files changed, 66 insertions(+), 4 deletions(-)

Generated by AetherClaude (automated agent for AetherSDR)

Both DvkPanel and CwxPanel registered F1-F12 QShortcuts. When the DVK
panel was shown, both contexts matched the same key event, so Qt's
shortcut map emitted activatedAmbiguously and dropped the event silently
— mouse clicks on the DVK button still played the recording, but the
keyboard shortcut did nothing.

Move both panels' F1-F12 + ESC shortcuts onto window() with
Qt::ApplicationShortcut and toggle setEnabled() from showEvent/hideEvent
so exactly one set is live at any time. The two panels are mutually
exclusive in the splitter, so visibility-driven toggling cleanly avoids
ambiguity without per-panel coordination.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

@aethersdr-agent aethersdr-agent Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the fix — the approach is sound. Toggling setEnabled() on show/hide is the right way to handle this since disabled QShortcuts are skipped by Qt's ambiguity detection, and mutual exclusion of the panels is enforced both at toggle time (MainWindow.cpp:5302, 5328) and on mode change (10943, 10955), so exactly one set ends up live. The comments cross-referencing #2464 between the two files are nice — anyone touching either panel in the future will see the coupling.

Two small things worth flagging, no blockers:

1. DvkPanel goes from window-scoped to application-scoped shortcuts. Before this PR, DvkPanel's F1–F12 + ESC were QShortcut(..., this) with no ApplicationShortcut context, so they only fired when focus was inside the panel. They're now app-wide whenever the panel is visible. That's almost certainly desirable (matches CwxPanel's long-standing behavior), but worth a manual smoke test that ESC doesn't interfere with modal dialogs (e.g. settings dialog) opened while DvkPanel is visible — ApplicationShortcut ESC + a modal dialog's QDialog::reject() is the classic collision point, even though the same risk has existed for CwxPanel for a while.

2. CwxPanel macros now silent when panel is hidden. Previously CwxPanel's F1–F12 fired app-wide as long as the panel object existed (mode-gated inside the lambda). Now the user must keep the panel visible for macros to work. This is probably the right call (the new behavior matches user intent), but if anyone was relying on hiding the panel to free screen space while still using F-keys in CW mode, they'll notice. Probably worth a one-liner in the release notes.

Both points are intentional simplifications of the previous behavior — flagging only so they don't surprise anyone in QA.

@ten9876 ten9876 merged commit f3aeeb9 into main May 9, 2026
5 checks passed
@ten9876 ten9876 deleted the aetherclaude/issue-2464 branch May 9, 2026 14:20
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.

DVK keyboard shortcuts (F1–F12) do not trigger transmission

1 participant