GNOME Bugzilla – Bug 656158
GTK should filter out keyboard shortcuts for insensitive menu items
Last modified: 2018-02-10 03:36:11 UTC
If the keyboard shortcut is pressed for a menu item which has been set sensitive = FALSE, the keystroke is passed on to the application, which can cause unwanted side-effects. For example, pressing Ctrl+PgDn (next tab) in roxterm while the last tab is already selected and that menu item is insensitive results in spurious characters being entered in the terminal. I think the correct behaviour is for such keystrokes to be ignored - if a keystroke had different behaviour depending on whether a menu item is sensitive that would be bad UI design IMO. Making the application filter out these key presses could cause performance issues in high-level languages, while GTK could do this without overhead because it's presumably already checking all keystrokes against menu shortcuts anyway. I'm pretty sure GTK2 fails to do this as well as GTK3, but it's only recently that I started to give thought to why roxterm was doing what I described above.
We're moving to gitlab! As part of this move, we are closing bugs that haven't seen activity in more than 5 years. If this issue is still imporant to you and still relevant with GTK+ 3.22 or master, please consider creating a gitlab issue for it.