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 567141 - Accelerator/Search support for combobox items
Accelerator/Search support for combobox items
Product: gtk+
Classification: Platform
Component: Widget: GtkComboBox
Other All
: Normal enhancement
: ---
Assigned To: gtk-bugs
: 262687 436480 566950 603303 643853 645240 (view as bug list)
Depends on:
Reported: 2009-01-09 10:46 UTC by Luca Bruno
Modified: 2018-05-02 14:39 UTC
See Also:
GNOME target: ---
GNOME version: ---

Jump to the first row with the typed character (2.91 KB, patch)
2009-09-21 18:34 UTC, Christian Dywan
none Details | Review
Jump to row beginning with the typed character #2 (4.09 KB, patch)
2010-07-16 16:45 UTC, Christian Dywan
none Details | Review

Description Luca Bruno 2009-01-09 10:46:36 UTC
I'd like to suggest a new feature for GtkComboBox, which is included in other toolkits and also browsers.
For long combo lists it's often boring to scroll the whole list before getting to an item. If items had accelerators or a kind of search, the user could use the keyboard to select the item.
I said "accelerator" but it's mandatory to use the first letters of the item, underlines would confuse the user.

Other information:
Suggested behavior:
1. When the user starts typing some keys the matching items in the combobox must be selected. 
2. Pressing multiple keys is supported within a keyboard timeout (e.g. 1 second between each key) to improve the search pattern then select a more specific item.
3. API will expose a property for specifying which column of the model is going to be used for the search, though the cell renderer must be textual and visible to the user.
Comment 1 Christian Dywan 2009-01-21 14:06:07 UTC
*** Bug 566950 has been marked as a duplicate of this bug. ***
Comment 2 Reinout van Schouwen 2009-07-20 12:26:25 UTC
Second this request. 
Comment 3 Christian Dywan 2009-09-21 18:34:43 UTC
Created attachment 143627 [details] [review]
Jump to the first row with the typed character

I went for a simple implementation that basically jumps to the first row beginning with the typed character, it works when the popup is open and when it's closed.
Note thatI didn't attempt to support non-Latin input since I don't have a keyboard to test that on.
Comment 4 Sergey V. Udaltsov 2009-10-12 23:49:09 UTC
pretty please, implement that! language/country combos in gnome-keyboard-properties really need that feature!
Comment 5 Sergey V. Udaltsov 2009-10-12 23:56:07 UTC
Just one more request (for more complex solution!): it would be cool to
"accumulate" search string. Let me illustrate. You have in your combo


First user presses 'c', selection goes to 'cde'. Then (soon enough!), user
presses 'f', selection does not go to 'fgh' but instead to 'cfg' (because f is
the second letter here. If there is a significant delay between 'c' and 'f' -
the selection goes to 'fgh'.
Comment 6 Luca Bruno 2009-10-14 08:10:24 UTC
More like treeview interactive search.
Comment 7 Christian Dywan 2009-11-30 13:16:03 UTC
*** Bug 603303 has been marked as a duplicate of this bug. ***
Comment 8 Guillaume Bouchard 2009-12-01 06:43:04 UTC
+1 for this request (because I'm the author of the duplicate above ;)

@Luca Bruno, the API must be like treeview interactive search, but not only for text-only model. The treeview search asks for an "equal_function" which is really nice when you want to use not-text model.

@Christian Dywan your solution needs more "visual feedback" like the popup menu that exists for treeview.
Comment 9 Luca Bruno 2009-12-08 12:35:13 UTC
What about making a common GtkTreeSearch for GtkTreeView, GtkIconView and GtkComboBox? It will hold a search window and the entry, and some signals like start_interactive_search, search ecc. so that the views connect to these signals and moves through items accordingly to the iter passed in the signal: = gtk_tree_search_new(treeview.window, treeview.model);
gtk_signal_connect (, "search", ...);
treesearch connects to key press of treeview
when user types a search window is shown
iter = treesearch.search_func(treesearch.model, gtk_entry_get_text(treesearch.entry), ...);
gtk_signal_emit (treesearch, "search", iter);
treeview moves selection to that iter...

Or something like that. I think extracting a search API with search window from the actual GtkTreeView interactive search can be done.
Comment 10 Christian Dywan 2010-07-16 16:45:31 UTC
Created attachment 166028 [details] [review]
Jump to row beginning with the typed character #2

Updated patch. All characters being typed are compared to the rows. Hitting any control character such as arrows resets the search.

I'm not sure it's worth making that complex, with entries and interfaces. There is hardly space to place an entry, unlike a treeview since combos are usually fairly small. Although it seems something visual would be desirable.
Comment 11 Hedayat Vatankhah 2011-02-08 23:30:19 UTC
In many places it doesn't have any special visual feedback, and it's fine (while a good visual feedback could be great). But anyway, please add this basic functionality to gtk (specially gtk3) ASAP since it is really needed. visual feedback can come afterwards. 
As the patch is already written, why it is not applied?
Comment 12 Daniel Boles 2017-03-03 15:10:49 UTC
*** Bug 436480 has been marked as a duplicate of this bug. ***
Comment 13 Daniel Boles 2017-08-15 14:28:44 UTC
*** Bug 262687 has been marked as a duplicate of this bug. ***
Comment 14 Daniel Boles 2017-08-24 22:25:42 UTC
*** Bug 643853 has been marked as a duplicate of this bug. ***
Comment 15 Daniel Boles 2017-08-25 10:47:26 UTC
*** Bug 645240 has been marked as a duplicate of this bug. ***
Comment 16 GNOME Infrastructure Team 2018-05-02 14:39:54 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: