Input
Which tool works depends on your display server: xclip , xsel , and xdotool are for X11, while wl-copy , wtype are for Wayland. ydotool works on both because it injects events at the kernel level (it needs the ydotoold daemon running and root or uinput access).
Copy a file or command output to the clipboard, and paste it back out. xsel does the same job with slightly different flags.X11 has two clipboards: the regular one (-sel clip , pasted with Ctrl+V) and the primary selection (pasted with the middle mouse button).
Move to an absolute screen position, or relative to the current position. $ xdotool mousemove_relative [x] [y] $ ydotool mousemove --absolute [x] [y]
xdotool numbers buttons 1 (left), 2 (middle), 3 (right). ydotool uses button codes: 0xC0 left, 0xC1 right, 0xC2 middle.
xdotool and wtype accept key names. ydotool uses Linux keycodes with :1 for press and :0 for release, so Escape (keycode 1) is 1:1 1:0 .Find keycodes for ydotool in /usr/include/linux/input-event-codes.h, for example KEYENTER is 28 and KEY LEFTALT is 56.
Copied to clipboard