You are not logged in.

#1 2011-06-21 19:37:30

Crypz
Member
Registered: 2011-06-21
Posts: 14

[SOLVED]how to make functional keys work on my laptop

I am running arch on my dell, it has keys to turn volume up/down, pause, etc


How am I supposed to make them function within the OS?


i am running xfce4

Last edited by Crypz (2011-06-22 22:46:03)

Offline

#2 2011-06-21 19:41:05

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED]how to make functional keys work on my laptop

Offline

#3 2011-06-21 21:03:03

Crypz
Member
Registered: 2011-06-21
Posts: 14

Re: [SOLVED]how to make functional keys work on my laptop

I tried that, I might have done something wrong, because I cant get it working.

here's what I did:

used xev to retreive this:

172 XF86AudioPlay
174 XF86AudioStop
173 XF86AudioPrev
171 XF86AudioNext
122 XF86AudioLowerVolume
123 XF86AudioRaiseVolume
121 XF86AudioMute

from here https://wiki.archlinux.org/index.php/Ex … ys_in_Xorg

Created the xmodmap file:

keycode 171 = XF86AudioNext
keycode 172 = XF86AudioPlay
keycode 173 = XF86AudioPrev
keycode 174 = XF86AudioStop
keycode 121 = XF86AudioMute
keycode 122 = XF86AudioLowerVolume
keycode 123 = XF86AudioRaiseVolume

typed

xmodmap ~/.Xmodmap

not working, what did i miss?

Offline

#4 2011-06-21 23:15:16

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: [SOLVED]how to make functional keys work on my laptop

Why not just use xbindkeys and bind the key strokes to start whatever app you want. I do it that way and it works perfectly.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#5 2011-06-22 03:01:18

Crypz
Member
Registered: 2011-06-21
Posts: 14

Re: [SOLVED]how to make functional keys work on my laptop

I can set shortkeys in gui of xfce4 keyboard settings,

keycode 171 = XF86AudioNext
keycode 172 = XF86AudioPlay
keycode 173 = XF86AudioPrev
keycode 174 = XF86AudioStop
keycode 121 = XF86AudioMute
keycode 122 = XF86AudioLowerVolume
keycode 123 = XF86AudioRaiseVolume

basically, I need commands to mute, lower/raise volume of alsa master.

also, for the playback keys, i use banshee

Offline

#6 2011-06-22 03:42:32

stlarch
Member
From: hell
Registered: 2010-12-25
Posts: 1,265

Re: [SOLVED]how to make functional keys work on my laptop

man amixer

You can look at my .xbindkeysrc to see how I do it.

Offline

#7 2011-06-22 04:06:36

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: [SOLVED]how to make functional keys work on my laptop

stlarch, I think he mentioned that he wants a GUI way of assigning keys and wants to do it only in the xfce4 keyboard settings. Or at least that's the impression I got.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#8 2011-06-22 05:45:07

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,739

Re: [SOLVED]how to make functional keys work on my laptop

Crypz wrote:

I can set shortkeys in gui of xfce4 keyboard settings,

keycode 171 = XF86AudioNext
keycode 172 = XF86AudioPlay
keycode 173 = XF86AudioPrev
keycode 174 = XF86AudioStop
keycode 121 = XF86AudioMute
keycode 122 = XF86AudioLowerVolume
keycode 123 = XF86AudioRaiseVolume

basically, I need commands to mute, lower/raise volume of alsa master.

also, for the playback keys, i use banshee

I don't use banshee and don't know the commands.
If you are using pulseaudio, see this post
Even if you are not, you could adapt it.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#9 2011-06-22 06:19:22

Meyithi
Member
From: Wirral, UK
Registered: 2009-06-21
Posts: 550
Website

Re: [SOLVED]how to make functional keys work on my laptop

# Toggle mute
amixer -q sset Master toggle

# Raise volume
amixer -q sset Master +3 unmute

# Lower volume
amixer -q sset Master -3 unmute

# dwm commands
static const char *mutecmd[]    = { "amixer", "-q", "sset", "Master", "toggle", NULL };
static const char *volupcmd[]   = { "amixer", "-q", "sset", "Master", "3+", "unmute", NULL };
static const char *voldowncmd[] = { "amixer", "-q", "sset", "Master", "3-", "unmute", NULL };

