View previous topic :: View next topic |
Author |
Message |
jimmij Tux's lil' helper
Joined: 02 Dec 2008 Posts: 139
|
Posted: Tue Apr 08, 2014 1:00 pm Post subject: Fn + up/down works only in mplayer |
|
|
I cannot set volume with function key (Fn+up/down). Other things like brightness (Fn+left/right) or NumLk (Fn+F11) works fine. The only place where Fn+up/down works is mplayer. I believe I should bind Fn+up/down to pcm or master in alsamixer, but how to do that? _________________ Vanitas vanitatum et omnia vanitas.
Libera temet ex inferis. |
|
Back to top |
|
|
roseZ n00b
Joined: 17 Dec 2005 Posts: 31 Location: Finland
|
Posted: Sat Apr 12, 2014 9:31 am Post subject: |
|
|
Mplayer recognizes some multimedia keys (like XF86AudioRaiseVolume) out of the box, but configuring them outside specific applications depends on the desktop environment you're using.
Personally, I use x11-misc/xbindkeys which is DE agnostic. In case you want to give it a try, here's a part of my ~/.xbindkeysrc as a tip on how to control the ALSA mixer (for card 0):
Code: |
"amixer -q -c 0 set PCM toggle"
XF86AudioMute
"amixer -q -c 0 set PCM Playback 10%+"
XF86AudioRaiseVolume
"amixer -q -c 0 set PCM Playback 10%-"
XF86AudioLowerVolume
|
That uses amixer from media-sound/alsa-utils package. In case you need one, the Arch folks have written a nice intro on using xbindkeys. |
|
Back to top |
|
|
jimmij Tux's lil' helper
Joined: 02 Dec 2008 Posts: 139
|
Posted: Sat Apr 12, 2014 3:06 pm Post subject: |
|
|
In fact I do not use any DE right now, just pure WM (sawfish). Under gnome Fn keys work fine, but I really hate recent gnome. I tried to use xmodmap which I believe is most basic way for linux, like
Code: | xmodmap -e 'keycode 38 = XF86AudioMute' | normally keycode 38 is assigned to letter 'a'
But again it works only in mplayer, to be precise when I hit letter 'a' everywhere but in mplayer nothing happens. _________________ Vanitas vanitatum et omnia vanitas.
Libera temet ex inferis. |
|
Back to top |
|
|
roseZ n00b
Joined: 17 Dec 2005 Posts: 31 Location: Finland
|
Posted: Sun Apr 13, 2014 6:47 am Post subject: |
|
|
That's just it: you've told X that pressing 'a' should count as pressing 'XF86AudioMute', but neither Sawfish nor X is configured to do anything with it (except pass the keypress event to the active application). If, unlike mplayer, the application is not programmed to respond to XF86AudioMute, nothing will happen. That's why I suggested using xbindkeys to do something about those keypresses in my earlier post (or use the facilities of your WM, if it provides them).
By the way, your brightness keys probably work because they are recognized on a lower level (maybe ACPI or even hardware, It's the same on my laptop) and normal numlock behaviour is always the default. |
|
Back to top |
|
|
jimmij Tux's lil' helper
Joined: 02 Dec 2008 Posts: 139
|
Posted: Mon Apr 14, 2014 1:05 am Post subject: |
|
|
OK, thanks for your help, it works. _________________ Vanitas vanitatum et omnia vanitas.
Libera temet ex inferis. |
|
Back to top |
|
|
|