Assign multiple keyboard shortcuts for one action
up vote
12
down vote
favorite
I've been wondering how can I assign to multiple keyboard shortcuts to do the same action?
More specifically, I want to be able to change my volume with both my headset buttons and my keyboard.
I'm able to change the volume with just one at the time: with the one I define in the 'Keyboard shortcuts' application.
Is there any way?
keyboard shortcuts
add a comment |
up vote
12
down vote
favorite
I've been wondering how can I assign to multiple keyboard shortcuts to do the same action?
More specifically, I want to be able to change my volume with both my headset buttons and my keyboard.
I'm able to change the volume with just one at the time: with the one I define in the 'Keyboard shortcuts' application.
Is there any way?
keyboard shortcuts
Related: askubuntu.com/questions/292494/…
– AlikElzin-kilaka
Mar 20 at 8:42
add a comment |
up vote
12
down vote
favorite
up vote
12
down vote
favorite
I've been wondering how can I assign to multiple keyboard shortcuts to do the same action?
More specifically, I want to be able to change my volume with both my headset buttons and my keyboard.
I'm able to change the volume with just one at the time: with the one I define in the 'Keyboard shortcuts' application.
Is there any way?
keyboard shortcuts
I've been wondering how can I assign to multiple keyboard shortcuts to do the same action?
More specifically, I want to be able to change my volume with both my headset buttons and my keyboard.
I'm able to change the volume with just one at the time: with the one I define in the 'Keyboard shortcuts' application.
Is there any way?
keyboard shortcuts
keyboard shortcuts
edited Feb 29 '12 at 9:21
Bruno Pereira
59.2k26179205
59.2k26179205
asked Aug 30 '11 at 7:19
ksemeks
1715
1715
Related: askubuntu.com/questions/292494/…
– AlikElzin-kilaka
Mar 20 at 8:42
add a comment |
Related: askubuntu.com/questions/292494/…
– AlikElzin-kilaka
Mar 20 at 8:42
Related: askubuntu.com/questions/292494/…
– AlikElzin-kilaka
Mar 20 at 8:42
Related: askubuntu.com/questions/292494/…
– AlikElzin-kilaka
Mar 20 at 8:42
add a comment |
3 Answers
3
active
oldest
votes
up vote
4
down vote
I do just that with Custom Shortcuts:
I use xdotool key --clearmodifiers XF86AudioLowerVolume
(and XF86AudioRaiseVolume
) command instead of amixer set 'Master' 10%+
. The only difference/downside I notice is that even Repeat Keys on Typing tab is set this doesn't apply to this custom shortcut.
However, I wasn't able to do same things like use Fn+F7 to turn off my screen (xset dpms force standby
). It doesn't detect it as a shortcut event.
add a comment |
up vote
2
down vote
You could probably use xmodmap to reassign the buttons on your headset to the same as you use for your keyboard.
Yes, but now I need to know what is the default action of 'Audio raise/lower volume', from the Keyboard shortcuts application. Because, when I use my own command 'amixer channel set opt', it raises/lowers the MBO sound card, while I'm listening with my headset.
– ksemeks
Aug 30 '11 at 7:50
@ksemeks : the actions are :amixer set Master 10%+
to raise the volumeamixer set Master 10%-
to decrease the volume. To get the gauge notification, you could usenotify-send
, but I am not sure how to set the gauge
– danjjl
Aug 30 '11 at 9:05
@danjjl: well, that's why I'm trying to find the exact action of the Volume up/down, from Setting->Keyboard->Shortcuts
– ksemeks
Aug 30 '11 at 9:10
add a comment |
up vote
0
down vote
You can assign multiple keyboard shortcuts (keybindings) for the same command using gsettings
command line.
One important thing to know is that Ubuntu 18.04 Settings GUI only shows the first keybinding for a command, so if you have multiple keybindings for a command, the others won't appear in Settings. You can use gsettings
to all the keybindings.
Let's say I want to add another keybinding for "Switch to Workspace 1". The default for me was Super+Home
, but I want to add a second keybinding Ctrl+1
.
# list all keybindings
gsettings list-recursively | grep -e org.gnome.desktop.wm.keybindings -e org.gnome.settings-daemon.plugins.media-keys -e org.gnome.settings-daemon.plugins.power | sort
# confirm no other keybinding conflicts
gsettings list-recursively | grep '<Control>1'
# set multiple keybindings for "Switch to Workspace 1"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-1 "['<Super>Home', '<Control>1']"
# confirm value is set correctly
gsettings get org.gnome.desktop.wm.keybindings switch-to-workspace-1
Now you can use either Super+Home
or Control+1
to Switch to Workspace 1. Remember, you will only see the first one Super+Home
in the Settings GUI, but it will work!
add a comment |
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
4
down vote
I do just that with Custom Shortcuts:
I use xdotool key --clearmodifiers XF86AudioLowerVolume
(and XF86AudioRaiseVolume
) command instead of amixer set 'Master' 10%+
. The only difference/downside I notice is that even Repeat Keys on Typing tab is set this doesn't apply to this custom shortcut.
However, I wasn't able to do same things like use Fn+F7 to turn off my screen (xset dpms force standby
). It doesn't detect it as a shortcut event.
add a comment |
up vote
4
down vote
I do just that with Custom Shortcuts:
I use xdotool key --clearmodifiers XF86AudioLowerVolume
(and XF86AudioRaiseVolume
) command instead of amixer set 'Master' 10%+
. The only difference/downside I notice is that even Repeat Keys on Typing tab is set this doesn't apply to this custom shortcut.
However, I wasn't able to do same things like use Fn+F7 to turn off my screen (xset dpms force standby
). It doesn't detect it as a shortcut event.
add a comment |
up vote
4
down vote
up vote
4
down vote
I do just that with Custom Shortcuts:
I use xdotool key --clearmodifiers XF86AudioLowerVolume
(and XF86AudioRaiseVolume
) command instead of amixer set 'Master' 10%+
. The only difference/downside I notice is that even Repeat Keys on Typing tab is set this doesn't apply to this custom shortcut.
However, I wasn't able to do same things like use Fn+F7 to turn off my screen (xset dpms force standby
). It doesn't detect it as a shortcut event.
I do just that with Custom Shortcuts:
I use xdotool key --clearmodifiers XF86AudioLowerVolume
(and XF86AudioRaiseVolume
) command instead of amixer set 'Master' 10%+
. The only difference/downside I notice is that even Repeat Keys on Typing tab is set this doesn't apply to this custom shortcut.
However, I wasn't able to do same things like use Fn+F7 to turn off my screen (xset dpms force standby
). It doesn't detect it as a shortcut event.
edited Apr 19 at 17:44
answered Jan 17 '17 at 23:30
Pablo Bianchi
2,2431528
2,2431528
add a comment |
add a comment |
up vote
2
down vote
You could probably use xmodmap to reassign the buttons on your headset to the same as you use for your keyboard.
Yes, but now I need to know what is the default action of 'Audio raise/lower volume', from the Keyboard shortcuts application. Because, when I use my own command 'amixer channel set opt', it raises/lowers the MBO sound card, while I'm listening with my headset.
– ksemeks
Aug 30 '11 at 7:50
@ksemeks : the actions are :amixer set Master 10%+
to raise the volumeamixer set Master 10%-
to decrease the volume. To get the gauge notification, you could usenotify-send
, but I am not sure how to set the gauge
– danjjl
Aug 30 '11 at 9:05
@danjjl: well, that's why I'm trying to find the exact action of the Volume up/down, from Setting->Keyboard->Shortcuts
– ksemeks
Aug 30 '11 at 9:10
add a comment |
up vote
2
down vote
You could probably use xmodmap to reassign the buttons on your headset to the same as you use for your keyboard.
Yes, but now I need to know what is the default action of 'Audio raise/lower volume', from the Keyboard shortcuts application. Because, when I use my own command 'amixer channel set opt', it raises/lowers the MBO sound card, while I'm listening with my headset.
– ksemeks
Aug 30 '11 at 7:50
@ksemeks : the actions are :amixer set Master 10%+
to raise the volumeamixer set Master 10%-
to decrease the volume. To get the gauge notification, you could usenotify-send
, but I am not sure how to set the gauge
– danjjl
Aug 30 '11 at 9:05
@danjjl: well, that's why I'm trying to find the exact action of the Volume up/down, from Setting->Keyboard->Shortcuts
– ksemeks
Aug 30 '11 at 9:10
add a comment |
up vote
2
down vote
up vote
2
down vote
You could probably use xmodmap to reassign the buttons on your headset to the same as you use for your keyboard.
You could probably use xmodmap to reassign the buttons on your headset to the same as you use for your keyboard.
answered Aug 30 '11 at 7:29
Jo-Erlend Schinstad
26.3k556108
26.3k556108
Yes, but now I need to know what is the default action of 'Audio raise/lower volume', from the Keyboard shortcuts application. Because, when I use my own command 'amixer channel set opt', it raises/lowers the MBO sound card, while I'm listening with my headset.
– ksemeks
Aug 30 '11 at 7:50
@ksemeks : the actions are :amixer set Master 10%+
to raise the volumeamixer set Master 10%-
to decrease the volume. To get the gauge notification, you could usenotify-send
, but I am not sure how to set the gauge
– danjjl
Aug 30 '11 at 9:05
@danjjl: well, that's why I'm trying to find the exact action of the Volume up/down, from Setting->Keyboard->Shortcuts
– ksemeks
Aug 30 '11 at 9:10
add a comment |
Yes, but now I need to know what is the default action of 'Audio raise/lower volume', from the Keyboard shortcuts application. Because, when I use my own command 'amixer channel set opt', it raises/lowers the MBO sound card, while I'm listening with my headset.
– ksemeks
Aug 30 '11 at 7:50
@ksemeks : the actions are :amixer set Master 10%+
to raise the volumeamixer set Master 10%-
to decrease the volume. To get the gauge notification, you could usenotify-send
, but I am not sure how to set the gauge
– danjjl
Aug 30 '11 at 9:05
@danjjl: well, that's why I'm trying to find the exact action of the Volume up/down, from Setting->Keyboard->Shortcuts
– ksemeks
Aug 30 '11 at 9:10
Yes, but now I need to know what is the default action of 'Audio raise/lower volume', from the Keyboard shortcuts application. Because, when I use my own command 'amixer channel set opt', it raises/lowers the MBO sound card, while I'm listening with my headset.
– ksemeks
Aug 30 '11 at 7:50
Yes, but now I need to know what is the default action of 'Audio raise/lower volume', from the Keyboard shortcuts application. Because, when I use my own command 'amixer channel set opt', it raises/lowers the MBO sound card, while I'm listening with my headset.
– ksemeks
Aug 30 '11 at 7:50
@ksemeks : the actions are :
amixer set Master 10%+
to raise the volume amixer set Master 10%-
to decrease the volume. To get the gauge notification, you could use notify-send
, but I am not sure how to set the gauge– danjjl
Aug 30 '11 at 9:05
@ksemeks : the actions are :
amixer set Master 10%+
to raise the volume amixer set Master 10%-
to decrease the volume. To get the gauge notification, you could use notify-send
, but I am not sure how to set the gauge– danjjl
Aug 30 '11 at 9:05
@danjjl: well, that's why I'm trying to find the exact action of the Volume up/down, from Setting->Keyboard->Shortcuts
– ksemeks
Aug 30 '11 at 9:10
@danjjl: well, that's why I'm trying to find the exact action of the Volume up/down, from Setting->Keyboard->Shortcuts
– ksemeks
Aug 30 '11 at 9:10
add a comment |
up vote
0
down vote
You can assign multiple keyboard shortcuts (keybindings) for the same command using gsettings
command line.
One important thing to know is that Ubuntu 18.04 Settings GUI only shows the first keybinding for a command, so if you have multiple keybindings for a command, the others won't appear in Settings. You can use gsettings
to all the keybindings.
Let's say I want to add another keybinding for "Switch to Workspace 1". The default for me was Super+Home
, but I want to add a second keybinding Ctrl+1
.
# list all keybindings
gsettings list-recursively | grep -e org.gnome.desktop.wm.keybindings -e org.gnome.settings-daemon.plugins.media-keys -e org.gnome.settings-daemon.plugins.power | sort
# confirm no other keybinding conflicts
gsettings list-recursively | grep '<Control>1'
# set multiple keybindings for "Switch to Workspace 1"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-1 "['<Super>Home', '<Control>1']"
# confirm value is set correctly
gsettings get org.gnome.desktop.wm.keybindings switch-to-workspace-1
Now you can use either Super+Home
or Control+1
to Switch to Workspace 1. Remember, you will only see the first one Super+Home
in the Settings GUI, but it will work!
add a comment |
up vote
0
down vote
You can assign multiple keyboard shortcuts (keybindings) for the same command using gsettings
command line.
One important thing to know is that Ubuntu 18.04 Settings GUI only shows the first keybinding for a command, so if you have multiple keybindings for a command, the others won't appear in Settings. You can use gsettings
to all the keybindings.
Let's say I want to add another keybinding for "Switch to Workspace 1". The default for me was Super+Home
, but I want to add a second keybinding Ctrl+1
.
# list all keybindings
gsettings list-recursively | grep -e org.gnome.desktop.wm.keybindings -e org.gnome.settings-daemon.plugins.media-keys -e org.gnome.settings-daemon.plugins.power | sort
# confirm no other keybinding conflicts
gsettings list-recursively | grep '<Control>1'
# set multiple keybindings for "Switch to Workspace 1"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-1 "['<Super>Home', '<Control>1']"
# confirm value is set correctly
gsettings get org.gnome.desktop.wm.keybindings switch-to-workspace-1
Now you can use either Super+Home
or Control+1
to Switch to Workspace 1. Remember, you will only see the first one Super+Home
in the Settings GUI, but it will work!
add a comment |
up vote
0
down vote
up vote
0
down vote
You can assign multiple keyboard shortcuts (keybindings) for the same command using gsettings
command line.
One important thing to know is that Ubuntu 18.04 Settings GUI only shows the first keybinding for a command, so if you have multiple keybindings for a command, the others won't appear in Settings. You can use gsettings
to all the keybindings.
Let's say I want to add another keybinding for "Switch to Workspace 1". The default for me was Super+Home
, but I want to add a second keybinding Ctrl+1
.
# list all keybindings
gsettings list-recursively | grep -e org.gnome.desktop.wm.keybindings -e org.gnome.settings-daemon.plugins.media-keys -e org.gnome.settings-daemon.plugins.power | sort
# confirm no other keybinding conflicts
gsettings list-recursively | grep '<Control>1'
# set multiple keybindings for "Switch to Workspace 1"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-1 "['<Super>Home', '<Control>1']"
# confirm value is set correctly
gsettings get org.gnome.desktop.wm.keybindings switch-to-workspace-1
Now you can use either Super+Home
or Control+1
to Switch to Workspace 1. Remember, you will only see the first one Super+Home
in the Settings GUI, but it will work!
You can assign multiple keyboard shortcuts (keybindings) for the same command using gsettings
command line.
One important thing to know is that Ubuntu 18.04 Settings GUI only shows the first keybinding for a command, so if you have multiple keybindings for a command, the others won't appear in Settings. You can use gsettings
to all the keybindings.
Let's say I want to add another keybinding for "Switch to Workspace 1". The default for me was Super+Home
, but I want to add a second keybinding Ctrl+1
.
# list all keybindings
gsettings list-recursively | grep -e org.gnome.desktop.wm.keybindings -e org.gnome.settings-daemon.plugins.media-keys -e org.gnome.settings-daemon.plugins.power | sort
# confirm no other keybinding conflicts
gsettings list-recursively | grep '<Control>1'
# set multiple keybindings for "Switch to Workspace 1"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-1 "['<Super>Home', '<Control>1']"
# confirm value is set correctly
gsettings get org.gnome.desktop.wm.keybindings switch-to-workspace-1
Now you can use either Super+Home
or Control+1
to Switch to Workspace 1. Remember, you will only see the first one Super+Home
in the Settings GUI, but it will work!
answered Dec 4 at 21:36
wisbucky
73488
73488
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f59250%2fassign-multiple-keyboard-shortcuts-for-one-action%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Related: askubuntu.com/questions/292494/…
– AlikElzin-kilaka
Mar 20 at 8:42