Bug 450762

Summary: Volume keys for active application
Product: [Plasma] plasmashell Reporter: clarkboggle
Component: Audio Volume widgetAssignee: Plasma Bugs List <plasma-bugs-null>
Status: CONFIRMED ---    
Severity: wishlist CC: isma.af, kdedev, nowrep, pallaswept
Priority: NOR    
Version First Reported In: 6.2.4   
Target Milestone: 1.0   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description clarkboggle 2022-02-23 17:04:32 UTC
SUMMARY
When we use the volume keys, it changes master volume.

What if we could have an option to change the volume for the active application (or the application windows where the mouse is over) using the volume keys instead of each time open the plasmoid and click the App tab?
Comment 1 clarkboggle 2022-02-23 17:07:18 UTC
Or even directly mute a window when 2 videos are playing.
Comment 2 TraceyC 2025-01-15 17:28:16 UTC
In Plasma 6, there are separate shortcuts for Audio Volume and Media Volume.
There may be a possibility to add shortcuts for volume for the currently focused / active application playing audio
Comment 3 pallaswept 2025-01-18 18:59:59 UTC
This is already a thing. Hold shift while you press the volume keys.
Comment 4 TraceyC 2025-01-21 16:13:17 UTC
(In reply to pallaswept from comment #3)
> This is already a thing. Hold shift while you press the volume keys.

On my system, holding shift while pressing the volume keys still changes the master volume. It doesn't change the volume of the focused application.
By default, Shift Volume Up / Down is mapped to changing the master volume by 1%
There are no default shortcuts for changing media volume

Additionally, as I mentioned, I don't see a shortcut in the list for changing volume of the *active* app, rather than "media".
The system seems to determine the app that "media volume" controls by whichever was last told to start playing audio, not the one with focus.

To see this:
1. Opened two audio programs. Set volume on them individually to a certain level. Started playing audio in both
2. Clicked on one of the apps to focus it
3. Pressed shift volume up / volume down
4. Repeated with the other app

Observed that the app which last had been told to "play" was the one "Media volume" controlled, regardless of which one I clicked to focus

Observed the master volume was adjusted. The volume bars / levels of both applications were unchanged.
Comment 5 pallaswept 2025-01-21 18:10:40 UTC
I see the same defaults as you, but my shift+volume is bound to media volume. I guess it must be my old config, sorry about that!

I misunderstood what you meant by "active application", I thought that you meant 'active' in the sense that it was the one selected by the media control widget. I understand now that you mean 'active' as in, the window manager's focussed application. 

I also would very much like to see this feature.