ShortcutHandler QML Type

The ShortcutHandler type provides a way to register global key shorcuts. More...

Import Statement: import org.kde.kwin

Properties

Signals

Detailed Description

Example usage:

ShortcutHandler {
    name: "Activate Something"
    text: i18n("Activate Something")
    sequence: "Meta+Ctrl+S"
    onActivated: doSomething()
}

Property Documentation

name : string

This property specifies the unique shortcut identifier, not localized.

The shortcut name cannot be changed once the ShortcutHandler is constructed.


sequence : variant

This property holds the key sequence for this shortcut. The key sequence can be specified using a string containing a sequence of keys that are needed to be pressed to activate the shortcut, e.g. `Meta+K`.

The key sequence is optional. If omitted, the user can assign a key sequence to this shortcut in system settings.

The key sequence cannot be changed once the ShortcutHandler is constructed.


text : string

This property specifies human readable name of the shortcut.


Signal Documentation

activated()

This signal is emitted when the shortcut is triggered.

Note: The corresponding handler is onActivated.