Gtk.AccelGroup

const Gtk = imports.gi.Gtk;

let accel_group = new Gtk.AccelGroup({
});
  

A Gtk.AccelGroup represents a group of keyboard accelerators, typically attached to a toplevel Gtk.Window (with Gtk.add_accel_group). Usually you won't need to create a Gtk.AccelGroup directly; instead, when using Gtk.UIManager, GTK+ automatically sets up the accelerators for your menus in the ui manager's Gtk.AccelGroup.

Note that <firstterm>accelerators</firstterm> are different from <firstterm>mnemonics</firstterm>. Accelerators are shortcuts for activating a menu item; they appear alongside the menu item they're a shortcut for. For example "Ctrl+Q" might appear alongside the "Quit" menu item. Mnemonics are shortcuts for GUI elements such as text entries or buttons; they appear as underlined characters. See Gtk.new_with_mnemonic. Menu items can have both accelerators and mnemonics, of course.

Hierarchy

  • GObject.Object
    • Gtk.AccelGroup