Bug 474469 - (Custom Shortcut) command execution has a slight delay on shortcut pressed
Summary: (Custom Shortcut) command execution has a slight delay on shortcut pressed
Status: CONFIRMED
Alias: None
Product: frameworks-kglobalaccel
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.109.0
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-13 03:26 UTC by unblended_icing552
Modified: 2023-09-13 17:48 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description unblended_icing552 2023-09-13 03:26:43 UTC
SUMMARY
On Plasma **Wayland** session, custom shortcut command executes with a slight delay instead of instantaneously.

STEPS TO REPRODUCE
1. Install `ydotool` https://github.com/ReimuNotMoe/ydotool and setup uinput permission correctly
2. Start `ydotoold` as current user
3. In Shortcuts Settings page, select "Add Command"
4. `ydotool mousemove -- 0 -50`
5. Assign a shortcut to the command
6. Press that shortcut

OBSERVED RESULT
Mouse cursor position moves with a slight delay.

EXPECTED RESULT
Mouse cursor position should move right after the shortcut is pressed, similar to when it's executed in a terminal emulator like Konsole.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 2.27.7
KDE Frameworks Version: 5.109.0
Qt Version: 5.15.10

ADDITIONAL INFORMATION
It's Wayland session instead of X11 session.

`ydotoold` needs to be running as current user. To setup uinput permission:
```bash
cat << 'EOF' | sudo tee /etc/udev/rules.d/99-uinput.rules > /dev/null
KERNEL=="uinput", GROUP="input", MODE="0660"
EOF
sudo udevadm control --reload-rules
sudo udevadm trigger /dev/uinput
sudo usermod -aG input $USER
```
Comment 1 Nate Graham 2023-09-13 17:36:49 UTC
Can you reproduce the issue with other scripts not using ydotool? It's as instant as I can perceive with other commands.
Comment 2 Fushan Wen 2023-09-13 17:48:12 UTC
Reproducible with notify-send