diff options
| author | 2026-10-27 04:05:07 +0100 | |
|---|---|---|
| committer | 2026-10-27 04:40:32 +0100 | |
| commit | 0bc344b0d4a490d91d3a7e5e0cbe6481a4e88ab4 (patch) | |
| tree | 45316a01ae17151f33d267abaa57680ddd713e26 /kwin-type.1 | |
| parent | Initial commit (diff) | |
| download | kwin-type-master.tar.xz kwin-type-master.zip | |
Rather than using the fake-input Wayland protocol, use the private KWin
D-Bus endpoint, org.kde.KWin.EIS.RemoteDesktop, which can give us a fd
to pass to libei, without needing portals.
libei then lets us send 254 bytes of UTF-8 at a time. So we do a little
bit of shuffling to make sure we're not in the middle of a UTF-8 string.
Diffstat (limited to '')
| -rw-r--r-- | kwin-type.1 | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/kwin-type.1 b/kwin-type.1 index 3a51a4a..3869103 100644 --- a/kwin-type.1 +++ b/kwin-type.1 @@ -12,17 +12,12 @@ kwin-type \- type text from standard input using KWin .SH DESCRIPTION .B kwin-type -reads UTF-8 text from standard input and types it into the focused application -using KWin's fake input protocol. It takes no command-line arguments. +reads UTF-8 text from standard input and types it into the focused application. +It takes no command-line arguments. NUL bytes and invalid UTF-8 are rejected. -Each character is sent as a key press and release. Newlines are sent as Enter -key presses. If caps lock is enabled, it is temporarily disabled and restored -on exit. - -The compositor must provide version 6 or later of -.I org_kde_kwin_fake_input -and version 1 or later of -.IR org_kde_kwin_keystate . +The compositor must provide +.I org.kde.KWin.EIS.RemoteDesktop +on the session D-Bus and support EIS text input. .SH EXAMPLES @@ -30,7 +25,7 @@ Type the contents of a file into the focused application: \fB $ kwin-type < text.txt\fP -Type a line of text, followed by Enter: +Type a line of text, including a trailing newline: \fB $ printf \(aqHello, world!\en\(aq | kwin-type\fP @@ -41,8 +36,7 @@ Wait two seconds before typing, allowing time to focus another window: .SH EXIT STATUS .B kwin-type -exits with status 0 on success, 1 on error, or 128 plus the signal number when -interrupted by SIGINT, SIGTERM, or SIGHUP. +exits with status 0 on success. .SH AUTHOR .B kwin-type |
