Skip to content

[Wayland/KDE 6] Global shortcut fails to toggle main window - SyntaxError in Wayland Support script #3513

@gedmtr

Description

@gedmtr

Describe the bug
On KDE Plasma 6 (Wayland), attempting to use a global shortcut to show/hide the CopyQ main window fails after a recent system update that upgraded KDE Plasma / Qt components.
The shortcut was registered in KDE's native System Settings > Shortcuts (binding to CopyQ) and was working perfectly fine until the update. Now, pressing it does nothing. Looking at the CopyQ log, it continuously throws a syntax error related to the internal Wayland Support script, as well as a kdotool error, whenever the shortcut is triggered.
Note: The CopyQ "Wayland Support" command is installed, but with a small modification to support pasting in KDE native apps (Kate, KWrite, Dolphin...). I changed the key codes from Shift+Insert (42/110) to Ctrl+V (29/47):

    // changed key codes from Shift+Insert (42/110) to Ctrl+V (29/47).
    global.paste = function() {
        sendShortcut('29:1', '47:1', '47:0', '29:0')
    }

To Reproduce

  1. Install the "Wayland Support" script in CopyQ and apply the Ctrl+V modification mentioned above.
  2. Register a global shortcut to toggle CopyQ via KDE Plasma's System Settings > Shortcuts.
  3. Perform a system update that upgrades KDE Plasma/KWin/Qt to the versions listed below.
  4. Press the assigned global shortcut.
  5. The window does not appear, and errors are written to the log.

Expected behavior
The CopyQ main window should correctly toggle (show/hide) when the assigned global shortcut is pressed, without throwing script or kdotool errors in the background.

Version, OS and Environment

  • copyq version :
    CopyQ Clipboard Manager 13.0.0
    Qt: 6.10.1
    KNotifications: 6.20.0
    Compiler: GCC
    Arch: x86_64-little_endian-lp64
    OS: Fedora Linux 43 (KDE Plasma Desktop Edition)

  • RPM:
    copyq-13.0.0-3.fc43.x86_64

  • System Info Center Details:
    Operating System: Fedora Linux 43
    KDE Plasma Version: 6.6.3
    KDE Frameworks Version: 6.24.0
    Qt Version: 6.10.2
    Kernel Version: 6.19.9-200.fc43.x86_64 (64-bit)
    Graphics Platform: Wayland

  • Installation method : sudo dnf install copyq

Additional context
Log Output:

[2026-03-29 00:41:57.681] Note <Server-4122>: Terminating application on signal 15
[2026-03-29 00:41:57.681] Note <cmd/monitorClipboard-4304>: Terminating application on signal 15
[2026-03-29 00:41:57.703] Note <Server-4122>: Exception in command: ScriptError: Failed command kdotool: Error: No such object path '/Scripting/Script2'
[2026-03-29 00:41:57.703] Note <Server-4122>:    
[2026-03-29 00:41:57.703] Note <Server-4122>:    --- backtrace ---
[2026-03-29 00:41:57.703] Note <Server-4122>:    eval:currentWindowTitle()
[2026-03-29 00:41:57.703] Note <Server-4122>:    eval:currentClipboardOwner()
[2026-03-29 00:41:57.703] Note <Server-4122>:    eval:currentWindowTitle()
[2026-03-29 00:41:57.703] Note <Server-4122>:    eval:currentClipboardOwner()
[2026-03-29 00:41:57.703] Note <Server-4122>:    eval:currentWindowTitle()
[2026-03-29 00:41:57.703] Note <Server-4122>:    eval:currentClipboardOwner()
[2026-03-29 00:41:57.703] Note <Server-4122>:    eval(arguments[1])()
[2026-03-29 00:41:57.703] Note <Server-4122>:    --- end backtrace ---
[2026-03-29 09:29:30.553] Note <Server-14711>: Starting server: CopyQ 13.0.0
[2026-03-29 09:29:30.848] Warning <Server-14711>: [qt.qpa.services] Failed to register with host portal QDBusError("org.freedesktop.portal.Error.Failed", "Could not register app ID: Connection already associated with an application ID")
[2026-03-29 09:29:30.853] Warning <Server-14711>: [qt.qpa.services] Failed to register with host portal QDBusError("org.freedesktop.portal.Error.Failed", "Could not register app ID: Connection already associated with an application ID")

Workaround Used:
As a temporary fix to bypass the broken internal shortcut, I created a custom executable bash script (chmod +x) containing:

#!/bin/bash
copyq toggle

Save this script, make it executable (chmod +x), and bound it directly to a custom Global Shortcut using KDE Plasma's native shortcut settings (System Settings > Keyboard > Shortcuts > Add New > Command). This successfully tells the running qdbus to toggle the CopyQ window natively.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions