After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 730128 - Tab switching keys are not passed through for tabless windows
Tab switching keys are not passed through for tabless windows
Status: RESOLVED FIXED
Product: gnome-terminal
Classification: Core
Component: Keybindings
3.12.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME Terminal Maintainers
GNOME Terminal Maintainers
: 734644 739991 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2014-05-14 13:27 UTC by Lionel Landwerlin
Modified: 2015-10-06 08:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
window: Pass tab switching keys to the terminal for tabless windows (1.35 KB, patch)
2015-10-05 18:18 UTC, Debarshi Ray
committed Details | Review

Description Lionel Landwerlin 2014-05-14 13:27:33 UTC
After the upgrade to gnome 3.12, Alt-1/2/3/4/etc.. stopped working.
Not sure how to debug this.
I'm running Debian, I've been told people on Fedora don't have this problem.
Any idea?
Comment 1 Christian Persch 2014-05-14 13:38:55 UTC
Unless the version is >= 3.12.2, this is a dup of bug 728121.
Comment 2 Lionel Landwerlin 2014-05-14 13:59:28 UTC
So I was running 3.12.0, but recompiling 3.12.2 I still have the same problem.
Comment 3 Lionel Landwerlin 2014-05-14 14:00:06 UTC
Just adding that Alt <-/-> or Ctrl-n/p works though.
Comment 4 Christian Persch 2014-05-14 14:14:13 UTC
Did you restart the server after compiling 3.12.2 ?
Comment 5 Lionel Landwerlin 2014-05-14 15:01:04 UTC
Yep, just checked, it's displaying the correct version in the UI too.
Comment 6 Egmont Koblinger 2014-05-14 17:02:01 UTC
Is this resolved now?

Lionel, what do you mean by "stopped working"? :) What's your preferred behavior for these keys?

They used to have dual behavior: Switched to the given tab, or if there was no such tab, emitted an escape sequence.

Now they only do one or the other, depending on Preferences->Shortcuts.
Comment 7 Lionel Landwerlin 2014-05-14 17:07:59 UTC
I mean I'm using irssi with several tabs in it.
When my gnome-terminal window only has one tab, I used to be able to switch pages in irssi in gnome-terminal 3.10.
When more that one terminal tab was open, it would switch between terminal tabs, unless no terminal match the Atl-(number), in that case it would fall back to send the event to irssi (or any other program running within the terminal).
That stopped working with the 3.12 version.
Comment 8 Lionel Landwerlin 2014-05-14 17:09:26 UTC
Indeed deactivating the shortcuts in preferences->shortcuts makes the events go back to irssi
Comment 9 Egmont Koblinger 2014-05-14 17:21:15 UTC
"it would switch between terminal tabs, unless no terminal match the Atl-(number), in that case it would fall back to send the event to irssi"

This is exactly the "dual" behavior that was removed, not sure if intentionally or as a side effect of refactoring. I'm not sure if it makes sense to bring back this behavior, IMO it was weird anyway - I don't know.

You can choose to have Alt+number to switch g-t tabs, and press Esc followed by number to send it to irssi. Or you can configure a different hotkey for g-t tabs (e.g. Ctrl+Alt+number) and press Alt+number to send it to irssi.

