20

I am running Fedora 17 gnome (shell) 3 and gnome terminal 3.4.1.1.

I am a user of both gnome-terminal and mc(Midnight Commander). As default gnome-terminal has always used F10 (which I need while using mc), to opening the top menu. So was this time. I was able to disable that behavior in the settings, as always.

Which is new to me, is that after I disabled the setting, it started opening the "right-click menu" at the mouse cursor when I press F10. The key goes to mc too, but it is annoying to have to always close the menu.

I assume it is caused by gnome terminal, as it does not happen in other apps. Is this a "feature" or bug, has anyone else encountered the same problem and how to fix it?

7 Answers 7

18

It's a feature. Go to Edit->Keyboard Shortcuts

And uncheck "Enable the menu shortcut key"

to turn it off.

5
  • " I disabled the setting, it started opening the 'right-click menu' at the mouse cursor when I press F10." It started opening a different menu after I unchecked that setting., which I had already done.
    – varesa
    Commented Jun 8, 2012 at 8:10
  • 1
    This setting disables the F10 shortcut for the Gnome Terminal menu, but it sounds like you have another shortcut defined somewhere else if you're still getting a right-click menu. I'm not that familiar with Fedora, but you should have a Keyboard Shortcuts or similar applet that may have something relevant.
    – Bill B
    Commented Jun 9, 2012 at 0:53
  • Thanks, I did not properly read this Q which is about gnome-terminal, so I tried it in xfce-terminal and discovered that there is option to simply turn off F10 with one checkbox ;-)
    – A.D.
    Commented Feb 22, 2013 at 18:18
  • With Fedora 19 <kbd>F10</kbd> opens the file menu and now the setting moved to Edit->Preferences->General, where one can deactivate 'Enable the menu accelerator key (F10 by default)'. Commented Feb 14, 2014 at 22:37
  • 3
    in my case (Debian Jessie 8.2, Cinnamon) it was Enable the menu accelerator key (F10 by default) on Edit -> Preferneces -> General tab
    – vladkras
    Commented Dec 15, 2015 at 12:15
9

Here is a simple solution for the problem described:

For GTK 3 apps like gnome-terminal and nautilus just create (or edit if you have one) the file ~/.config/gtk-3.0/gtk.css with following content:

$ cat ~/.config/gtk-3.0/gtk.css
@binding-set NoKeyboardNavigation {
unbind "F10"
}

* {
gtk-key-bindings: NoKeyboardNavigation
}
1
  • Worked fine for me with Ubuntu 12.04
    – Betlista
    Commented Jan 3, 2013 at 21:40
2

For Fedora 17 you can find the bug report here

https://bugzilla.redhat.com/show_bug.cgi?id=800856

The workaround there is, create ~/.config/gtk-3.0/gtk.css file with following content:

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

* {
    gtk-key-bindings: NoKeyboardNavigation
}
1

The best way I found in gnome 4 on a Fedora 35 to disable F10 shortcut :

gsettings set org.gnome.Terminal.Legacy.Settings menu-accelerator-enabled false

Hope it helps :)

0

I fixed this on Ubuntu by making a new ~/.config/gtk-3.0/gtk.css and putting this in it:

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

* {
    gtk-key-bindings: NoKeyboardNavigation
}
1
  • That wasn't working for me with Ubuntu 12.04, worked fine when I used 'ubind "F10"' as described in first answer.
    – Betlista
    Commented Jan 3, 2013 at 21:38
0

in centos, rhel, oracle linux

Go to Edit->Keyboard Shortcuts And uncheck "Enable the menu shortcut key" to turn it off.

1
  • That was not my issue. It was not the terminal menus you can fisable (I always do that). It was something else that acted as if I right-clicked
    – varesa
    Commented Sep 30, 2014 at 11:38
0

Thank you @David for the solution to this (not enough rep to reply directly inline). I am trying out Cinnamon on openSUSE Tumbleweed here in the end of 2022.

Every time I tried to exit one of my many favorite curses based utilities (Ex: mc, htop), I was getting the dreaded terminal window menu pop-up despite implementing every solution I had thus far found online (people have been struggling with this for over 10 years as I've seen) over the last two days (gtk.css doesn't sound like the right spot for key bindings, but hey what can I say about cascading style sheets influencing desktop environment keyboard interfaces, maybe some web UI designer had some strong influence on how X11 operates).

Anyway, I had installed the dconf-editor in some prior attempt. Having updated that so I could actually kick it off in the UI with root perms: -Some other SO post about export $(dbus-launch) to accommodate some gnome requirement business.

The post here by @David gave me the actual path inside the dconf editor I needed.

TL;DR: If you have already updated all the other settings and done that crazy CSS hack to no avail, update the (in dconf) /org/gnome/Terminal/Legacy/Settings/menu-accelerator-enabled option. Changing it in the /org/(all_DEs_here)/desktop/interface location didn't have any affect.

Again, @David: dude I will probably never meet you in real life, but if I do I owe you a pint of your favorite brew for saving me from this keybinding madness.

1
  • menu-accelerator-enabled is actually available in the terminal settings GUI. Preferences > General > Enable the menu accelerator key (F10 by default). Unless that wasn't working for some reason? The main issue in my original question, which was fixed by the CSS edit, was another overlapping keybinding in addition to the normal F10 menu.
    – varesa
    Commented Jan 25, 2023 at 19:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .