133

How can I turn off the F1 (help) and F10 (notifications menu) key bindings?

First one I need for screen utility and second to exit mc in console.

There are no such key bindings in the Keyboard Shortcuts system settings.

sotirov
  • 3,169
Marko Kevac
  • 1,411
  • Even when they added the Disable Menu Accelerator (F10) option in Gnome-Terminal 3.30.2 (Debian 11, LXDE), this question still stands. It's a real problem. and a tough one to solve. – John Greene Apr 09 '20 at 16:13
  • gsettings set org.gnome.Terminal.Legacy.Settings menu-accelerator-enabled false – unxed Mar 13 '24 at 22:10

16 Answers16

118

11.04

Disabling the F1 shortcut

  1. In a gnome-terminal open up Edit ➜ Keyboard Shortcuts.

  2. Scroll down to the Help/Contents shortcut, click where it says "F1" and hit Backspace:

    enter image description here

Disabling the F10 shortcut

  1. Install the compizconfig-settings-managerInstall compizconfig-settings-manager package.

  2. Open up CompizConfig Settings Manager.

    • Hit Super to open the Dash, type "Compiz" and hit Enter.
  3. Type "unity" in the Filter entry and select the Ubuntu Unity Plugin.

  4. Click the button to the right of Key to open the first panel menu and uncheck the Enabled checkbox.

    enter image description here

  5. That disabled the global F10 shortcut, now disable gnome-terminal's F10 shortcut:

    • In a gnome-terminal open up Keyboards Shortcuts (Edit ➜ Keyboard Shortcuts) and
      uncheck Enable the menu shortcut key (F10 by default)

      enter image description here

  6. F10 is mapped to menubar_accel by something in Ubuntu. Gnome? Metacity? Not sure what exact thing it is that steals it, but the key doesn't make it to Eclipse.

    • Run gconf-editor, browse to /desktop/gnome/interface then scroll down to menubar_accel and delete the F10 value. [Stolen from here]
