3

I did a fresh install of 17.10 and have an issue with the F10 shortcut. I need the F10 to close Midnight Commander in terminal. In Unity I knew how to disable the shortcut, but in gnome this seems not to work at all. I did tried:

Settings > Devices > Keyboard > Keyboard Shortcuts

and disabled anything containing F10 with no luck. In terminal I disabled the shortcuts as well. Also some old solutions like this:

~/.config/gtk-3.0/gtk.css
@binding-set NoKeyboardNavigation {
unbind "<shift>F10"
}

* {
gtk-key-bindings: NoKeyboardNavigation
}

seems not to work.

Any help will be appreciated, thks.

  • I assume you're talking about gnome-terminal. Have you turned off its Prefereces -> "Enable the menu accelerator key (F10 by default)"? – egmont Oct 22 '17 at 10:47
  • No I did not, please post this as an answer. This was it. – emvidi Oct 22 '17 at 10:52
12

You can disable the handling of F10 in GNOME Terminal's Preferences dialog, General tab.

While at it, you might also want to disable Alt+letter mnemonics here, as well as F1 (and if required, F11 too) under the Shortcuts tab.

  • 1
    Thanks, I don't know how I did not see that with the menu accelerator :) – emvidi Oct 22 '17 at 12:14
4

To disable F10 to access Terminal menu:

1) sudo apt install dconf-tools

2) run dconf-editor > browse to org/gnome/terminal/legacy

3) turn off menu-acceletator-enabled (Custom Value -> false)

4) close the terminal, open it again

Thanks firepol for your suggestion.

  • Or rewritten in a way for people to follow it 1:1 (& copy paste the commands) 1) sudo apt install dconf-tools 2) run dconf-editor > browse to org/gnome/terminal/legacy 3) turn off menu-acceletator-enabled 4) close the terminal, open it again. F10 is now free again. Enjoy. I upvoted your answer anyway, since I could finally get rid of that annoyng shortcut and be able to close midnight commander via F10 again. Thx for that. – firepol Dec 12 '17 at 20:34
  • it works ubuntu 18.04 – inzem77 Sep 10 '18 at 8:54
2

Though I feel egmont's answer is the best solution, maybe this additional option may be useful to someone.

If you don't want to:

  • perform any mouse clicks
  • disable F10 opening menu (for some reason)

You can also (as DarkDust points out) emulate F10 key press by pressing: ESC followed by 0

  • Good to know this, thks. – emvidi Jan 23 at 10:33
1

You need not disable F10. You can simply click (with the mouse) on the Quit 'button' in the bottom right corner to quit from Midnight Commander.

enter image description here

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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