Skip to content

Move keyboard shortcuts to dedicated settings file with import/export #419

Description

@ten9876

What

Move keyboard shortcut bindings out of the main AetherSDR.settings XML file into a dedicated ~/.config/AetherSDR/shortcuts.settings file (same pattern as midi.settings for MIDI bindings). Add import/export functionality so users can share shortcut profiles.

Why

  1. Separation of concerns — shortcut bindings are independent of radio/display settings and shouldn't be mixed in the main settings file
  2. Profile sharing — operators want to share shortcut layouts (e.g. "Contest CW", "DX SSB", "Casual Ragchew") without exporting their entire settings file
  3. Clean reset — deleting shortcuts.settings resets shortcuts to defaults without affecting any other settings
  4. Consistency — follows the same pattern as MidiSettings which already uses a dedicated XML file

Current State

Bindings are stored as Shortcut_<actionId> keys in AppSettings (AetherSDR.settings). Loaded in ShortcutManager::loadBindings(), saved in ShortcutManager::saveBindings().

Proposed Changes

1. Dedicated ShortcutSettings file

  • New: src/core/ShortcutSettings.h/.cpp (or extend ShortcutManager directly)
  • File: ~/.config/AetherSDR/shortcuts.settings (XML, same format as midi.settings)
  • Migrate existing Shortcut_* keys from AppSettings on first launch, then remove them

2. Import/Export in ShortcutDialog

  • Export Profile button → QFileDialog::getSaveFileName() → writes JSON:
    {
      "name": "Contest CW",
      "version": "0.7.12",
      "bindings": {
        "tune_up_1": "Right",
        "mox_toggle": "T",
        "go_to_freq": "G"
      }
    }
  • Import Profile button → QFileDialog::getOpenFileName() → reads JSON, applies bindings, rebuilds shortcuts
  • File extension: .aethershortcuts (or .json)

3. ShortcutDialog UI additions

Files to modify

File Change
src/core/ShortcutManager.cpp Replace AppSettings read/write with dedicated XML file
src/gui/ShortcutDialog.cpp Add import/export buttons and file dialogs
src/core/AppSettings.cpp One-time migration of Shortcut_* keys (then remove them)

Priority

Low — current implementation works. This is a quality-of-life improvement for users who want to share profiles or maintain multiple shortcut layouts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    GUIUser interfaceenhancementImprovement to existing featuremaintainer-reviewRequires maintainer review before any action is takenpriority: lowLow priority

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions