Linux command
wtype 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Type
wtype "[Hello World]"
Example
wtype -k [Left]
Press and release
wtype -P [Left] -p [Left]
Press
wtype -M [shift|ctrl]
Release
wtype -m [ctrl]
Delay
wtype -d [500] "[text]"
Example
echo "[text]" | wtype -
说明
wtype simulates keyboard input on Wayland compositors, similar to xdotool type for X11. It can type text, press specific keys, and manage modifier states. The tool is useful for automation, testing, and scripting on Wayland systems.
参数
- -k _KEY_
- Type specific key by name
- -M _MOD_
- Press modifier key
- -m _MOD_
- Release modifier key
- -P _KEY_
- Press a named key
- -p _KEY_
- Release a named key
- -d _MS_
- Delay between keystrokes in milliseconds
- -s _MS_
- Sleep before next option (for complex sequences)
- -
- Read text from stdin
FAQ
What is the wtype command used for?
wtype simulates keyboard input on Wayland compositors, similar to xdotool type for X11. It can type text, press specific keys, and manage modifier states. The tool is useful for automation, testing, and scripting on Wayland systems.
How do I run a basic wtype example?
Run `wtype "[Hello World]"` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -k _KEY_ do in wtype?
Type specific key by name