Package: gtk

Generic Function gtk:search-entry-key-capture-widget

Lambda List

gtk:search-entry-key-capture-widget (object)

Syntax

(gtk:search-entry-key-capture-widget object) => widget
(setf (gtk:search-entry-key-capture-widget object) widget)

Arguments

object -- a gtk:search-entry widget
widget -- a gtk:widget widget

Details

The accessor for the key-capture-widget slot gets or sets widget as the widget that the search entry will capture key events from. Key events are consumed by the search entry to start or continue a search.

If the search entry is part of a gtk:search-bar widget, it is preferable to call the gtk:search-bar-key-capture-widget function instead, which will reveal the search in addition to triggering the search entry.

Note that despite the name of this function, the events are only captured in the bubble phase, which means that editable child widgets of widget will receive text input before it gets captured. If that is not desired, you can capture and forward the events yourself with the gtk:event-controller-key-forward function.

Since 4.22
 

See also

2026-08-17