Gtk.Window.prototype.set_default

function set_default(default_widget:Gtk.Widget):void {
    // Gjs wrapper for gtk_window_set_default()
}

The default widget is the widget that's activated when the user presses Enter in a dialog (for example). This function sets or unsets the default widget for a Gtk.Window about. When setting (rather than unsetting) the default widget it's generally easier to call Gtk.Widget.prototype.grab_focus on the widget. Before making a widget the default widget, you must call Gtk.Widget.prototype.set_can_default on the widget you'd like to make the default.

default_widget

widget to be the default, or null to unset the default widget for the toplevel.