Ubuntu – Assigning keyboard shortcuts to KDE Dolphin service menus

dolphinkdekubuntushortcut-keys

Is there any way I can assign a keyboard shortcut to a custom service menu I've added to Dolphin? The options menu for keyboard assignments does not seem to show any service menu actions, nor have I managed to find a a .desktop entry key that would allow me to set a hotkey.

I know that GNOME's Nautilus uses a hidden accels file to allow users to set up custom key bindings. Does a similar option exist for Dolphin, perhaps?

Best Answer

By my knowledge

It is not possible to start a KDE Service Menu (context menu) with a keyboard shortcut. This is based on:

The Dolphin is using KDE Framework 5 KIO FileItemActions: https://api.kde.org/frameworks/kio/html/classKFileItemActions.html :

Detailed Description

This class creates and handles the actions for a url (or urls) in a popupmenu.

This includes:

  • "open with " actions, but also
  • builtin services like mount/unmount for old-style device desktop files
  • user-defined actions for a .desktop file, defined in the file itself (see the desktop entry standard)
  • servicemenus actions, defined in .desktop files and selected based on the mimetype of the url

Dolphin source files:

Quote:

/**
 * @brief Represents the context menu which appears when doing a right
 *        click on an item or the viewport of the file manager.
 *

Sort of workaround with the Dolphin button shortcuts

The KDE Forums has a topic 'Play All Media Button for Dolphin': https://forum.kde.org/viewtopic.php?f=223&t=140139 . It shows how to patch the Dolphin sources to add extra buttons to the Dolphin toolbar. The Dolphin buttons can have the keyboard shortcut.

Wishes/patches

You could file a wish at the https://bugs.kde.org .

Patches and the review requests can be added to the KDE's instance of Phabricator: https://phabricator.kde.org/ .

Related Question