Create a global launch shortcut (Meta+E)
ClosedPublic

Authored by ngraham on Mar 17 2019, 4:07 PM.

Details

Summary

This patch adds a global shortcut (Meta+E) to launch Dolphin, just like Konsole has.

FEATURE: 405302
FIXED-IN: 19.04.0

Test Plan
  1. Apply patch and reboot, or create and log into a new user
  2. Hit Meta+E
  3. Dolphin opens!

Diff Detail

Repository
R318 Dolphin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
ngraham created this revision.Mar 17 2019, 4:07 PM
Restricted Application added a project: Dolphin. · View Herald TranscriptMar 17 2019, 4:07 PM
Restricted Application added a subscriber: kfm-devel. · View Herald Transcript
ngraham requested review of this revision.Mar 17 2019, 4:07 PM
ngraham edited the test plan for this revision. (Show Details)Mar 17 2019, 4:07 PM
elvisangelaccio requested changes to this revision.Mar 17 2019, 4:48 PM
elvisangelaccio added a subscriber: elvisangelaccio.

+1 otherwise :)

CMakeLists.txt
145

DATA_INSTALL_DIR is deprecated, please use KDE_INSTALL_DATADIR instead.

This revision now requires changes to proceed.Mar 17 2019, 4:48 PM
ngraham updated this revision to Diff 54106.Mar 17 2019, 4:58 PM
ngraham marked an inline comment as done.

Use ${KDE_INSTALL_DATADIR}

elvisangelaccio accepted this revision.Mar 17 2019, 5:01 PM
This revision is now accepted and ready to land.Mar 17 2019, 5:01 PM
hallas added a subscriber: hallas.Mar 17 2019, 5:18 PM

Nice stuff :) What about adding Meta+D for showing the desktop? This is a standard shortcut for all the Windows folks out there.

Sounds good, I'll do that tomorrow!

This revision was automatically updated to reflect the committed changes.

We don't want more stuff using khotkeys, you've seen the spectacle discussion and the move to the new kglobalaccel code.

I want this reverted.

We don't want more stuff using khotkeys, you've seen the spectacle discussion and the move to the new kglobalaccel code.

Can you provide the link to this discussion?

Here's the patch in spectacle: D19310

A bit of background, Plasma wants to kill khotkeys since forevers. It splits the shortcuts UI, the UI is backwards, and the extra parts that aren't shortcuts simply don't work.
Obviously we want to do that without regressions, and therefore I don't want to introduce more things that need porting.

The shortcuts UI was changed to add app launching. Systemsettings -> global shortcuts -> + -> select dolphin.

(runtime kglobalaccel part: https://phabricator.kde.org/D2103)

Apps should be able to set a default via the X-KDE-Shortcuts keyword and co-installing the .desktop file into another path.
It definitely definitely needs some docs, and maybe some code fixes, but it's got all the code.

Whilst we're at it. Konsole was patched control+alt+t https://phabricator.kde.org/D13708 this is meta + e . I don't have an opinion on which is better, but having a random mix of styles definitely isn't right.

Makes sense, thanks for the explanation. Reverted with 3fe6547197.

FWIW, I've no idea against the principle, just please copy the .desktop approach from that spectacle patch.

If that doesn't work on it's own, let me know and lets fix it.

Sorry, I'll redo this to use KGlobalAccel, and then do Konsole too.

FWIW I would be comfortable standardizing on the convention that global shortcuts always use the Meta key.

Careful with konsole, we have to do a migration as AFAIK it's been released with the khotkeys file.

KGlobalAccel is very ungraceful when it finds a conflict.

I've re-implemented this using KGlobalAccel: D20229