I can assign Alt + F1 and Alt + F2 to any function I like in the keyboard configuration window, but it's not being used.
Alt + F1 is always 'dash home' and Alt + F2 is always 'run'.
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.
Sign up to join this communityI sat with the same issue after upgrading to Ubuntu 12.04 (Precise Pangolin) and installing GNOME Shell. I tried to disable Alt + F1 from wherever I could, to no avail.
As I was about to give up, I found this gist: https://gist.github.com/2402448
gsettings set org.gnome.desktop.wm.keybindings panel-main-menu "[]" # disable Alt+F1
Credits go to Jan Musinsky.
for k in `gsettings list-keys org.gnome.desktop.wm.keybindings`; do echo $k = `gsettings get org.gnome.desktop.wm.keybindings $k`; done
May 23, 2012 at 15:03
Super
+S
also, which is default in Ubuntu 14.04, so be careful.
With the Ubuntu Unity plugin installed, the musinsky gist snippet in the terminal wasn't enough.
Disable it using CompizConfig Settings Manager:
sudo apt-get install compizconfig-settings-manager
sudo apt-get install compiz-plugins-extra
ccsm
In section "Desktop" (third item on the left), click on "Ubuntu Unity Plugin". In tab "General" (the default), click the edit pencil for "Key to execute a command" (the fourth item), blank out (delete) the content, and press OK.
Although johanmynhardt gave us the right answer for the Alt + F1, he did not tell us what it was for Alt + F2. With the for
loop as shown by Jesse Glick in a comment, I figured out the Alt + F2 command. Like this to remove both keys:
gsettings set org.gnome.desktop.wm.keybindings panel-main-menu "[]" # Disable Alt + F1
gsettings set org.gnome.desktop.wm.keybindings panel-run-dialog "[]" # Disable Alt + F2
The way to find the valid keys (panel-main-menu
an panel-run-dialog
in the above examples) is to use the list-keys
command line option of gsettings
. Be ready to get a pretty long list.
The following are all the system defined keybindings for 20.04:
switch-group
begin-resize
switch-to-workspace-7
begin-move
move-to-side-w
move-to-corner-nw
move-to-workspace-10
move-to-workspace-6
move-to-workspace-right
always-on-top
toggle-maximized
move-to-workspace-left
switch-to-workspace-8
cycle-panels
move-to-workspace-11
lower
move-to-workspace-7
toggle-above
move-to-workspace-down
switch-panels
minimize
cycle-windows
switch-to-workspace-9
move-to-workspace-12
toggle-on-all-workspaces
switch-input-source
move-to-workspace-8
move-to-side-n
maximize-horizontally
activate-window-menu
set-spew-mark
switch-windows-backward
maximize-vertically
move-to-corner-sw
move-to-workspace-9
maximize
panel-main-menu
close
move-to-monitor-up
raise-or-lower
move-to-side-e
cycle-windows-backward
switch-to-workspace-1
move-to-monitor-right
switch-windows
panel-run-dialog
switch-panels-backward
unmaximize
switch-to-workspace-2
switch-applications
switch-to-workspace-last
move-to-workspace-1
move-to-corner-ne
switch-to-workspace-3
switch-to-workspace-up
move-to-side-s
show-desktop
move-to-center
move-to-workspace-2
switch-to-workspace-left
switch-to-workspace-right
raise
move-to-corner-se
switch-to-workspace-10
switch-to-workspace-4
toggle-shaded
cycle-group-backward
move-to-workspace-3
switch-to-workspace-down
cycle-panels-backward
move-to-monitor-left
switch-applications-backward
switch-to-workspace-11
switch-input-source-backward
switch-to-workspace-5
move-to-workspace-4
move-to-monitor-down
toggle-fullscreen
switch-to-workspace-6
switch-to-workspace-12
cycle-group
move-to-workspace-up
move-to-workspace-last
switch-group-backward
move-to-workspace-5
I still see a panel-run-dialog
entry, I tested on my install and it worked as expected. After I ran the set
command shown above, the Alt + F2 stopped working...
On Ubuntu 16.04 you can do it using the following command:
gsettings set org.compiz.unityshell:/org/compiz/profiles/unity/plugins/unityshell/ keyboard-focus ''
To disable Alt+F2:
Press Alt + F2
Type: gsettings set org.gnome.desktop.wm.keybindings panel-run-dialog "[]"
Instead of using gsettings
, we can use UI: dconf-editor
The shortcuts are stored in /org/gnome/desktop/wm/keybindings/
path
Note how for /org/gnome/desktop/wm/keybindings/panel-main-menu
it says
DEPRECATED: This key is deprecated and ignored.
Indeed clearing Alt+F1 using either gsettings set org.gnome.desktop.wm.keybindings panel-main-menu "[]"
or by editing /org/gnome/desktop/wm/keybindings/panel-main-menu
in dconf-editor
no longer works.
The setting now lives in /org/gnome/shell/extensions/apps-menu/apps-menu-toggle-menu
in dconf-editor
, changing it there to []
fixed it for me:
Or you can disable it using gsettings
:
gsettings set org.gnome.shell.extensions.apps-menu apps-menu-toggle-menu "[]"