ShortcutSettings.h header

#include <ew/app/ShortcutSettings.h>

Namespace ew::app

Functions

void ew::app::clearShortcutOverride(Settings &settings, QStringView commandId)

Removes commandId's override, so effectiveShortcut() falls back to the default again.

QString ew::app::effectiveShortcut(const Settings &settings, QStringView commandId, const QString &defaultSequence)

The effective shortcut for commandId: the user's stored override if one is set, otherwise defaultSequence. An override set to an empty string means the command is deliberately unbound and is returned as such.

bool ew::app::hasShortcutOverride(const Settings &settings, QStringView commandId)

Returns true if commandId has a stored override (i.e. differs from its built-in default).

void ew::app::setShortcutOverride(Settings &settings, QStringView commandId, const QString &sequence)

Stores sequence as commandId's override (an empty sequence records "unbound").

QString ew::app::shortcutSettingKey(QStringView commandId)

The settings key under which commandId's shortcut override is stored.

Persistence helpers for user-rebindable keyboard shortcuts. Each command is identified by a stable string id (e.g. "file.save"); its override is stored under the settings key "shortcuts/<id>" as a portable-text key sequence. These are UI-agnostic so the resolution logic can be unit-tested; the desktop ShortcutRegistry binds them to QActions.