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 679294 - GtkTreeView keyboard binding are not intituive
GtkTreeView keyboard binding are not intituive
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Widget: GtkTreeView
unspecified
Other Linux
: Normal major
: ---
Assigned To: gtktreeview-bugs
gtktreeview-bugs
Depends on:
Blocks:
 
 
Reported: 2012-07-03 01:10 UTC by Damián Nohales
Modified: 2018-02-10 04:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
treeview: change keyboard bindings behaviour (6.72 KB, patch)
2012-07-03 01:11 UTC, Damián Nohales
none Details | Review

Description Damián Nohales 2012-07-03 01:10:00 UTC
Most GUIs, like MacOS X, Microsoft Windows and Qt handle the keyboard bindings for its treeviews in the same way: user can easily expand, collapse and move into tree nodes using only the arrow keys.

In Gtk+, however, is quite different. User needs to press "plus" and "minus" key to collapse and expand nodes, leaving Right and Left arrows with essentially null functionality. Well yeah, that keys allow to move horizontally into row cells.
Seeing many of the applications written using Gtk+, there are not many cases where user find useful moving horizontally across the row with the keyboard, most GtkTreeView that I see are simple and used only to show information.
So I guess the current GtkTreeView behaviour is crazy, not useful in most cases, goes against intuition and against good User Experience.

I'm really not familiar with Gtk+ programming but, as user, I find this "bug" extremely annoying in my day to day.

So, I make some changes in Gtk+ to enhance (from my point of view) the behavior of GtkTreeView with the keyboard.

The attached patch to the 3.4 branch modifies the default GtkTreeView behaviour with the keyboard, expanding nodes with the right arrow and collapsing it with left arrow, selecting parent and child nodes when appropriate:
 - When user press Left on a collapsed node, Gtk+ select the parent node.
 - When user press right on an expanded node, Gtk+ select the first child node.
Users that want to navigate into cells horizontally (as I can see, a non frecuent use case) will need to press Ctrl+<Left|Right>. Users can still move to the parent node with the Backspace key, without collapsing anything.

I don't know exactly if this behavior change break some expected behavior to application programmer, I hope not.


A last question, Why do you implemented the current GtkTreeView behavior knowing the big difference with other tested GUIs?

Best Regards!
Comment 1 Damián Nohales 2012-07-03 01:11:18 UTC
Created attachment 217896 [details] [review]
treeview: change keyboard bindings behaviour
Comment 2 Kristian Rietveld 2012-07-15 13:14:24 UTC
(In reply to comment #0)
> Users that want to navigate into cells horizontally (as I can see, a non
> frecuent use case) will need to press Ctrl+<Left|Right>. Users can still move
> to the parent node with the Backspace key, without collapsing anything.

Just to give a little background, this was tried in 2006, see:

  https://bugzilla.gnome.org/show_bug.cgi?id=105895#c27

And reverted a year later due to complaints:

  https://bugzilla.gnome.org/show_bug.cgi?id=105895#c29


From there on I pretty much gave up.  As I mentioned in comment 29 in 105985; a sophisticated plan is likely needed where you "detect" the kind of tree view (list or tree, many editable cells or not, long horizontally stretching rows, etc.) and base the keyboard bindings based on that.
Comment 3 Matthias Clasen 2018-02-10 04:36:12 UTC
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.