gtk.shortcut
Module for [Shortcut] class
Types 3
A [gtk.shortcut.Shortcut] describes a keyboard shortcut.
It contains a description of how to trigger the shortcut via a [gtk.shortcut_trigger.ShortcutTrigger] and a way to activate the shortcut on a widget via a [gtk.shortcut_action.ShortcutAction].
The actual work is usually done via [gtk.shortcut_controller.ShortcutController], which decides if and when to activate a shortcut. Using that controller directly however is rarely necessary as various higher level convenience APIs exist on [gtk.widget.Widget]s that make it easier to use shortcuts in GTK.
[gtk.shortcut.Shortcut] does provide functionality to make it easy for users to work with shortcuts, either by providing informational strings for display purposes or by allowing shortcuts to be configured.
ShortcutGidBuilder builder()Get builder for [gtk.shortcut.Shortcut] Returns: New builder objectgtk.shortcut_action.ShortcutAction action() @propertyGet `action` property. Returns: The action that gets activated by this shortcut.void action(gtk.shortcut_action.ShortcutAction propval) @propertySet `action` property. Params: propval = The action that gets activated by this shortcut.glib.variant.Variant arguments() @propertyGet `arguments` property. Returns: Arguments passed to activation.void arguments(glib.variant.Variant propval) @propertySet `arguments` property. Params: propval = Arguments passed to activation.gtk.shortcut_trigger.ShortcutTrigger trigger() @propertyGet `trigger` property. Returns: The trigger that triggers this shortcut.void trigger(gtk.shortcut_trigger.ShortcutTrigger propval) @propertySet `trigger` property. Params: propval = The trigger that triggers this shortcut.gtk.shortcut_action.ShortcutAction getAction()Gets the action that is activated by this shortcut. Returns: the actionglib.variant.Variant getArguments()Gets the arguments that are passed when activating the shortcut. Returns: the argumentsgtk.shortcut_trigger.ShortcutTrigger getTrigger()Gets the trigger used to trigger self. Returns: the trigger usedvoid setAction(gtk.shortcut_action.ShortcutAction action = null)Sets the new action for self to be action.void setArguments(glib.variant.Variant args = null)Sets the arguments to pass when activating the shortcut.void setTrigger(gtk.shortcut_trigger.ShortcutTrigger trigger = null)Sets the new trigger for self to be trigger.this(gtk.shortcut_trigger.ShortcutTrigger trigger = null, gtk.shortcut_action.ShortcutAction action = null)Creates a new [gtk.shortcut.Shortcut] that is triggered by trigger and then activates action.T action(gtk.shortcut_action.ShortcutAction propval)Set `action` property. Params: propval = The action that gets activated by this shortcut. Returns: Builder instance for fluent chainingT arguments(glib.variant.Variant propval)Set `arguments` property. Params: propval = Arguments passed to activation. Returns: Builder instance for fluent chainingT trigger(gtk.shortcut_trigger.ShortcutTrigger propval)Set `trigger` property. Params: propval = The trigger that triggers this shortcut. Returns: Builder instance for fluent chaining