Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a keyboard with no specially designed keys, so I was thinking I'd put in windows+up/down for controlling the master volume.

How would I do this?

share|improve this question
I actually found this really easysolution. – user1068446 Nov 15 '12 at 5:31
You didn't specify a linux up front, some have that built in. If you decide you need a more advanced distro at some point, xbindkeys has a gui too. I just don't use those much. Glad you're squared away. – nerdwaller Nov 15 '12 at 7:41
up vote 2 down vote accepted

An easy way is installing xbindkeys.

To set it up, once installed you need to set the ~/.xbindkeysrc file to tell it your commands. (You can copy over their defaults, but in my opinion they are awful - one example being Ctrl+F does not FIND anymore. If you want the defaults, just type xbindkeys and it will instruct you how to get them).

So instead, I would suggest you make your own with vim or gedit or whatever you prefer with the layout of:

vim ~/.xbindkeysrc

"command to run"
(tab) keycommand

(the tab is a real tab, not the word+perens "(tab)")

To get the key code, run (in the terminal) $ xbindkeys -k, that will pop up a dialog to tell you it's ready, hit your key codes and it will spit out the "command to run" (if it is bound to anyting) and then the keys (like Super_L+). That will be all the info needed for you to set up .xbindkeysrc.

For example, here is how mine looks (picture the non quoted lines as tabbed in):

"amixer set Master 5%+"
"amixer set Master 5%-"
"amixer set Master toggle"
"gnome-screensaver-command -l"
"banshee --next"
"banshee --restart-or-prev"
"banshee --toggle-playing"

Last thing you need to do is set xbindkeys to run at login. For Gnome/Mate/Cinnamon hit Alt+F2 and then type gnome-session-properties, click Add+ and for the command it's xbindkeys. The other two items are up to whatever you want.

share|improve this answer
I do like your answer. It's good an informative. – user1068446 Nov 15 '12 at 8:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .