Register Play/Pause as global shortcut again
ClosedPublic

Authored by wbauer on Oct 3 2019, 9:02 AM.

Details

Summary

Commit 0b2b243b removed the call to KGlobalAccel::setGlobalShortcut() because it registered Space as global shortcut, which of course is a bad idea.
But that made it impossible to set up a global shortcut at all (and made an existing one have no effect).

To fix this, add it back and register an empty key, like the KDE4 code does.

Test Plan

A global shortcut for Play/Pause can again be set in systemsettings5->Shortcuts->Global Shortcuts (it doesn't have a key assigned by default), and pressing the key does work as expected afterwards even if Amarok's window is not active.

The local shortcut (Space by default) still works as well (but only if Amarok's window is the active one, as it should be).

Diff Detail

Repository
R181 Amarok
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
wbauer created this revision.Oct 3 2019, 9:02 AM
Restricted Application removed a project: Amarok. · View Herald TranscriptOct 3 2019, 9:02 AM
wbauer requested review of this revision.Oct 3 2019, 9:02 AM
wbauer edited the summary of this revision. (Show Details)
wbauer edited the test plan for this revision. (Show Details)Oct 3 2019, 9:13 AM
wbauer edited the test plan for this revision. (Show Details)
wbauer retitled this revision from Register Play/Pause global shortcut again to Register Play/Pause as global shortcut again.Oct 3 2019, 9:29 AM
schweingruber accepted this revision.Oct 3 2019, 10:50 AM
schweingruber added a subscriber: schweingruber.

Looks OK to me, anyone who could test additionally? I am on a phone right now...

This revision is now accepted and ready to land.Oct 3 2019, 10:50 AM
heikobecker accepted this revision.Oct 3 2019, 6:58 PM

Btw, I just found a bug report about this:
https://bugs.kde.org/show_bug.cgi?id=373590

I'll add a reference to the summary when I commit it.

This revision was automatically updated to reflect the committed changes.