GNOME Bugzilla – Bug 727134
Menu shortcut keys can't be disabled
Last modified: 2014-04-14 16:17:01 UTC
Preferences -> Shortcuts -> Help -> Contents is set to "Disabled", yet F1 brings up the help, rather than emitting the proper escape sequence. Setting the shortcut to F1 and then disabling doesn't help. Setting the shortcut to something else and then disabling doesn't help either. Setting the shortcut to something else (e.g. F2), then setting it to F1, then disabling helps - for the lifetime of g-t. Quit and restart g-t and it brings up the help again.
git bisect says https://git.gnome.org/browse/gnome-terminal/commit/?id=a319aeb66f36e728af1b4929ddd69574df838702
Created attachment 273099 [details] [review] fix It's the hardcoded menu shortcut that causes the problem.
... Which brings us to a more generic problem, not specific to Help. In the application menu, many entries have a corresponding shortcut key (e.g. F1 for help, Shift+Ctrl+C/V for copy-paste, Ctrl+± for zoom, Shift+Ctrl+F for find, etc...). These keys seem to be modifiable in Preferences->Shortcuts, but in fact you can only define an additional key to the hardcoded default (and hence have two shortcuts for each action), but you can't disable the default. Others (e.g. F11 for fullscreen, Alt+n for switching to the nth tab etc...) are not defined as menu shortcut. So these can be disabled, although it's not a nice user experience that the menu doesn't inform you about these shortcuts. A different code path is executed depending on weather it's a custom hotkey or the hardcoded menu hotkey, e.g. action_help_cb() vs. help_contents_callback(). Probably the right solution is to remove all the hardcoded menu shortcuts, and make the user-defined ones dynamically propagate into the menus. The menu widget would take care of performing the desired action, the custom hotkey system would only need to do so for those that have no menu entry. Apparently this is exactly what we used to have prior to the above mentioned commit. Seems like it was a broken-by-design change??
*** This bug has been marked as a duplicate of bug 728121 ***