Isaiah
  • 59,344
  • How do you "Edit ➜ Keyboard Shortcuts" in a terminal window? First line. – jcollum Feb 13 '12 at 19:01
  • Ah, ok, it's "open the Edit menu, the select Keyboard Shortcuts". I forgot that terminals have menu bars. Was thinking I should be typing that :) – jcollum Feb 13 '12 at 19:13
  • 7
    Doing everything above does not solve the F10 key in 12.04. It is still bound somewhere to mouse right click. – Paweł Gościcki Apr 30 '12 at 18:18
  • 1
    Anyone how to disable F1 Help in Ubuntu 14.04? The Help row has disappeared, it seems. I am very close in getting back to ctwm. – towi Apr 22 '14 at 19:56
  • @towi In that dialog box, you need to click on the Help line first. The key setting should change from F1 to "New accelerator...". If you click it again, it will change to "Disabled". – user100464 May 08 '14 at 13:44
  • Thanks, the gnome-terminal hint was helping in Debian Jessie too. (Didn't find it in the keyboard shortcuts / Tastenkürzel section, it is in General / Allgemein) – PythoNic May 31 '16 at 17:38
  • The F10 menu button setting is on the general tab in gnome-terminal 3.18.3, not the shortcuts one. – Calmarius Aug 23 '17 at 14:32
  • Still works in 16.04. – Lucas Oct 10 '17 at 00:51
  • Gnome-terminal 3.30.2 (Debian 11) no longer has key shortcut mapping menu. Still have problem getting Vim application to receive F10 (or F1). – John Greene Apr 09 '20 at 15:52
45

Disable F10 in gnome-terminal in 12.04

Type this in the console:

mkdir -p ~/.config/gtk-3.0
cat<<EOF > ~/.config/gtk-3.0/gtk.css

@binding-set NoKeyboardNavigation {
     unbind "<shift>F10"
}

* {
     gtk-key-bindings: NoKeyboardNavigation
}

EOF

Then close all terminal sessions. Now it should work as it should (in mc for example).

23

start gconf-editor and follow /apps/gnome-terminal/keybindings/help

enter image description here

Description:

"Keyboard shortcut key for launching help. Expressed as a string in the same format used for GTK+ resource files. If you set the option to the special string "disabled", then there will be no keyboard shortcut for this action."

Rinzwind
  • 299,756
  • alas, that changes nothing. I keep getting the Help screen when hitting F1. Ubuntu 14.04 Desktop, Unity. – towi Apr 22 '14 at 19:54
  • Note that you need to set it to disabled not just clear it. I almost read over that. – Luc Nov 28 '14 at 19:24
  • Can also be done without GUI using: gconftool-2 -s /apps/gnome-terminal/keybindings/help "disabled" --type string – Ddorda Jul 15 '16 at 14:53
12

I am new to Linux and this F10 key drives me crazy. All above tricks didn't work, but I found now a solution (for Ubuntu 11.10 with Gnome 3 classic desktop). In a terminal, enter the following command:

gsettings set org.gnome.desktop.interface menubar-accel ""

With dconf-editor it can be found that the F10 is really gone. Note that these kind of tricks seem to be highly Gnome / Ubuntu version dependent.

jokerdino
  • 41,320
gast128
  • 121
4

Ubuntu 22.04 - Disable F10 in GNOME Terminal

  1. Disable it with a command:

    gsettings set org.gnome.Terminal.Legacy.Settings menu-accelerator-enabled false
    
  2. Disable if from Settings:

    Open GNOME Terminal → Settings (the hamburger button) → PreferencesGeneral and uncheck Enable the menu accelerator key (F10 by default).

    GNOME Terminal Preferences menu

sotirov
  • 3,169
4

For exiting mc (with F10 key). Disable "Key to open the first panel menu" in unity compiz plugin (ccsm)

kholis
  • 723
4

@kholis is correct for disabling F10 in Unity, but if you're a newb like me, you need a little more information to make this work.

If not already installed, install compizconfig-settings-manager:

sudo apt-get install compizconfig-settings-manager

Start the newly installed settings manager, and filter for "unity"

Edit "Key to open the first panel menu" to disable it or change it to another key.

I have not yet found a way to change F1.

3

The instruction at http://ubuntuforums.org/showthread.php?t=1317325 (quoted below) also works in Ubuntu 11.04. (It seems to disable F1 both in the desktop and in the terminal. That is, F1 does not send an ansi sequence to the shell in the terminal, if that is what OP wanted.)

  1. Go to System - Preferences - Keyboard Shortcuts
  2. Create a new shortcut. Name it 'do nothing', and write 'false' (without quotes) in the "command" field. Push ok.
  3. Scroll to the bottom of the list and find your new command. Click on the "Disabled", on the right, and push F1.
3

You can easily disable it using CCSM ( Click to install if you don't have it installed).

Then Go to Desktop --> Ubuntu Unity Plugin --> Key to open the first panel menu and disable it, or change it to another keyboard shortcut.

enter image description here

Note: it seems that this method does not work in Unity2D.

Binarylife
  • 16,442
2

This is a tip for Thnkpad users, especially T60. Remap the F1 key to escape. This eliminates the annoying popup of terminal help when you hit F1. You often do this becasue of the funny placement of ESC on T60s.

1

12.04

F1 doesn't appear to do anything out of the box on 12.04
F10 appears to simulate a right mouse click
So in response to the specifics of the question, there's no need to disable help and notifications.

You can still map them to something else like this:
Mapping hot-keys in 12.04 is simply accomplished through the Keyboard widget.

In the Unity launcher find keyboard.
select keyboard
In the window that opens select the shortcuts tab and custom shortcuts.
Click the plus to add a new shortcut.
plus
Name it to whatever matches the functionality you're assigning it.
Enter the command you want it to run in command.
apply
At the right side of the window click where it says disabled. This should toggle to New Accelerator.
disabled
Now just hit F10.
The Custom Shortcuts accelerator you defined overrides the Right-click simulation behavior. You could set this the command to echo 'nope' > /dev/null if you just want your F10 to do nothing.

RobotHumans
  • 29,530
1

12.04 Without Unity - Disable F1 and F11 Behaviour

I have installed Ubuntu 12.04/64 and have completely removed Unity from it following these directions.. Many of the tools that modify the behaviour of Unity, therefore, don't work. In particular CCSM no longer "sees" the keyboard shortcuts.

I found that the method using Edit->Keyboard Shortcuts in the terminal window also didn't work. After a bit of playing around I found that looking farther down the Keyboard Shortcuts window in the Shortcut Keys section, F1 and F11 were still defined to their respective shortcuts.

To fix this,

  1. Click on the "F11" in the right hand field of the line that defines F11 as Fullscreen. The text will change to "New Accelerator...".

  2. Type some other, less objectionable, key sequence (like alt-F11) and that key combo will replace the shortcut. If someone knows how to type "nothing" please let us know.

  3. Repeat for the F1 key.

1

If you only want to change this in Gnome Terminal you can click Edit>Keyboard Shortcuts in the Terminal.

Jeremy Bicha
  • 8,234
1

I recommend using F1 as a shortcut for something else. I run Tilda, a quake-style command line terminal, and the default shortcut is F1. It overrides Help, so I never have Help launching when I hit F1. Even if you don't like Tilda much, hitting F1 again to hide it is much less tedious than closing Help after accidentally launching it.

titaniumtux
  • 1,094
0

This is what worked for me on Xfce...

Desktop -> Open Terminal Here -> Edit -> Preferences -> Advanced

Shortcuts

Select 'Disable menu shortcut key (F10)' Select 'Disable help window shortcut key (F1)'

Found here https://forums.freebsd.org/threads/f1-f10-in-midnight-commander.63490/

Kickaha
  • 159
0

Ctrl+F1 doesn't work either. The solution is the same as for Shift+F10. Don't forget the semicolon as separator!

Place this in ~/.config/gtk-3.0/gtk.css:

@binding-set NoKeyboardNavigation {
     unbind "<shift>F10";
     unbind "<control>F1";
}
  • { gtk-key-bindings: NoKeyboardNavigation;

}

sotirov
  • 3,169
egmont
  • 101
  • 1
  • 2