Widget.addAccelerator

void addAccelerator(string accelSignal, gtk.accel_group.AccelGroup accelGroup, uint accelKey, gdk.types.ModifierType accelMods, gtk.types.AccelFlags accelFlags)

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.window.Window.addAccelGroup], and the signal must be of type G_SIGNAL_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 [gtk.accel_map.AccelMap.addEntry] and [gtk.widget.Widget.setAccelPath] or [gtk.menu_item.MenuItem.setAccelPath] instead.

Parameters

accelSignalwidget signal to emit on accelerator activation
accelGroupaccel group for this widget, added to its toplevel
accelKeyGDK keyval of the accelerator
accelModsmodifier key combination of the accelerator
accelFlagsflag accelerators, e.g. [gtk.types.AccelFlags.Visible]