Shortcut
Superclasses: Object
- Constructors:
Shortcut(**properties)
new(trigger:Gtk.ShortcutTrigger=None, action:Gtk.ShortcutAction=None) -> Gtk.Shortcut
Constructors
- class Shortcut
- classmethod new(trigger: ShortcutTrigger | None = None, action: ShortcutAction | None = None) Shortcut
Creates a new
GtkShortcut
that is triggered bytrigger
and then activatesaction
.- Parameters:
trigger – The trigger that will trigger the shortcut
action – The action that will be activated upon triggering
Methods
- class Shortcut
- get_action() ShortcutAction | None
Gets the action that is activated by this shortcut.
- get_trigger() ShortcutTrigger | None
Gets the trigger used to trigger
self
.
- set_action(action: ShortcutAction | None = None) None
Sets the new action for
self
to beaction
.- Parameters:
action – The new action. If the
action
isNone
, the nothing action will be used.
- set_arguments(args: Variant | None = None) None
Sets the arguments to pass when activating the shortcut.
- Parameters:
args – arguments to pass when activating
self
- set_trigger(trigger: ShortcutTrigger | None = None) None
Sets the new trigger for
self
to betrigger
.- Parameters:
trigger – The new trigger. If the
trigger
isNone
, the never trigger will be used.
Properties
- class Shortcut
- props.action: ShortcutAction
The action that gets activated by this shortcut.
- props.trigger: ShortcutTrigger
The trigger that triggers this shortcut.