Gtk.Shortcut
Description: Reference for Gtk.Shortcut

### Class

# GtkShortcut

#### Description [src]

    final class Gtk.Shortcut : GObject.Object {
      /* No available fields */
    }

A `GtkShortcut` describes a keyboard shortcut.

It contains a description of how to trigger the shortcut via a `GtkShortcutTrigger` and a way to activate the shortcut on a widget via a `GtkShortcutAction`.

The actual work is usually done via `GtkShortcutController`, 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 `GtkWidget`s that make it easier to use shortcuts in GTK.

`GtkShortcut` 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.

#### Ancestors

- GObject

#### Constructors

###### gtk_shortcut_new

Creates a new `GtkShortcut` that is triggered by `trigger` and then activates `action`.

###### gtk_shortcut_new_with_arguments

Creates a new `GtkShortcut` that is triggered by `trigger` and then activates `action` with arguments given by `format_string`.

#### Instance methods

###### gtk_shortcut_get_action

Gets the action that is activated by this shortcut.

###### gtk_shortcut_get_arguments

Gets the arguments that are passed when activating the shortcut.

###### gtk_shortcut_get_trigger

Gets the trigger used to trigger `self`.

###### gtk_shortcut_set_action

Sets the new action for `self` to be `action`.

###### gtk_shortcut_set_arguments

Sets the arguments to pass when activating the shortcut.

###### gtk_shortcut_set_trigger

Sets the new trigger for `self` to be `trigger`.

#### Properties

###### Gtk.Shortcut:action

The action that gets activated by this shortcut.

###### Gtk.Shortcut:arguments

Arguments passed to activation.

###### Gtk.Shortcut:trigger

The trigger that triggers this shortcut.

#### Class structure

    struct GtkShortcutClass {
      GObjectClass parent_class;

    }

###### Class members

`parent_class` |
    GObjectClass
| No description available.