Skip to content

Keyboard Shortcuts menu item does nothing on macOS (precompiled build) ,Preferences open the Shortcuts Window #883

Description

@VU3ESV

Report preparation

  • I used the AI-assisted bug report tool (Help → Support → File an Issue)
  • I have attached a support bundle or log file

What happened?

What happened

On the macOS precompiled build:

  • View → Keyboard Shortcuts — the Keyboard Shortcuts window does not
    appear
    . Nothing visible happens to the user.
  • AetherSDR → Preferences — the Keyboard Shortcuts window opens
    instead of the Preferences window.

The Preferences window is therefore completely unreachable from the macOS
menu. Originally reported in #423; this issue tracks the specific
mis-wiring identified on the macOS precompiled build.

What I expected

  • View → Keyboard Shortcuts should open the Keyboard Shortcuts window.
  • AetherSDR → Preferences should open the Preferences/Settings window.

Steps to reproduce

  1. Launch the macOS precompiled build of AetherSDR.
  2. From the menu bar, select AetherSDR → Preferences.
  3. Observed: The Keyboard Shortcuts window opens — wrong window.
  4. From the menu bar, select View → Keyboard Shortcuts.
  5. Observed: Nothing visible happens; the Keyboard Shortcuts window does
    not appear.

Environment

  • OS: macOS (precompiled binary build)
  • AetherSDR version: latest precompiled release
  • Radio / firmware: not relevant to this UI bug

Suggested fix

On macOS, Qt automatically intercepts any QAction assigned
QAction::PreferencesRole and moves it to the AetherSDR → Preferences
native menu entry. If the Keyboard Shortcuts action has been assigned
PreferencesRole by mistake, Qt will reparent it into the application menu
and connect it to whatever slot it carries — in this case showKeyboardShortcuts().
The actual Preferences action then loses its menu entry and its slot is never
called.

Additionally, View → Keyboard Shortcuts may be connecting to a slot that
opens a window, but that window is raised behind the main window and never
brought to the foreground (raise() + activateWindow() missing).

Recommended checks in MainWindow.cpp:

// 1. Ensure menu roles are explicitly set:
ui->actionPreferences->setMenuRole(QAction::PreferencesRole);
ui->actionKeyboardShortcuts->setMenuRole(QAction::NoRole); // prevent macOS reparenting

// 2. Ensure slots are correctly connected:
connect(ui->actionPreferences,
        &QAction::triggered, this, &MainWindow::showPreferences);
connect(ui->actionKeyboardShortcuts,
        &QAction::triggered, this, &MainWindow::showKeyboardShortcuts);

// 3. In showKeyboardShortcuts(), ensure the window is brought to front:
void MainWindow::showKeyboardShortcuts() {
    m_keyboardShortcutsDialog->show();
    m_keyboardShortcutsDialog->raise();
    m_keyboardShortcutsDialog->activateWindow();
}

This bug is macOS-specific because QAction::PreferencesRole is a no-op on
Linux and Windows — role-based menu reparenting only occurs on macOS, which
is why the Linux build is unaffected.

What did you expect?

View-> Keyboard Shortcuts opens the Keyboard Shortcuts Window and Preferences shall open its respective window implementation

Steps to reproduce

No response

Radio model & firmware

No response

Linux distro & Qt version

AetherSDR v0.8.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    awaiting-confirmationFix applied — waiting for reporter to confirm resolutionbugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions