GlobalShortcut: QtObject
import Quickshell.Hyprland
Hyprland global shortcut. More
Properties
Signals
Detailed Description
Global shortcut implemented with hyprland_global_shortcuts_v1.
You can use this within hyprland as a global shortcut:
bind = <modifiers>, <key>, global, <appid>:<name>
See the wiki for details.
The shortcuts protocol does not allow duplicate appid + name pairs. Within a single instance of quickshell this is handled internally, and both users will be notified, but multiple instances of quickshell or XDPH may collide.
If that happens, whichever client that tries to register the shortcuts last will crash.
Property Details
appid: string
The appid of the shortcut. Defaults to quickshell
.
You cannot change this at runtime.
If you have more than one shortcut we recommend subclassing GlobalShortcut to set this.
description: string
The description of the shortcut that appears in hyprctl globalshortcuts
.
You cannot change this at runtime.
name: string
The name of the shortcut. You cannot change this at runtime.
pressed: bool
If the keybind is currently pressed.
triggerDescription: string
Have not seen this used ever, but included for completeness. Safe to ignore.
Signal Details
pressed()
Fired when the keybind is pressed.
released()
Fired when the keybind is released.