You are not logged in.
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
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
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
Sidenote: I misread your keycode. It looked similar to mine (m:0x10 + c:122) which requires Mod2.
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
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
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
Sidenote: Mod2 is numlock… So that was irrelevant.
Okay gotcha. My numlock is bound to fn + scroll lock. It works out of the box.
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
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
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
Does it work if you move "xbindkeys &" from ".xinitrc" to "~/.config/openbox/autostart"?
Offline
No luck on that front unfortunately, result is the same. I guess it must be some problem with xbindkeys itself.
Offline