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 323730 - Alt+Num shortcut to switch tab to become Ctrl+Shift+Page[Up|Down]
Alt+Num shortcut to switch tab to become Ctrl+Shift+Page[Up|Down]
Status: RESOLVED NOTABUG
Product: gedit
Classification: Applications
Component: general
2.12.x
Other All
: Normal enhancement
: ---
Assigned To: Gedit maintainers
gedit QA volunteers
: 323974 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-12-10 15:43 UTC by Andrew Conkling
Modified: 2006-01-03 13:54 UTC
See Also:
GNOME target: ---
GNOME version: 2.11/2.12



Description Andrew Conkling 2005-12-10 15:43:50 UTC
GTK+'s shortcut for changing tabs in a GtkNotebook is Ctrl+PageUp or
Ctrl+PageDown.  However, these shortcuts are reserved for moving the cursor to
the beginning/end of a paragraph.  Fine.  But how about making the tab-switching
Ctrl+Shift+PageUp or Ctrl+Shift+PageDown.  I've seen GTK+ terminals that do this
to allow the others to be used my any apps.  It seems to be to be closer and
more intuitive.
Comment 1 Paolo Borelli 2005-12-10 15:54:46 UTC
well, we ctrl+alt+pgUp/pgDown already does that.

Is there a strong reason to make that ctrl+shfit?
Comment 2 Andrew Conkling 2005-12-10 16:03:55 UTC
Well, seeing that all the shortcuts in the menus go from Ctrl+Foo to
Ctrl+Shift+Foo (e.g. Save and Save As), it would make more sense to me.  If it
were Ctrl+Shift, I would not have even gotten to this point; I didn't think to
try Ctrl+Alt at all.  (There is only one Ctrl+Alt shortcut that I can see in the
menus, but many Ctrl+Shift ones.)
Comment 3 Olav Vitters 2005-12-29 15:34:35 UTC
*** Bug 323974 has been marked as a duplicate of this bug. ***
Comment 4 Paolo Maggi 2006-01-02 17:01:52 UTC
Note that Ctrl+Shit+PageUp/PageDow are used by GtkTextView to move the cursor to beginning/end of a paragraph selecting the text from the begining/end of the paragraph to the current cursor position.

Ctrl+Alt+PgUp/PgDown is the default keybining used by gtk+ in this case.

Closing as NOTABUG.
Comment 5 Jacob Emcken 2006-01-02 19:56:21 UTC
I dont understand why bug 323974 is a dupe of this one?

Bug 323974 isn't about a specific keyboard shortcut but about having gedit and gnome-terminal to use the same shortcut for shifting between tabs - for consistensy.
Comment 6 Andrew Conkling 2006-01-02 21:15:52 UTC
(In reply to comment #4)
> Ctrl+Alt+PgUp/PgDown is the default keybining used by gtk+ in this case.

You mean gedit, right?  GTK+'s default, as already mentioned, is Ctrl+PageUp/PageDn.

(In reply to comment #5)
> I dont understand why bug 323974 is a dupe of this one?
> 
> Bug 323974 isn't about a specific keyboard shortcut but about having gedit and
> gnome-terminal to use the same shortcut for shifting between tabs - for
> consistensy.

One could argue that this is what I'm saying too.  In fact, I would agree with the reporter of that bug.  The fact that gedit's shortcuts override the GTK+ default (not just gnome-terminal's) of using Ctrl+PageUp/Dn to switch tabs is a big usability no-no, IMO.  Overriding the GTK+ default seems like it should only be done if it's really necessary.
Comment 7 Paolo Maggi 2006-01-03 09:44:42 UTC
No, I mean Ctrl+Alt+PageUp/PageDn are GTK+'s default when a tab contains a GtkTextView, so gedit is _not_ overriding the GTK+ default.

If you don't trust me read the following code in gtk_notebook_class_init (http://cvs.gnome.org/viewcvs/gtk%2B/gtk/gtknotebook.c?view=markup)

  gtk_binding_entry_add_signal (binding_set,
                                GDK_Page_Up, GDK_CONTROL_MASK,
                                "change_current_page", 1,
                                G_TYPE_INT, -1);
  gtk_binding_entry_add_signal (binding_set,
                                GDK_Page_Down, GDK_CONTROL_MASK,
                                "change_current_page", 1,
                                G_TYPE_INT, 1);

  gtk_binding_entry_add_signal (binding_set,
                                GDK_Page_Up, GDK_CONTROL_MASK | GDK_MOD1_MASK,
                                "change_current_page", 1,
                                G_TYPE_INT, -1);
  gtk_binding_entry_add_signal (binding_set,
                                GDK_Page_Down, GDK_CONTROL_MASK | GDK_MOD1_MASK,
                                "change_current_page", 1,
                                G_TYPE_INT, 1);


I agree that the fact gedit and gnome-terminal use different shortcut for moving between tabs is not very good.

But, as I already said, gedit cannot use such binding since it is already used by GtkTextView and so the alternative one is used.
At the same time, it seems gnome-terminal is using the alternative Ctrl+Alt+PageUp/PageDown keybinding to add an escape sequence.

BTW, I have just checked on by Ubuntu Breezy and gnome-terminal is not using Ctrl+Shift+PageUp/PageDown, but simply Ctrl+PageUp/PageDown that is the other default binding to shift between tabs.
Comment 8 Andrew Conkling 2006-01-03 13:54:34 UTC
(In reply to comment #7)
> No, I mean Ctrl+Alt+PageUp/PageDn are GTK+'s default when a tab contains a
> GtkTextView, so gedit is _not_ overriding the GTK+ default.

Ah, OK.  So it's GTK+'s fault. :P

> I agree that the fact gedit and gnome-terminal use different shortcut for
> moving between tabs is not very good.
> 
> But, as I already said, gedit cannot use such binding since it is already used
> by GtkTextView and so the alternative one is used.

I guess that's hard to avoid, since the notebook and textview aren't necessarily used together all that often.  I'm kinda out of ideas as to what else would work.  I guess that's why it is the way it is. :)