The mind roams more freely in empty rooms.
dwm - colours - ncmpcpp - system
irc://irc.freenode.net:meyithi

Offline

#10 2011-06-22 14:31:45

Crypz
Member
Registered: 2011-06-21
Posts: 14

Re: [SOLVED]how to make functional keys work on my laptop

stlarch wrote:

man amixer

You can look at my .xbindkeysrc to see how I do it.

man amixer
No manual entry for amixer

how should I do that?



Meyithi wrote:
# Toggle mute
amixer -q sset Master toggle

# Raise volume
amixer -q sset Master +3 unmute

# Lower volume
amixer -q sset Master -3 unmute

# dwm commands
static const char *mutecmd[]    = { "amixer", "-q", "sset", "Master", "toggle", NULL };
static const char *volupcmd[]   = { "amixer", "-q", "sset", "Master", "3+", "unmute", NULL };
static const char *voldowncmd[] = { "amixer", "-q", "sset", "Master", "3-", "unmute", NULL };

Tried out both in xfce4 keyboard GUI, neither worked for me.

am I missing something? Should I run/install something to make the commands work?
I have tried different methods and not once have I got my extra keys working.

for example, Did this https://wiki.archlinux.org/index.php/Ex … board_Keys
following by https://wiki.archlinux.org/index.php/Ex … ys_in_Xorg

Offline

#11 2011-06-22 14:43:51

stlarch
Member
From: hell
Registered: 2010-12-25
Posts: 1,265

Re: [SOLVED]how to make functional keys work on my laptop

Crypz wrote:

man amixer
No manual entry for amixer

Do you have alsa installed and setup already? If not do that first, obviously. Try

 /usr/bin/mandb --quiet

, and then retry #man amixer.

Last edited by stlarch (2011-06-22 14:44:49)

Offline

#12 2011-06-22 18:22:53

jiyuu
Member
Registered: 2010-04-13
Posts: 63

Re: [SOLVED]how to make functional keys work on my laptop

amixer is in the alsa-utils package.

Offline

#13 2011-06-22 18:56:22

cjazz
Member
Registered: 2009-03-12
Posts: 47

Re: [SOLVED]how to make functional keys work on my laptop

Hello, Crypz,

I realize you're being virtually bombarded with suggestions, but I wanted to toss in my two cents. I, too, am running Xfce4 these days, and I was having a devil of a time getting my volume control keys to work correctly. For me, the "xfconf-query -c" commands offered as alternatrives in the Wiki article at https://wiki.archlinux.org/index.php/Xf … me_buttons did the trick.

Offline

#14 2011-06-22 19:37:43

SiegeMachine
Member
Registered: 2009-03-26
Posts: 157

Re: [SOLVED]how to make functional keys work on my laptop

Everyone hold up.  I have a dell 1558 and I had the same problem.  The answer was here

  Once that is done, I got xbindkeys and bound the volume keys with amixer commands to control my volume levels and voila, you should be good to go.

Last edited by SiegeMachine (2011-06-22 19:38:45)

Offline

#15 2011-06-22 22:45:35

Crypz
Member
Registered: 2011-06-21
Posts: 14

Re: [SOLVED]how to make functional keys work on my laptop

jiyuu wrote:

amixer is in the alsa-utils package.

cjazz wrote:

Hello, Crypz,

I realize you're being virtually bombarded with suggestions, but I wanted to toss in my two cents. I, too, am running Xfce4 these days, and I was having a devil of a time getting my volume control keys to work correctly. For me, the "xfconf-query -c" commands offered as alternatrives in the Wiki article at https://wiki.archlinux.org/index.php/Xf … me_buttons did the trick.

Thanks, I got it fixed.

I installed alsa-utils (I had only alsamixer before, but not the utils package), then followed to the link cjazz posted and got the keys working.

The issue was probably that I did not have alsa-utils installed, which made me try out different stuff without success.

used those keys in xfce4 keyboard settings GUI

amixer set Master 5%+

amixer set Master 5%-

amixer set Master toggle

And also got my playback keys working in Banshee:

banshee --next
banshee --previous
banshee --toggle-playing
banshee --stop

Offline

Board footer

Powered by FluxBB