You are not logged in.

#1 2016-09-15 10:33:48

Parma
Member
Registered: 2016-09-10
Posts: 9

xbindkeys' binding for multimedia keys not working

Hi

I've been configuring the multimedia keys for my ThinkPad X220.

I've followed the instructions on this page
https://wiki.archlinux.org/index.php/Xb … me_control

My config in my .xbindkeysrc looks like this:

#VolUp
"amixer set Master 5%+"
    m:0x0 + c:123
    XF86AudioRaiseVolume 

#VolDown
"amixer set Master 5%-"
    m:0x0 + c:122
    XF86AudioLowerVolume 

I obtained the value for these keys by running the command,

xbindkeys -k

And lifting the codes from there. I have also verified that the amixer command works fine when run on the CLI.

Finally I have called

xbindkeys & 

In my .xinitrc file and restarted x but the keys do not work.

At the bottom of the linked article, in the event that a binding doesn't work it suggests running

xbindkeys -n

and that "by pressing the non-working key, you will be able to see any error xbindkeys encounter (e.g: mistyped command/keycode,...)."

I see no such errors or in fact any indication that the key press has registered at all.

I'm not sure what I'm doing wrong here. Can anyone shine some light on this?

Thanks

Offline

#2 2016-09-15 10:57:18

Markus00000
Member
Registered: 2011-03-27
Posts: 318

Re: xbindkeys' binding for multimedia keys not working

Are you sure you do not have to use "Mod2 + XF86AudioLowerVolume"?

I think you can remove the keycode as well:

"amixer set Master 5%-"
    Mod2 + XF86AudioLowerVolume

To save you from restarting X:

killall xbindkeys && xbindkeys & disown

Offline

#3 2016-09-15 11:07:23

Parma
Member
Registered: 2016-09-10
Posts: 9

Re: xbindkeys' binding for multimedia keys not working

Markus00000 wrote:

Are you sure you do not have to use "Mod2 + XF86AudioLowerVolume"?

I think you can remove the keycode as well:

"amixer set Master 5%-"
    Mod2 + XF86AudioLowerVolume

To save you from restarting X:

killall xbindkeys && xbindkeys & disown

Hi thanks for your response.

I gave it a try and still no luck. I also tried it with just

"amixer set Master 5%-"
    XF86AudioLowerVolume

to no success either.

Offline

#4 2016-09-15 11:24:21

Markus00000
Member
Registered: 2011-03-27
Posts: 318

Re: xbindkeys' binding for multimedia keys not working

Sidenote: I misread your keycode. It looked similar to mine (m:0x10 + c:122) which requires Mod2.

Parma wrote:

I see no such errors or in fact any indication that the key press has registered at all.

Does the key press only fail to register in "xbindkeys -n" or in "xbindkeys -k" as well?

If it fails, then binding it will probably not help. You would rather have to get the key working first.

Also, if it does not register, where did you get the keycodes from?

Offline

#5 2016-09-15 11:50:00

Parma
Member
Registered: 2016-09-10
Posts: 9

Re: xbindkeys' binding for multimedia keys not working

Markus00000 wrote:

Does the key press only fail to register in "xbindkeys -n" or in "xbindkeys -k" as well?

It only fails in xbindkeys -n and I have to kill it to exit the process. xbindkeys -k works fine, it will pick up and print out my keystroke then exit.

Offline

#6 2016-09-15 12:04:15

Markus00000
Member
Registered: 2011-03-27
Posts: 318

Re: xbindkeys' binding for multimedia keys not working

Sidenote: Mod2 is numlock… So that was irrelevant.

What is your window manager or desktop environment? Might it interfere with some bindings? Have you got any working bindings from xbindkeys?

Offline

#7 2016-09-15 12:45:51

Parma
Member
Registered: 2016-09-10
Posts: 9

Re: xbindkeys' binding for multimedia keys not working

Markus00000 wrote:

Sidenote: Mod2 is numlock… So that was irrelevant.

Okay gotcha. My numlock is bound to fn + scroll lock. It works out of the box.

Markus00000 wrote:

What is your window manager or desktop environment? Might it interfere with some bindings? Have you got any working bindings from xbindkeys?

I'm using openbox, no DE, so I don't imagine it would. I say this with relative ignorance however.

As for other bindings, this was my first attempt to play with xbindkeys at all.

I tried a couple of other bindings for the mute function there now.


Mute media key XF86AudioMute - Didn't work. No response

F1 - Didn't work, got error: This function is not supported here

Ctrl + shift + m  - Didn't work. No response.

Offline

#8 2016-09-15 12:59:46

Markus00000
Member
Registered: 2011-03-27
Posts: 318

Re: xbindkeys' binding for multimedia keys not working

Maybe kill xbindkeys for the moment and see if you can bind the keys in "$HOME/.config/openbox/rc.xml". I do not use Openbox but this should work:

    <keybind key="XF86AudioLowerVolume">
      <action name="Execute">
        <command>amixer set Master 5%-</command>
      </action>
    </keybind>
    <keybind key="XF86AudioRaiseVolume">
      <action name="Execute">
        <command>amixer set Master 5%+</command>
      </action>
    </keybind>

Offline

#9 2016-09-15 13:15:11

Parma
Member
Registered: 2016-09-10
Posts: 9

Re: xbindkeys' binding for multimedia keys not working

Markus00000 wrote:

Maybe kill xbindkeys for the moment and see if you can bind the keys in "$HOME/.config/openbox/rc.xml". I do not use Openbox but this should work:

    <keybind key="XF86AudioLowerVolume">
      <action name="Execute">
        <command>amixer set Master 5%-</command>
      </action>
    </keybind>
    <keybind key="XF86AudioRaiseVolume">
      <action name="Execute">
        <command>amixer set Master 5%+</command>
      </action>
    </keybind>

This worked great! Thanks for your help.

I will tentatively keep this marked as unresolved for now and monitor the thread in case any one else helps to reach a solution for xbindkeys specifically for future reference. Ta!

Offline

#10 2016-09-15 13:20:31

Markus00000
Member
Registered: 2011-03-27
Posts: 318

Re: xbindkeys' binding for multimedia keys not working

Does it work if you move "xbindkeys &" from ".xinitrc" to "~/.config/openbox/autostart"?

Offline

#11 2016-09-15 13:39:08

Parma
Member
Registered: 2016-09-10
Posts: 9

Re: xbindkeys' binding for multimedia keys not working

No luck on that front unfortunately, result is the same. I guess it must be some problem with xbindkeys itself.

Offline

Board footer

Powered by FluxBB