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 705648 - Change Ctrl+PgUp/Down in GtkTextView so it is available for tab switching in GtkNotebook
Change Ctrl+PgUp/Down in GtkTextView so it is available for tab switching in ...
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Widget: GtkTextView
3.10.x
Other Linux
: Normal enhancement
: ---
Assigned To: Gedit maintainers
Gedit maintainers
: 673423 689680 740881 (view as bug list)
Depends on:
Blocks: 775375
 
 
Reported: 2013-08-08 01:18 UTC by Luke Hutchison
Modified: 2018-05-02 15:45 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Luke Hutchison 2013-08-08 01:18:30 UTC
In gedit, tab switching using the de facto standard keys Ctrl+PgUp / Ctrl+PgDown only works if the Ctrl+F search box is showing on the tab that you're switching away from. To switch back and forth between two tabs, you can press Ctrl+F on both of them, and switch back and forth with these key combinations, but as soon as you close the find box, you have to use the very odd Ctrl+Alt+PgUp/PgDown.

I filed a bug years ago asking for Ctrl+Alt+PgUp/PgDown to be changed to Ctrl+PgUp/PgDown, which is the standard for everything else I can think of. At the time, the bug was closed as WONTFIX for reasons I never understood.

Since Ctrl+PgUp/PgDown is not even mapped to anything in gEdit right now (AFAICT), can this shortcut please be mapped to tab-switching all the time, not just when the find box is up?
Comment 1 Luke Hutchison 2014-03-22 00:12:56 UTC
Just wanted to put in a ping on this bug report.. thanks!
Comment 2 Paolo Borelli 2014-03-22 08:50:52 UTC
Ok, let me explain: all of this is handled in Gtk and I agree things should be changed to use Ctrl+PgUp/Down for tab switching.


- GtkNotebook defines Ctrl+Alt+PgUp/Down as the standard key to switch tabs
- GtkNotebook also groks Ctrl+PgUp/Down IFF the widget in the notebook does not use it
- GtkTextView uses Ctrl+Pgup/Down to move to the end of the paragraph

This is also explains why the shortcut happens to work when the search is active, since the textview is not focused and does not intercept the shortcut
Comment 3 Luke Hutchison 2014-03-22 10:07:41 UTC
OK, changing component to gtk+.

Dear GTK maintainers: is it possible to change the shortcut for moving to the beginning/end of the paragraph to use Alt+PgUp/Down rather than Ctrl+PgUp/Down, so that it doesn't mask using Ctrl+PgUp/Down for tab switching in GtkNotebook? Thanks!
Comment 4 Sébastien Wilmet 2014-03-22 13:26:29 UTC
The problem is specific to gedit. You have found a hidden feature when the search entry is shown. Ctrl+Alt+PgUp/Down can be used instead.

Maybe other applications already use Alt+PgUp/Down. It's a bad idea to change the keyboard shortcuts in GtkTextView just because it would be more convenient in combination with a GtkNotebook. And what if the search entry (or any other widget shown on top of a GtkTextView) use Ctrl+PgUp/Down for another purpose?

So I think this bug can be closed as wontfix.
Comment 5 Paolo Borelli 2014-03-22 14:25:35 UTC
I do not agree. This is issue has come up regularly in the last 10 years and in my experience *everybody* expects ctrl+pgup/down to be the tab change keybindings and *nobody* ever asked or knew about "move to the end of paragraph".
Comment 6 darkpenguin 2014-06-22 09:09:02 UTC
OK, opinions differ here, and we can't ask the developers for a change they find inconvenient - even though I'd say it's not a "change", but a "regression fix". But please, would they maybe just give us a patch or a compile option to reverse or disable those shortcuts, like it was before? I was happy without this new function at all. But I still suck too much to read the code and create a patch myself... I don't mind the defaults to be whatever the developers want, but I want at least MY interface to behave like I want...
Comment 7 Allan Day 2014-09-29 16:13:24 UTC
I've also encountered this issue regularly over many years of using GNOME. Ctrl+PgUp/PgDown is the convention for switching tabs with the keyboard - the odd exceptions we have create a lot of errors and uncertainty.

Bug 87764 (from 2002!) covers the same issue from a Human Interface Guidelines point of view.

Since Ctrl+PgUp/PgDown is so established, my view is that it would make sense to change GtkTextView to use a different shortcut for moving to the beginning/end of the paragraph.
Comment 8 Luke Hutchison 2014-09-29 19:31:06 UTC
I created the following request in GtkTextView a few days ago to switch the defaults:

https://bugzilla.gnome.org/show_bug.cgi?id=737230

