Skip to content

feat(linux): add ydotool support for paste on Wayland#1425

Open
srix wants to merge 1 commit intoEpicenterHQ:mainfrom
srix:feat/linux-wayland-ydotool-paste
Open

feat(linux): add ydotool support for paste on Wayland#1425
srix wants to merge 1 commit intoEpicenterHQ:mainfrom
srix:feat/linux-wayland-ydotool-paste

Conversation

@srix
Copy link
Copy Markdown

@srix srix commented Feb 25, 2026

Summary

  • Adds system.useYdotool setting for Linux Wayland users where enigo cannot simulate keystrokes into other windows
  • When enabled, uses ydotool key ctrl+v to simulate paste instead of enigo, enabling paste in native Wayland apps (Konsole, VS Code, Cursor, KWrite, etc.)
  • Falls back to enigo when the setting is disabled or ydotool is unavailable
  • Also updates tauri-plugin-http to 2.5.7 and adds app data paths to the asset protocol scope for WAV file playback on Linux

Configuration

The system.useYdotool setting defaults to false. Linux Wayland users who need this should:

  1. Install ydotool: sudo apt install ydotool
  2. Set system.useYdotool to true in their settings (whispering-settings in localStorage)

No UI toggle has been added yet. When the setting is false (default), the original enigo behavior is unchanged on all platforms.

Context

On Linux with Wayland (especially KDE Plasma), enigo cannot inject keyboard events into other windows due to Wayland's security model. wtype also doesn't work on KDE as it lacks wlr-virtual-keyboard protocol support. ydotool works at the kernel level via /dev/uinput, making it compatible with all compositors and apps.

Test plan

  • Verify paste works on Linux Wayland (KDE) with setting enabled and ydotool installed
  • Verify paste still works on macOS and Windows (no behavior change, setting defaults to false)
  • Verify paste works on Linux X11 with setting disabled (enigo, default behavior)
  • Verify simulate_enter_keystroke works with ydotool enabled

On Linux Wayland (especially KDE Plasma), enigo cannot inject keyboard
events into other windows. This adds an opt-in system.useYdotool setting
(default false) that uses ydotool to simulate Ctrl+V instead of enigo,
enabling paste in native Wayland apps like Konsole, VS Code, and Cursor.

Falls back to enigo when the setting is disabled or ydotool is unavailable.

Also updates tauri-plugin-http to 2.5.7 and adds app data paths to the
asset protocol scope for WAV file playback on Linux.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant