protonscr

Steam Music does not respond to media keys

steamopen reviewedSteam client
ValveSoftware/steam-for-linux#3522 · opened 2014-10-03 by vividnightmare · updated 2023-05-09 · 6 comments · github
Vvividnightmare 2014-10-03 github

The latest beta client indicates media keys should now work with the music player. Yet, it is not working on Kubuntu 14.04.

The "Enable Media Keys" check box under Settings->Music does not remain selected after pressing "OK" and there is no response from the music player when pressing the media keys. Amarok does respond to them.

Processor Information:
    Vendor:  GenuineIntel
    CPU Family:  0x6
    CPU Model:  0x2a
    CPU Stepping:  0x7
    CPU Type:  0x0
    Speed:  3301 Mhz
    4 logical processors
    4 physical processors
    HyperThreading:  Unsupported
    FCMOV:  Supported
    SSE2:  Supported
    SSE3:  Supported
    SSSE3:  Supported
    SSE4a:  Unsupported
    SSE41:  Supported
    SSE42:  Supported

Network Information:
    Network Speed:  

Operating System Version:
    Ubuntu 14.04.1 LTS (64 bit)
    Kernel Name:  Linux
    Kernel Version:  3.13.0-36-generic
    X Server Vendor:  The X.Org Foundation
    X Server Release:  11501000
    X Window Manager:  KWin
    Steam Runtime Version:  steam-runtime-release_2014-08-20

Video Card:
    Driver:  NVIDIA Corporation GeForce GTX 560 Ti/PCIe/SSE2

    Driver Version:  4.4.0 NVIDIA 343.22
    OpenGL Version: 4.4
    Desktop Color Depth: 24 bits per pixel
    Monitor Refresh Rate: 60 Hz
    VendorID:  0x10de
    DeviceID:  0x1200
    Number of Monitors:  2
    Number of Logical Video Cards:  1
    Primary Display Resolution:  1920 x 1080
    Desktop Resolution: 3280 x 1080
    Primary Display Size: 18.78" x 10.55"  (21.54" diag)
                                            47.7cm x 26.8cm  (54.7cm diag)
    Primary Bus: PCI Express 16x
    Primary VRAM: 1024 MB
    Supported MSAA Modes:  2x 4x 8x 16x 

Sound card:
    Audio device: Realtek ALC892

Memory:
    RAM:  7939 Mb

Miscellaneous:
    UI Language:  English
    LANG:  en_US.UTF-8
    Microphone:  Not set
    Total Hard Disk Space Available:  239242 Mb
    Largest Free Hard Disk Block:  127193 Mb

Installed software:

Recent Failure Reports:
    Thu Oct  2 03:39:14 2014 GMT: file ''/tmp/dumps/assert_20141001203907_65.dmp'', upload yes: ''CrashID=bp-42dfed20-2a21-45dd-a3fc-fd85e2141001''
    Thu Oct  2 12:21:16 2014 GMT: file ''/tmp/dumps/assert_20141002051908_32.dmp'', upload no: ''Couldn't connect to server''
Ppanzi 2014-10-13 github

I see you use KDE. Workaround: Install my plasmoid "Play Control" on your dashboard using context menu -> Add Widgets -> Get new widgets -> Download new plasma widgets. In my widget go to the settings (context menu -> Play Control settings) and under Command Based Player Control add a new player called "Steam Music" and fill in these settings:

Name:       Steam Music
Icon:       /usr/share/icons/hicolor/48x48/apps/steam.png
Play:       steam steam://musicplayer/play &
Pause:      steam steam://musicplayer/pause &
Play/Pause: steam steam://musicplayer/toggleplaypause &
Next:       steam steam://musicplayer/playnext &
Previous:   steam steam://musicplayer/playprevious &

I found these commands using strings and grep on the steam binaries in combination with guessing (I guessed play, pause, playnext and playprevious). & is needed in the case the call starts Steam. Otherwise plasma would freeze until Steam is closed. (I guess I should fix that in my plasmoid.)

And finally configure the shortcuts under Global Media Player Shortcuts.

Using this has the big advantage that you can prevent hotkey conflicts when using multiple media players. The plasmoid tracks which player is currently active and sends the commands there. This works with most Linux media players out of the box (mpris DBus API). It doesn't work that well with command based control interfaces because it can't automatically detect if those start/stop playback (so it might have the focus on the wrong player, and you need to change it manually in that case). If you only ever use Steam Music there will be no problem.

End of shameless self plug.

Vvividnightmare 2014-10-31 github

Thanks for this information. Simply knowing these commands is enough to manually bind keys to them on most Linux desktops.

Is there one of these to show the Music Player window?

Ppanzi 2014-10-31 github

Yes: steam steam://open/musicplayer &

See also:

$ strings steamui.so |grep steam://open
steam://open/games
steam://open/servers
steam://open/screenshots
steam://open/news
steam://open/settings
steam://open/bigpicture
steam://open/friends
steam://open/downloads
steam://open/screenshots/%llu
steam://open/musicplayer
steam://open/console
Ppanzi 2014-11-01 github

PS: I added a preset for the Steam Music Player to my plasma widget. :)

Wwalksanatora 2023-05-09 github

so wait is this fixed? or will I have to do hacky workaround to get media keys working
(I dont see a enable media keys option in Music settings)

Wwalksanatora 2023-05-09 github

so the thing that I will do
steam steam://open/musicplayer& the "spawn" command
steam -exitsteam - Stop button
steam://musicplayer/toggleplaypause - play/pause button
steam://musicplayer/play[previous|next] reverse/forward buttons respectively

Nothing extracted yet.