I can assign Alt+F1 and Alt+F2 to any function I like in the keyboard configuration window, but its not beeing used. Alt+F1 is always 'dash home' and Alt+F2 is always 'run'


I sat with the same issue after upgrading to 12.04 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 to https://gist.github.com/musinsky

  • 3
    Indeed works for Alt-F1. I found the following way to list built-in keybindings: for k in `gsettings list-keys org.gnome.desktop.wm.keybindings`; do echo $k = `gsettings get org.gnome.desktop.wm.keybindings $k`; done – Jesse Glick May 23 '12 at 15:03
  • Worked for me on Ubuntu 13.04 – ehsanullahjan May 17 '13 at 14:22
  • This script shows <Alt>F2 but it doesn't show <Alt>F1. – Dean Schulze Jan 20 '15 at 4:43
  • gsettings set org.gnome.desktop.wm.keybindings panel-main-menu "[]" will clear Super+S also, which is default in Ubuntu 14.04, so be careful. – skyreua Jul 8 '16 at 10:14
  • On 16.04 this is not enough. Solution by @andersoyvind works ok. – Vladislav Rastrusny Oct 17 '17 at 12:10

With ubuntu unity plugin installed, the musinsky gist snippet in terminal wasn't enough.

Disabling using compizconfig-settings-manager:

sudo apt-get install compizconfig-settings-manager
sudo apt-get install compiz-plugins-extra
ubuntu unity plugin

general tab

  • Key to show the HUD - disable
  • Key to execute a command - disable

launcher tab

  • Key to give keyboard focus to Launcher - disable
  • 1
    After using johanmynhard's method, this one did the trick. – nana Sep 10 '13 at 11:02
  • This worked for me – kza Dec 3 '14 at 15:21
  • 2
    Works for Ubuntu 16.04 – Timofey Gorshkov Dec 2 '16 at 10:37
  • 1
    It's worth noting that the "Unity Plugin" is in the desktop section of the CCSM utility. (true as of 8/2017) – Ryan J Aug 10 '17 at 2:05

Although johanmynhardt gave us the right answer for the Alt-F1 he did not tell us what it is for Alt-F2. With the for loop as shown by Jesse Glick, 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
  • 1
    Please edit their answer to fix the that. – fosslinux Aug 2 '16 at 3:14

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 ''

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.