I would like to set multiple keyboard shortcuts doing the same thing. My particular example is Volume Up/Down, I would like to retain the standard settings I have (Sound/VolumeUp - XF86AudioRaiseVolume, my laptop dedicated button) and I would like to add a second set (Tux+Up). How can I do that? Thanks a lot.
-
Does [this](http://unix.stackexchange.com/a/91433/22222) help? – terdon Mar 10 '14 at 19:32
2 Answers
In Gnome just go to Settings->Keyboard and click the Shortcuts tab.
You can redefine your 'Sound and Media' shortcuts and you can define custom shortcuts to execute special commands. As long you not use the same shortcut more than once, but in this case you'll get a warning message.
-
Thanks a lot, that's probably what I need. However, I have another problem there now. I created a custom shortcut: amixer -q set Master 2+; amixer | head -5 | tail -1 | sed 's/ Mono: //' | osd_cat -p middle -A center -c green -d 3 -f '-adobe-helvetica-bold-r-normal-*-50-*' but it doesn't seem to work. I wanted originally to have
+Up there, but it didn't work. I thought that it might be some problem with – BIOStheZerg Mar 13 '14 at 20:37(Win/Tux key), but it works with spacebar (my standard shortcut for opening a terminal) and doesn't work with other shortcuts (without ) either... Any idea what it could be? -
So, in the end, I solved it myself, by putting both the commands in a script with & (not to wait for them to finish) and setting the shortcut to run the scripts... – BIOStheZerg Mar 13 '14 at 20:50
-
I know this is a late answer, but I was having a similar issue and found a solution that should also work for your case (or anyone else brought here by Google as I was).
To map additional keyboard shortcuts to common media controls, you can install playerctl, and map additional shortcuts to use it.
OSTechNix has an article I found very useful in explaining how to use playerctl. In my case, I wanted another shortcut for Play/Pause to use on my work keyboard, without interfering with the media controllers on my home keyboard. So I mapped the additional shortcut to playerctl play-pause.
Check out playerctl's man page for information on it's volume functionality. I'd post more on that, but it doesn't seem to be compatible with my configuration.
- 1
- 1