You are not logged in.

#1 2014-11-04 17:21:04

deus_deceit
Member
From: Greece
Registered: 2013-02-10
Posts: 33

[SOLVED]Dell Inspiron 17R Laptop Volume Keys not working in awesome WM

I've tried everything I could find about activating media keys in awesome WM, I tried the XF names and I tried key codes, I tried different keyboard models, nothing seems to work.

First of all I'm using this line in rc.lua to set the keyboard layout, I tried various models in case it would make a difference but it didn't.

awful.util.spawn_with_shell("setxkbmap -model dell -layout us,gr -option grp:alt_shift_toggle")

I tried setting the media keys the easy way, with key names:

-- Multimedia keys
awful.key({}, "XF86AudioLowerVolume", function () awful.util.spawn("amixer -q set pcm 2dB-") end),
awful.key({}, "XF86AudioRaiseVolume", function () awful.util.spawn("amixer -q set pcm 2dB+") end),
awful.key({}, "XF86AudioMute", function () awful.util.spawn("amixer -q sset Master toggle") end),
awful.key({}, "XF86AudioPlay", function () awful.util.spawn("rhythmbox-client --play", false) end),
awful.key({}, "XF86Back", function () awful.util.spawn("rhythmbox-client --previous") end),
awful.key({}, "XF86Forward", function () awful.util.spawn("rhythmbox-client --next") end),
awful.key({}, "Print", function () awful.util.spawn("scrot") end)

OR

-- Multimedia keys
awful.key({}, "XF86AudioLowerVolume", function () awful.util.spawn("amixer -q set Master 5-") end),
awful.key({}, "XF86AudioRaiseVolume", function () awful.util.spawn("amixer -q set Master 5+") end),
awful.key({}, "XF86AudioMute", function () awful.util.spawn("amixer -q sset Master toggle") end),
awful.key({}, "XF86AudioPlay", function () awful.util.spawn("rhythmbox-client --play", false) end),
awful.key({}, "XF86Back", function () awful.util.spawn("rhythmbox-client --previous") end),
awful.key({}, "XF86Forward", function () awful.util.spawn("rhythmbox-client --next") end),
awful.key({}, "Print", function () awful.util.spawn("scrot") end)

Only the mute button works (I'm only going for volume keys, didn't try the play/forward/backward keys)

I used xenv to find the key names/codes, volume up and volume down are not getting registered, I tried in a tty with showkeys, I get codes #114 and #115 for volume buttons and #113 for mute.

So I tried them out:

 awful.key({}, "#114", function () awful.util.spawn("amixer -q set pcm  2dB-") end),
awful.key({}, "#115", function () awful.util.spawn("amixer -q set pcm 2dB+") end),
awful.key({}, "#113", function () awful.util.spawn("amixer -q sset Master toggle") end),
awful.key({}, "XF86AudioPlay", function () awful.util.spawn("rhythmbox-client --play", false) end),
awful.key({}, "XF86Back", function () awful.util.spawn("rhythmbox-client --previous") end),
awful.key({}, "XF86Forward", function () awful.util.spawn("rhythmbox-client --next") end),
awful.key({}, "Print", function () awful.util.spawn("scrot") end)

OR

 awful.key({}, "#114", function () awful.util.spawn("amixer -q set Master 5-") end),
awful.key({}, "#115", function () awful.util.spawn("amixer -q set  Master 5+") end),
awful.key({}, "#113", function () awful.util.spawn("amixer -q sset Master toggle") end),
awful.key({}, "XF86AudioPlay", function () awful.util.spawn("rhythmbox-client --play", false) end),
awful.key({}, "XF86Back", function () awful.util.spawn("rhythmbox-client --previous") end),
awful.key({}, "XF86Forward", function () awful.util.spawn("rhythmbox-client --next") end),
awful.key({}, "Print", function () awful.util.spawn("scrot") end)

And it doesn't work (Not even the mute button which worked with the key name earlier).

In i3 with the same settings (using key names) it works, even tho xev doesn't show the keynames/keycodes when I'm in I3 Wm.

So ...  am I missing something? Any suggestions?

Last edited by deus_deceit (2014-11-04 21:52:24)

Offline

#2 2014-11-04 21:52:07

deus_deceit
Member
From: Greece
Registered: 2013-02-10
Posts: 33

Re: [SOLVED]Dell Inspiron 17R Laptop Volume Keys not working in awesome WM

Okay, I hope you guys can excuse me since I'm a noob, and this wasn't a problem of X/Awesome or arch in general, the commands in the rc.lua had syntactic errors. Sorry for bothering you with this.
Something that might help new people that assume that X doesn't register their keys tho.. If you have bindings for a key in awesome, they wont register in xev, or at least that's what was happening with me and made me think that they weren't detected at all (not functioning).

Offline

Board footer

Powered by FluxBB