GNOME Bugzilla – Bug 705648
Change Ctrl+PgUp/Down in GtkTextView so it is available for tab switching in GtkNotebook
Last modified: 2018-05-02 15:45:42 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?
Just wanted to put in a ping on this bug report.. thanks!
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
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!
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.
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".
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...
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.
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.
*** Bug 740881 has been marked as a duplicate of this bug. ***
*** Bug 673423 has been marked as a duplicate of this bug. ***
*** Bug 689680 has been marked as a duplicate of this bug. ***
(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.
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.
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?
Ping -- more than a year has gone by since the last comment...
Ping! It would be great to get this in.
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.
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.
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.
-- 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.