Initially I was proposing to use Alt+Home/End to go to the beginning/end of the paragraph, but since Alt is not available for shortcuts in Gnome, I proposed modifying the behavior of Ctrl+Up/Down for this purpose, freeing up Ctrl+PageUp/PageDown for tab switching.
Comment 9 Sébastien Wilmet 2014-11-29 10:49:54 UTC
*** Bug 740881 has been marked as a duplicate of this bug. ***
Comment 10 Sébastien Wilmet 2015-02-03 16:39:34 UTC
*** Bug 673423 has been marked as a duplicate of this bug. ***
Comment 11 Sébastien Wilmet 2015-02-03 16:58:45 UTC
*** Bug 689680 has been marked as a duplicate of this bug. ***
Comment 12 Sébastien Wilmet 2015-03-11 16:15:37 UTC
(In reply to Paolo Borelli from comment #2)
> - GtkNotebook defines Ctrl+Alt+PgUp/Down as the standard key to switch tabs
> - GtkNotebook also groks Ctrl+PgUp/Down IFF the widget in the notebook does
> not use it
> - GtkTextView uses Ctrl+Pgup/Down to move to the end of the paragraph

And GtkScrolledWindow also uses Ctrl+PgUp/Down for horizontal scrolling.

So I guess Ctrl+PgUp/Down must be explicitly added in gedit or other text editors for tab switching.
Comment 13 Egmont Koblinger 2015-03-25 16:57:41 UTC
Let me also cast a vote for the standard behavior (that is: Ctrl+PageXx to switch tabs; Ctrl+Shift+PageXx to reorder tabs).

I was about ask what's the point of a Ctrl+PageXx that does the same as Home/End.  I totally didn't occur to me that the difference could be the physical line vs. logical paragraph, I only figured it out from the previous comments here.

I never used a "beginning/end of paragraph" shortcut in any editor so far, and I never missed it.  Even if someone misses it, _this_ feature should go to Ctrl+Alt+PageXx (or Ctrl+Alt+Home/End or any other unused key) to maintain compatibility with pretty much every notebook interface.
Comment 14 Luke Hutchison 2015-11-05 22:00:01 UTC
A patch has been sitting in bug 737230 to fix the GtkTextView issue for more than 6 months; can that bug and this one be resolved now please?
Comment 15 Luke Hutchison 2016-11-27 01:39:19 UTC
Ping -- more than a year has gone by since the last comment...
Comment 16 Nate Graham 2016-11-30 00:25:31 UTC
Ping! It would be great to get this in.
Comment 17 Nate Graham 2017-08-16 15:00:05 UTC
I talked to the GTK developers on IRC about this. They didn't want to make this change, and are worried about breaking the workflow of people who use the ctrl-pgup/pgdn of other GTK programs.
Comment 18 Luke Hutchison 2017-08-16 18:07:15 UTC
I'd like to see an actual survey of users, rather than just lots of conjecture and adherence to the status quo. I think the status quo does not reflect modern expectations for behavior in any mainstream desktop environment... And it's danged annoying.
Comment 19 Nate Graham 2017-08-16 18:25:21 UTC
A GTK developer made the same suggestion when we spoke on IRC this morning: do a survey of GTK users regarding the ctrl-pgup/pgdn paragraph navigation shortcut, to see how many people know about it, use it, and would be annoyed if it changed.

This seemed like an impossible-to-execute diversion. How would you run such a survey? Would the results even be valid?

I am willing to bet that practically nobody uses GTKTextView's ctrl-pgup/pgdn shortcut for text editing. There are no common, major programs that use an unadulterated GTKTextView for editing text that's typically more prose than code.

By contrast, many moderately-advanced Gedit users use a keyboard shortcut for switching tabs, as evidenced by the volume of complaints on the net about this inconsistency. A small sampling:

https://bugzilla.gnome.org/show_bug.cgi?id=673423
https://bugzilla.gnome.org/show_bug.cgi?id=689680
https://bugzilla.gnome.org/show_bug.cgi?id=740881
https://bugzilla.gnome.org/show_bug.cgi?id=775375
https://bugzilla.gnome.org/show_bug.cgi?id=737230
https://askubuntu.com/questions/76082/how-do-i-move-to-a-new-tab-in-gedit-using-the-keyboard#comment1310476_76089
https://bbs.archlinux.org/viewtopic.php?id=122072
https://askubuntu.com/a/224018/616185

Even GNOME developer Alan Day wants this changed.
Comment 20 GNOME Infrastructure Team 2018-05-02 15:45:42 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gtk/issues/440.