Is it possible to access the aggregate menu, or system menu, located in the top right corner on the activities bar of the GNOME shell interface, with a keyboard shortcut? If not, can such a shortcut be created?
keyboard-shortcuts – Access GNOME Shell Aggregate Menu via Keyboard
gnome-shellgnome3keyboard shortcuts
Related Solutions
Use xmodmap -pm
to verify that both keys have the mod4
modifier associated with them.
vikktakkht:686 Z$ xmodmap -pm
xmodmap: up to 4 keys per modifier, (keycodes in parentheses):
shift Shift_L (0x32), Shift_R (0x3e)
lock Caps_Lock (0x42)
control Control_L (0x25), Control_R (0x69)
mod1 Alt_L (0x40), Alt_R (0x6c), Meta_L (0xcd)
mod2 Num_Lock (0x4d)
mod3
mod4 Super_L (0x85), Super_R (0x86), Super_L (0xce), Hyper_L (0xcf)
mod5 ISO_Level3_Shift (0x5c), Mode_switch (0xcb)
Note that it's not enough that it's named Super_L
or Super_R
; it's the modifier mapping that matters.
You can use xmodmap
to associate keysyms with modifiers, but if your system is at all modern (and not OS X) then it uses Xkb and you probably want to examine your Xkb configuration instead of trying to change it with xmodmap
. (Look at setxkbmap
and friends, although probably there is a GNOME 3 interface to it that you should use.)
Gnome 3 uses DCONF
to store the preferences in a single binary file: ~/.config/dconf/user
.
As per the Gnome docs, it is recommended to save only the settings that you need and restore them with either dconf
or gsettings
. However, gsettings
is only able to restore the value(s) for one single key at a time (plus, the value must be quoted) and that makes it a bit awkward for this kind of task. Which leaves us with dconf
.
So, in this particular case, save the current settings for gnome-shell
keyboard shortcuts1:
dconf dump /org/gnome/shell/keybindings/ > bkp
Here's a bkp
sample:
[/]
toggle-message-tray=['<Super>m']
open-application-menu=['<Super>F1']
toggle-application-view=['<Control>F1']
focus-active-notification=['<Super>n']
toggle-recording=['<Control><Shift><Alt>r']
Load the settings on another system:
dconf load /org/gnome/shell/keybindings/ < bkp
1: WM and Media Keys shortcuts belong to different schemas:
/org/gnome/desktop/wm/keybindings/
/org/gnome/mutter/keybindings/
/org/gnome/mutter/wayland/keybindings/
/org/gnome/settings-daemon/plugins/media-keys/
Note that dconf
only dumps non-default values so if you run e.g.
dconf dump /org/gnome/desktop/wm/keybindings/
and don't get any output that means there's no custom WM shortcut defined.
As a side note, dconf-editor
is a tool that helps visualizing dconf
settings structure, i.e. schema [:path] key value
, the type and the default values of any key etc.
For the record, saving the preferences with gsettings
:
gsettings list-recursively org.gnome.shell.keybindings > bkp
bkp
sample:
org.gnome.shell.keybindings focus-active-notification ['<Super>n']
org.gnome.shell.keybindings open-application-menu ['<Super>F1']
org.gnome.shell.keybindings toggle-application-view ['<Super>a']
org.gnome.shell.keybindings toggle-message-tray ['<Super>m']
org.gnome.shell.keybindings toggle-recording ['<Control><Shift><Alt>r']
Now loading the preferences (as I said, for each line in the backup file you need a separate command and don't forget to quote the values):
gsettings set org.gnome.shell.keybindings focus-active-notification "['<Super>n']"
gsettings set org.gnome.shell.keybindings open-application-menu "['<Super>F1']"
gsettings set org.gnome.shell.keybindings toggle-application-view "['<Super>a']"
gsettings set org.gnome.shell.keybindings toggle-message-tray "['<Super>m']"
gsettings set org.gnome.shell.keybindings toggle-recording "['<Control><Shift><Alt>r']"
Best Answer
As far as I know there's no dedicated shortcut for the aggregate menu. You could use the
ctrlalttab.js
helper (also known as the accessibility switcher). Hit Ctrl+Alt+Tab:and select Top Bar, this will focus the first element on the top bar (that is, the Activities button). You then navigate with right arrow to the system tray and use the down arrow to open the menu...
Not very convenient, I know, so here's a way to define a dedicated shortcut for the system menu:
You can invoke
gnome-shell
evaluator viadbus
and call theopen()
ortoggle()
methods on that particular shell element:or
So, it's only a matter of going to Settings > Keyboard > Shortcuts and assign a shortcut to one of the above commands.