Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

GNOME makes multimedia keys, such as fn+directional keys on my laptop, maybe dedicated keys on your keyboard, into very useful keys. They seem to work with a large number of application. What can I do to recreate this using something like xbindkeys?

share|improve this question
    
Many display managers have their own key bindings, what DM are you using? –  Kevin Jan 22 '12 at 6:39
    
I'm using awesome which is pretty minimal out of the box. –  rob.g.greer Jan 22 '12 at 14:13
add comment

1 Answer

Once xbindkeys is installed, open up a terminal and type xbindkeys -k. This should open a white window (don't bother with it). Just press the button you want to create a rule for on your keyboard.

Below, I pressed the 'Volume Up' button on my keyboard

max@max-desktop:/dev> xbindkeys -k
Press combination of keys or/and click under the window.
You can use one of the two lines after "NoCommand"
in $HOME/.xbindkeysrc to bind a key.
"(Scheme function)"
    m:0x10 + c:123
    Mod2 + XF86AudioRaiseVolume
max@max-desktop:/dev> 

Now take the key definition:

"(Scheme function)"
    m:0x10 + c:123
    Mod2 + XF86AudioRaiseVolume

and place it in ~/.xbindkeysrc. Then change the ("Scheme function") part to whatever command you want to be run.

For example, this would laumch VLC when I pressed the Volume Up button:

"vlc"
    m:0x10 + c:123
    Mod2 + XF86AudioRaiseVolume
share|improve this answer
    
FYI, Mod2 probably just means you have numlock on. –  derobert May 9 '13 at 16:52
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.