Gtk.ActionGroup.prototype.add_action_with_accel

function add_action_with_accel(action:Gtk.Action, accelerator:String):void {
    // Gjs wrapper for gtk_action_group_add_action_with_accel()
}

Adds an action object to the action group and sets up the accelerator.

If accelerator is null, attempts to use the accelerator associated with the stock_id of the action.

Accel paths are set to <literal>&lt;Actions&gt;/<replaceable>group-name</replaceable>/<replaceable>action-name</replaceable></literal>.

Since 2.4

action

the action to add

accelerator

the accelerator for the action, in the format understood by accelerator_parse, or "" for no accelerator, or null to use the stock accelerator