Package: gtk
Class gtk:shortcut-controller
Superclassesgtk:event-controller, gtk:buildable, gio:list-model, gobject:object, common-lisp:standard-object, common-lisp:t Documented Subclasses
None
Direct SlotsDetails The gtk:shortcut-controller class is an event controller that
manages shortcuts.
Most common shortcuts are using this controller implicitly, for example, by adding a mnemonic underline to a gtk:label widget, or by installing a key binding using the gtk:widget-class-add-binding function, or by
adding accelerators to global actions using the gtk:application-accels-for-action function. But it is possible to
create your own shortcut controller, and add shortcuts to it. The gtk:shortcut-controller class implements the g:list-model interface for querying the shortcuts that have been added to it. GtkShortcutController as a GtkBuildableThe gtk:shortcut-controller object can be created in UI files to set up shortcuts in the same place as the widgets. An example of a UI definition fragment with a gtk:shortcut-controller object:<object class='GtkButton'> <child> <object class='GtkShortcutController'> <property name='scope'>managed</property> <child> <object class='GtkShortcut'> <property name='trigger'><Control>k</property> <property name='action'>activate</property> </object> </child> </object> </child> </object>This example creates a gtk:activate-action object for triggering the activate signal of the gtk:button widget. See the gtk:shortcut-action-parse-string function for the syntax for other kinds of gtk:shortcut-action objects. See the gtk:shortcut-trigger-parse-string function to learn more about the syntax for triggers. | Returned bySlot Access Functions
Inherited Slot Access Functions
See also |
2023-7-23