I hope you'll find one of these convenient enough for you.
Comment 10 Christian Persch 2014-05-14 17:42:49 UTC
So everything is as it should be.
Comment 11 Adam Jackson 2014-07-17 17:36:06 UTC
(In reply to comment #9)
> "it would switch between terminal tabs, unless no terminal match the
> Atl-(number), in that case it would fall back to send the event to irssi"
> 
> This is exactly the "dual" behavior that was removed, not sure if intentionally
> or as a side effect of refactoring. I'm not sure if it makes sense to bring
> back this behavior, IMO it was weird anyway - I don't know.

I think it very much makes sense to bring it back.  It's only weird if you think tabs are a thing terminals have; if you don't use tabbed terminals then you shouldn't have to pay for their keybindings.
Comment 12 Egmont Koblinger 2014-07-17 20:17:27 UTC
(In reply to comment #11)
> if you don't use tabbed terminals then
> you shouldn't have to pay for their keybindings.

If you don't use tabbed terminals, you're free to disable the corresponding shortcuts for yourself (including [Shift+]Ctrl+PageUp/Down and Shift+Ctrl+T).

The "dual behavior" would only be complete if all other shortcuts also behaved that way: if they don't have an effect right now then they are forwarded to the terminal.  E.g. if there's no search string yet, Shift+Ctrl+G/H should be emitted; if the terminal is fully zoomed in/out, Shift+Ctrl++/- should be emitted, etc.

The "dual behavior" leads to a less consistent user experience, where the behavior inside the terminal widget depends on some random UI property.  I believe it's worse than having something consistent.

Just my 2 cents. YMMV.
Comment 13 Adam Jackson 2014-07-18 20:22:50 UTC
(In reply to comment #12)
> (In reply to comment #11)
> > if you don't use tabbed terminals then
> > you shouldn't have to pay for their keybindings.
> 
> If you don't use tabbed terminals, you're free to disable the corresponding
> shortcuts for yourself (including [Shift+]Ctrl+PageUp/Down and Shift+Ctrl+T).

Well yes, once I upgraded and discovered that irssi keybindings no longer worked, and once I figured out that the keyboard shortcuts were visible neither in control center nor in the profile preferences but instead in the app menu that I still can't ever remember is a thing, disabling them is in fact what I did.

> The "dual behavior" would only be complete if all other shortcuts also behaved
> that way: if they don't have an effect right now then they are forwarded to the
> terminal.  E.g. if there's no search string yet, Shift+Ctrl+G/H should be
> emitted; if the terminal is fully zoomed in/out, Shift+Ctrl++/- should be
> emitted, etc.

On the one hand: I'm not entirely convinced this needs to be "complete".  On the other hand: yes, sure, make it completely orthogonal, that sounds perfect.

> The "dual behavior" leads to a less consistent user experience, where the
> behavior inside the terminal widget depends on some random UI property.  I
> believe it's worse than having something consistent.

I'm less than persuaded that the consistency you're advocating is of greater value than consistency with my muscle memory of how gnome-terminal had worked for the past nine years.  It's a terminal, I'm already expecting my interaction with the keybindings to be state-dependent, even more so than I already am expecting _every_ application's keyboard navigation to be state-dependent.
Comment 14 Debarshi Ray 2014-08-12 08:09:59 UTC
*** Bug 734644 has been marked as a duplicate of this bug. ***
Comment 15 Bin Li 2014-08-13 07:37:19 UTC
Adam,

I used tmux and screen on terminal, I changed tmux's windows with Alt + 1/2/3/4.
It works before, after upgrade to 3.12, it can't work.

I thought when there are not tabs on terminal, the terminal should send the key event to tmux, screen or issri, ..., like previous version.

Thanks!
Comment 16 Egmont Koblinger 2014-11-12 11:45:35 UTC
*** Bug 739991 has been marked as a duplicate of this bug. ***
Comment 17 Amit Shah 2014-11-12 12:01:21 UTC
Please get the older behaviour back; it's convenient to use terminal in different ways -- my screen/irssi session is in a term by itself; and for other stuff I have I use multiple tabs, and alt+<n> work exactly the way I want in each of those term windows.
Comment 18 Debarshi Ray 2015-10-05 18:18:57 UTC
Created attachment 312687 [details] [review]
window: Pass tab switching keys to the terminal for tabless windows

I was playing around with it today because some people couldn't live without the tab-switch passthrough. So, I am leaving this patch here in case someone finds it useful.
Comment 19 Christian Persch 2015-10-05 18:33:06 UTC
So this is due to the GAction's sensitivity not being set because they're unused (menus still use GtkAction)? If so, I think bug 745329 will fix this.
Comment 20 Debarshi Ray 2015-10-05 18:55:11 UTC
(In reply to Christian Persch from comment #19)
> So this is due to the GAction's sensitivity not being set because they're
> unused (menus still use GtkAction)? If so, I think bug 745329 will fix this.

Yeah, but that will be harder for users to backport on top of the current stable branches.
Comment 21 Debarshi Ray 2015-10-05 18:56:07 UTC
Given that the GMenu port can fix the user-facing issue, do you want to restore it upstream in the stable branches?
Comment 22 Christian Persch 2015-10-05 19:58:54 UTC
Attachment 312687 [details] looks fine to me as a fix until the gmenu port is ready. Ok to commit it to master and 3-18.
Comment 23 Debarshi Ray 2015-10-06 08:02:58 UTC
(In reply to Christian Persch from comment #22)
> Attachment 312687 [details] looks fine to me as a fix until the gmenu port
> is ready. Ok to commit it to master and 3-18.

Ok, thanks, Christian.