You are not logged in.

#1 2015-10-31 18:17:13

JJK
Member
Registered: 2013-10-24
Posts: 56

Is there an easy way to get multimedia keys working

Today I decided to give some tiling window managers a go.
I installed awesome wm and i3.

What I noticed was that the multimedia keys (i.e. brightness and sound control, etc.) were not working out of the box.
I found the solution fairly fast, just add a couple of lines to the config files and voila, a couple of buttons started working again.
However most of the (less important) buttons are still not working.

Now I was thinking: Gnome has those keys working out of the box, I think kde has that too, but a lot of other WM/DE have not.
I don' t think it should be the task of the WM/DE to control these things.

So my question is: is there a package that makes those keys work in the background (i.e. before the DE/WM starts)?

And if not, should we make such a package?

Let me know what you think.

JJK

Last edited by JJK (2015-10-31 18:20:45)

Offline

#2 2015-10-31 20:34:55

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: Is there an easy way to get multimedia keys working

There is to my knowledge no such package in general. There is xfce4-volumed normally for xfce but I think it works in general, but only for the volume keys. But almost every Windows Manager allow to bind any key to specified commands and this can usually be used to bind multimedia keys.

I think it well the job of DE to handle these keys, after all these actions typically refer to the "desktop experience": something integrate that handle the system, files, hardware, etc. It is much less clear if it is the job of a single window manager which job is to manage windows and nothing more. But is making yet another daemon a really good idea? I think that if the window manager can bind keys to custom commands, it is the proper way to handle these keys. If you add a daemon each times something could be useful, you end up with a bloated zoo of daemons and it is typically not what you want if you run a single window manager.

Last edited by olive (2015-10-31 20:36:52)

Offline

#3 2015-10-31 20:41:56

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,480
Website

Re: Is there an easy way to get multimedia keys working

I second everything olive wrote and can only add the following: a generic tool for this would not work very well as what should be done with the keys really does depend on which (if any) DE you are using.

For example, what should happen when you hit the XF86Display key?  With simple WMs I usually have an xrandr script set up the way I want to handle this key, but most gnome users probably want it to open gnome display settings (or some such thing) while KDE users would want it to open KDE's display control panel, and XFCE users would want it opening XFCE's display settings, etc.

The same could be said of nearly any others of these keys.

There is no one tool to bind these keys becuase there is no one set of tools that would be the expected result of pressing the keys.

The volume keys may be the easiest, but even these may depend on whether one is using alsa or pulse audio.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#4 2015-10-31 21:40:40

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Is there an easy way to get multimedia keys working

I used to use xbindkeys, but recently I've switched to sxhkd.

Offline

#5 2015-10-31 21:47:47

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,654

Re: Is there an easy way to get multimedia keys working

For i3, you'll definitely be editing ~/.i3/config

From mine....

# Bindings for my HP Envy 

bindsym XF86AudioPlay exec mpc toggle
bindsym XF86AudioPrev exec mpc prev
bindsym XF86AudioNext exec mpc next
bindsym XF86AudioStop exec mpc stop
bindsym XF86AudioRaiseVolume exec pavolume increase
bindsym XF86AudioLowerVolume exec pavolume decrease
bindsym XF86AudioMute exec pavolume mute
#bindsym XF86AudioRaiseVolume exec amixer set Master 3dB+
#bindsym XF86AudioLowerVolume exec amixer set Master 3dB-
#bindsym XF86AudioMute exec amixer set Master toggle
bindsym Shift+XF86AudioPlay exec dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause
bindsym Shift+XF86AudioPrev exec dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous
bindsym Shift+XF86AudioNext exec dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next
bindsym Shift+XF86AudioStop exec dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Stop

Last edited by ewaller (2015-11-02 14:52:48)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#6 2015-11-02 09:49:47

JJK
Member
Registered: 2013-10-24
Posts: 56

Re: Is there an easy way to get multimedia keys working

Thanks for your reactions, I guess i will have to fix the buttons manually then.

Offline

Board footer

Powered by FluxBB