Commit c0322379 authored by David Redondo's avatar David Redondo 🏎
Browse files

Categorize standard shortcuts

We have a huge amount of standard shortcuts. By adding the ability to divide
them into categories, they can be presented to the user in a way that enables
them to easier find the shortcut that they want. Internally some shortcuts were
already grouped but that seems to have stopped for the later additions. (The
related standard actions from KConfigWidgets also seem to have this not exposed
internal grouping.)
See plasma-desktop!26
parent 45d8532f
This diff is collapsed.
......@@ -147,6 +147,20 @@ enum StandardShortcut {
StandardShortcutCount // number of standard shortcuts
* Categories in which the standard shortcuts can be classified
* @since 5.74
enum class Category {
InvalidCategory = -1,
* Returns the keybinding for @p accel.
* On X11, if QApplication was initialized with GUI disabled, the
......@@ -223,6 +237,12 @@ KCONFIGGUI_EXPORT QList<QKeySequence> hardcodedDefaultShortcut(StandardShortcut
KCONFIGGUI_EXPORT void saveShortcut(StandardShortcut id, const QList<QKeySequence> &newShortcut);
* Returns the appropriate category for the given StandardShortcut \p id.
* @since 5.73
KCONFIGGUI_EXPORT Category category(StandardShortcut id);
* Open file. Default: Ctrl-o
* @return the shortcut of the standard accelerator
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment