kwtypr is KWtype, but blazingly fast™.
It types text through KWin's privileged Fake Input protocol, so it only works on KDE Plasma Wayland and requires an installed desktop entry with org_kde_kwin_fake_input. Character mapping is derived from the compositor-provided XKB keymap.
- KDE Plasma on Wayland
- An installed desktop entry declaring
org_kde_kwin_fake_input justfor the recommended install flow
If you do not have just yet, install it first using the official installation instructions.
After installing just, you can just run:
just installThis builds kwtypr, installs the binary to ~/.local/bin/kwtypr, installs the desktop entry to ~/.local/share/applications/kwtypr.desktop, and refreshes KDE's desktop cache so KWin picks up the required fake-input permission.
If ~/.local/bin is not on your PATH, add it before trying to run kwtypr.
Shell completions are not installed automatically. See Shell Completions below.
For a different prefix, for example a system-wide install under /usr/local, run:
sudo just install prefix=/usr/localTo remove an installation:
just uninstallkwtypr [OPTIONS] <TEXT>...Positional arguments are joined with spaces before typing.
By default, kwtypr aims for maximum throughput: --initial-delay 0, no chunk pacing, and --key-hold 0, with no extra Wayland flushes before the final roundtrip. --ready-timeout defaults to 5000, and Unicode fallback is disabled unless --unicode-fallback is passed.
Timing and compatibility options:
--initial-delay <MS>: wait before typing starts, default0--character-delay <MS>: wait after each typed character; shorthand for--chunk-size 1 --chunk-delay <MS>--key-delay <MS>: alias for--character-delayfor KWtype compatibility--chunk-size <N>: type text in chunks ofNinput characters--chunk-delay <MS>: wait after each typed chunk--key-hold <MS>: hold each key before release, default0--unicode-fallback: enableCtrl+Shift+UUnicode input fallback--ready-timeout <MS>: fail if Wayland initialization takes too long, default5000(0disables the timeout)
kwtypr can generate shell completions at runtime:
kwtypr completions bashYou can install the generated completions manually. Common locations are:
kwtypr completions bash > ~/.local/share/bash-completion/completions/kwtypr
kwtypr completions zsh > ~/.local/share/zsh/site-functions/_kwtypr
kwtypr completions fish > ~/.config/fish/completions/kwtypr.fishAvailable shells depend on what clap_complete supports for the installed version. Run kwtypr completions --help for the current list.
kwtyprjoins positional arguments with spaces, sokwtypr hello worldtypeshello world.kwtyprdefaults to maximum-throughput typing with no artificial delays, no key hold, and no extra flushes before the final roundtrip.kwtyprsupports chunked pacing via--chunk-sizeand--chunk-delay.--character-delayis shorthand for one-character chunks.- Unicode fallback is not enabled by default. Pass
--unicode-fallbackif you wantCtrl+Shift+Ufallback for characters that cannot be typed directly with the current layout. - If typing completes but some characters could not be mapped,
kwtyprkeeps going, reports the failures, and exits with code2.
0: all requested characters were typed1: initialization or Wayland I/O failed2: typing completed, but one or more characters could not be typed with the current layout
If some applications miss the first character, or the typed text does not appear reliably, add a small initial delay:
kwtypr --initial-delay 1 "example text"In practice, an initial delay of 1 millisecond appears to fix input in Google Chrome in setups where Chromium works without it.
If an application behaves better when text arrives in chunks rather than all at once, add chunk pacing explicitly:
kwtypr --chunk-size 16 --chunk-delay 10 "example text"Smaller chunk sizes and longer chunk delays may improve compatibility at the cost of throughput.
If a character cannot be typed directly with the current layout, enable Unicode fallback explicitly:
kwtypr --unicode-fallback "..."If kwtypr still reports that a character could not be typed, check whether the current keyboard layout provides the keys needed for that fallback sequence.