4

Is there a way to set a secondary keyboard shortcut for a certain action (say, "Volume up")?

2
  • Can you specify version of Ubuntu and type of session (unity, gnome-shell, gnome classic/fallback)?
    – enzotib
    Jan 4, 2012 at 21:37
  • Using Gnome 3 fallback, but I guess other people would find useful other variants as well. Jan 5, 2012 at 20:20

1 Answer 1

8
+100

You can do that with xdotool. Just create a new shortcut with the command
xdotool key --clearmodifiers XF86AudioRaiseVolume to raise or
xdotool key --clearmodifiers XF86AudioLowerVolume to lower.

Step by step instructions:
1) Install xdotool.
2) Open the shortcut manager (on 11.10 and later: Alt + F2 and paste gnome-control-center keyboard)
3) Choose the tab "Shortcuts"
4) Choose "Custom Shortcuts"
5) Click on "+" like in this picture:

enter image description here

6) At "Name:" paste vol.
7) At "Command:" paste xdotool key --clearmodifiers XF86AudioLowerVolume:

enter image description here

8) Close the dialog.
9) Click at "Disabled" and make your shortcut.

enter image description here

10) Enjoy ;-)

2
  • Thanks, this workaround works. Does this mean there is no support for secondary combinations in Gnome? BTW, funny thing, there is no notification sound when changing volume using this method (and using standard volume keys result causes it). Jan 5, 2012 at 20:29
  • That is funny because I got the notification. I don't know for sure (because I'm often surprised by someone), but I couldn't find any support for secondary combinations in Gnome. Best regards.
    – desgua
    Jan 5, 2012 at 22:20

You must log in to answer this question.

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