Gtk.Widget.prototype.add_accelerator
function add_accelerator(accel_signal:String, accel_group:Gtk.AccelGroup, accel_key:Number, accel_mods:Gdk.ModifierType, accel_flags:Gtk.AccelFlags):void { // Gjs wrapper for gtk_widget_add_accelerator() }
Installs an accelerator for this widget in accel_group that causes accel_signal to be emitted if the accelerator is activated. The accel_group needs to be added to the widget's toplevel via Gtk.add_accel_group, and the signal must be of type GObject.SignalFlags.action. Accelerators added through this function are not user changeable during runtime. If you want to support accelerators that can be changed by the user, use add_entry and Gtk.set_accel_path or Gtk.MenuItem.prototype.set_accel_path instead.
- accel_signal
widget signal to emit on accelerator activation
- accel_group
accel group for this widget, added to its toplevel
- accel_key
GDK keyval of the accelerator
- accel_mods
modifier key combination of the accelerator
- accel_flags
flag accelerators, e.g. Gtk.AccelFlags.visible