Shortcut

open class Shortcut(pointer: <Error class: unknown class><<Error class: unknown class>>)

A GtkShortcut describes a keyboard shortcut.

It contains a description of how to trigger the shortcut via a class@Gtk.ShortcutTrigger and a way to activate the shortcut on a widget via a class@Gtk.ShortcutAction.

The actual work is usually done via class@Gtk.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 GtkWidgets 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.

Constructors

Link copied to clipboard
constructor(trigger: ShortcutTrigger? = null, action: ShortcutAction? = null)

Creates a new GtkShortcut that is triggered by

constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The action that gets activated by this shortcut.

Link copied to clipboard
open var arguments: <Error class: unknown class>?

Arguments passed to activation.

Link copied to clipboard
val gtkShortcutPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard

The trigger that triggers this shortcut.

Functions

Link copied to clipboard

Gets the action that is activated by this shortcut.

Link copied to clipboard
open fun getArguments(): <Error class: unknown class>?

Gets the arguments that are passed when activating the shortcut.

Link copied to clipboard

Gets the trigger used to trigger @self.

Link copied to clipboard
open fun setAction(action: ShortcutAction? = null)

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

Link copied to clipboard
open fun setArguments(args: <Error class: unknown class>? = null)

Sets the arguments to pass when activating the shortcut.

Link copied to clipboard
open fun setTrigger(trigger: ShortcutTrigger? = null)

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