Sending keyboard input to an inactive window on Wayland

yue.dongchen

New Member
Joined
Mar 17, 2023
Messages
2
Reaction score
0
Credits
21
When learning languages from videos, I use a drawing tablet to take notes on one monitor, and a video in Celluloid (mpv front-end) on another monitor. I have mapped physical buttons to mpris2 media controls (play/pause, seek), but I'm looking to also trigger some keybindings of a lua script that takes extracts from the video, so that I can use the excerpts for later review. If I were on xorg it seems xdotools can send keystrokes to that particular Celluloid window. Is there a way to achieve this on Wayland?

Many thanks

PS I have just heard about the IPC protocol, but I'm not sure whether it's relevant.
 


I found the command/function names in the lua scripts. If I'm understanding correctly I can issue those commands via json-ipc. Seems promising.
 
ydotool seems similar to xdotool except that it supports Wayland. Maybe that's something to look at.
 

Staff online


Latest posts

Top