Gtk.Widget.prototype.can_activate_accel

function can_activate_accel(signal_id:Number):Boolean {
    // Gjs wrapper for gtk_widget_can_activate_accel()
}

Determines whether an accelerator that activates the signal identified by signal_id can currently be activated. This is done by emitting the Gtk.can-activate-accel signal on widget; if the signal isn't overridden by a handler or in a derived widget, then the default check is that the widget must be sensitive, and the widget and all its ancestors mapped.

Since 2.4

signal_id

the ID of a signal installed on widget

Returns

true if the accelerator can be activated.