Gtk.Widget.grab_default

Causes @widget to become the default widget. @widget must have the %GTK_CAN_DEFAULT flag set; typically you have to set this flag yourself by calling <literal>gtk_widget_set_can_default (@widget, %TRUE)</literal>. The default widget is activated when the user presses Enter in a window. Default widgets must be activatable, that is, gtk_widget_activate() should affect them. Note that GtkEntry widgets require the "activates-default" property set to %TRUE before they activate the default widget when Enter is pressed and the GtkEntry is focused.