## GtkShortcutsShortcut GtkShortcutsShortcut — Represents a keyboard shortcut in a GtkShortcutsWindow |

## Properties

GtkSizeGroup * | accel-size-group | Write
gchar * | accelerator | Read / Write
gchar * | action-name | Read / Write
GtkTextDirection | direction | Read / Write
GIcon * | icon | Read / Write
gboolean | icon-set | Read / Write
GtkShortcutType | shortcut-type | Read / Write
gchar * | subtitle | Read / Write
gboolean | subtitle-set | Read / Write
gchar * | title | Read / Write
GtkSizeGroup * | title-size-group | Write

## Types and Values

| GtkShortcutsShortcut
enum | GtkShortcutType

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GtkWidget
                ╰── GtkContainer
                    ╰── GtkBox
                        ╰── GtkShortcutsShortcut

## Implemented Interfaces

GtkShortcutsShortcut implements AtkImplementorIface, GtkBuildable and GtkOrientable.

## Includes

    #include <gtk/gtk.h>

## Description

A GtkShortcutsShortcut represents a single keyboard shortcut or gesture with a short text. This widget is only meant to be used with GtkShortcutsWindow.

## Functions

## Types and Values

### GtkShortcutsShortcut

    typedef struct _GtkShortcutsShortcut GtkShortcutsShortcut;

### enum GtkShortcutType

GtkShortcutType specifies the kind of shortcut that is being described. More values may be added to this enumeration over time.

#### Members

GTK_SHORTCUT_ACCELERATOR | The shortcut is a keyboard accelerator. The “accelerator” property will be used. |
GTK_SHORTCUT_GESTURE_PINCH | The shortcut is a pinch gesture. GTK+ provides an icon and subtitle. |
GTK_SHORTCUT_GESTURE_STRETCH | The shortcut is a stretch gesture. GTK+ provides an icon and subtitle. |
GTK_SHORTCUT_GESTURE_ROTATE_CLOCKWISE | The shortcut is a clockwise rotation gesture. GTK+ provides an icon and subtitle. |
GTK_SHORTCUT_GESTURE_ROTATE_COUNTERCLOCKWISE | The shortcut is a counterclockwise rotation gesture. GTK+ provides an icon and subtitle. |
GTK_SHORTCUT_GESTURE_TWO_FINGER_SWIPE_LEFT | The shortcut is a two-finger swipe gesture. GTK+ provides an icon and subtitle. |
GTK_SHORTCUT_GESTURE_TWO_FINGER_SWIPE_RIGHT | The shortcut is a two-finger swipe gesture. GTK+ provides an icon and subtitle. |
GTK_SHORTCUT_GESTURE | The shortcut is a gesture. The “icon” property will be used. |

Since: 3.20

## Property Details

### The `“accel-size-group”` property

      “accel-size-group”         GtkSizeGroup *

The size group for the accelerator portion of this shortcut.

This is used internally by GTK+, and must not be modified by applications.

Owner: GtkShortcutsShortcut

Flags: Write

### The `“accelerator”` property

      “accelerator”              gchar *

The accelerator(s) represented by this object. This property is used if “shortcut-type” is set to GTK_SHORTCUT_ACCELERATOR.

The syntax of this property is (an extension of) the syntax understood by `gtk_accelerator_parse()`. Multiple accelerators can be specified by separating them with a space, but keep in mind that the available width is limited. It is also possible to specify ranges of shortcuts, using ... between the keys. Sequences of keys can be specified using a + or & between the keys.

Examples:

- A single shortcut: <ctl><alt>delete

- Two alternative shortcuts: <shift>a Home

- A range of shortcuts: <alt>1...<alt>9

- Several keys pressed together: Control_L&Control_R

- A sequence of shortcuts or keys: <ctl>c+<ctl>x

Use + instead of & when the keys may (or have to be) pressed sequentially (e.g use t+t for 'press the t key twice').

Note that <, > and & need to be escaped as <, > and & when used in .ui files.

Owner: GtkShortcutsShortcut

Flags: Read / Write

Default value: NULL

### The `“action-name”` property

      “action-name”              gchar *

A detailed action name. If this is set for a shortcut of type `GTK_SHORTCUT_ACCELERATOR`, then GTK+ will use the accelerators that are associated with the action via `gtk_application_set_accels_for_action()`, and setting “accelerator” is not necessary.

Owner: GtkShortcutsShortcut

Flags: Read / Write

Default value: NULL

Since: 3.22

### The `“direction”` property

      “direction”                GtkTextDirection

The text direction for which this shortcut is active. If the shortcut is used regardless of the text direction, set this property to GTK_TEXT_DIR_NONE.

Owner: GtkShortcutsShortcut

Flags: Read / Write

Default value: GTK_TEXT_DIR_NONE

### The `“icon”` property

      “icon”                     GIcon *

An icon to represent the shortcut or gesture. This property is used if “shortcut-type” is set to GTK_SHORTCUT_GESTURE. For the other predefined gesture types, GTK+ provides an icon on its own.

Owner: GtkShortcutsShortcut

Flags: Read / Write

### The `“icon-set”` property

      “icon-set”                 gboolean

`TRUE` if an icon has been set.

Owner: GtkShortcutsShortcut

Flags: Read / Write

Default value: FALSE

### The `“shortcut-type”` property

      “shortcut-type”            GtkShortcutType

The type of shortcut that is represented.

Owner: GtkShortcutsShortcut

Flags: Read / Write

Default value: GTK_SHORTCUT_ACCELERATOR

### The `“subtitle”` property

      “subtitle”                 gchar *

The subtitle for the shortcut or gesture.

This is typically used for gestures and should be a short, one-line text that describes the gesture itself. For the predefined gesture types, GTK+ provides a subtitle on its own.

Owner: GtkShortcutsShortcut

Flags: Read / Write

Default value: ""

### The `“subtitle-set”` property

      “subtitle-set”             gboolean

`TRUE` if a subtitle has been set.

Owner: GtkShortcutsShortcut

Flags: Read / Write

Default value: FALSE

### The `“title”` property

      “title”                    gchar *

The textual description for the shortcut or gesture represented by this object. This should be a short string that can fit in a single line.

Owner: GtkShortcutsShortcut

Flags: Read / Write

Default value: ""

### The `“title-size-group”` property

      “title-size-group”         GtkSizeGroup *

The size group for the textual portion of this shortcut.

This is used internally by GTK+, and must not be modified by applications.

Owner: GtkShortcutsShortcut

Flags: Write