Skip to content

atx/wtype

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 * Fix some unicode characters being converted to wrong keysyms (such as γ and other greek characters)
 * Drop reallocarray (for musl builds)
 * Do not parse the - stdin placeholder if it appears after --
 * Document stdin input
 * Add the -d switch to specify a delay between keystrokes
d71be3a

Git stats

Files

Permalink
Failed to load latest commit information.

wtype

xdotool type for wayland

Packaging status

Building

meson build
ninja -C build
sudo ninja -C build install

Usage

# Type unicode characters
wtype ∇⋅∇ψ = ρ

To press/release modifiers, -M/-m can be used respectively.

# Press Ctrl+C
wtype -M ctrl c -m ctrl

To alter delay between keystrokes, -d.

# delay of 0 when typing "foo", 120ms on "bar"
wtype foo -d 120 bar

# also applied on stdin
echo everything | wtype -d 12 -

To press/release a named key (as given by xkb_keysym_get_name), -P/-p can be used.

# Press and release the Left key
wtype -P left -p left

Note that when wtype terminates, all the pressed keys/modifiers get released, as the compositor destroys the associated virtual keyboard object. To help performing a more complicated sequence of key presses, -s can be used to insert delays into the stream of key events.

# Hold the Right key for 1000ms
wtype -P right -s 1000 -p right