Products › lamco-dsi-tools › Interfaces › InputCapture portal
InputCapture portal: Sharing input between machines on Wayland
The InputCapture portal (org.freedesktop.portal.InputCapture) hands a program the keyboard and pointer at a screen edge on Wayland: Who offers it, how to check.
The InputCapture portal, org.freedesktop.portal.InputCapture, lets a program take the keyboard and pointer from a Wayland desktop when the pointer crosses a barrier at a screen edge, so that the input goes to the program and not to the desktop. Software that shares one keyboard and mouse between several machines is what it's for: The pointer runs off the edge of one screen and carries on on another computer. lamco-dsi-tools (DSI: Desktop session interfaces) records whether the portal exports InputCapture and what it offers, opens a session to read its zones and barriers, and with dsido enables it and records each activation.
What it is
It's input in the other direction from the RemoteDesktop portal. There, a program sends input into the desktop. Here, the desktop sends its own input to a program, and both use libei for the events: InputCapture's ConnectToEIS gives a libei receiver context.
A session is created with CreateSession2 (the first CreateSession is deprecated in version 2 of the interface) and asks for capabilities, keyboard, pointer or touchscreen, from the SupportedCapabilities bitmask. Start normally shows a permission dialog. The program then connects to EIS, reads the zones with GetZones, the logical screen areas the session can use, and sets pointer barriers with SetPointerBarriers. A barrier is a horizontal or vertical line on the outside edge of a zone, and the portal answers which barriers it couldn't take. Enable arms the session.
The compositor alone decides when capture becomes active. When the pointer crosses a barrier it emits Activated and sends the input over libei, and Deactivated when it stops. The program gives the input back with Release. When the monitors change, ZonesChanged says the zones and barriers have to be set again. A program can also call the Clipboard portal's RequestClipboard on the session before Start.
When input sharing doesn't start on a Wayland desktop, the portal may not export InputCapture at all, the session may have failed, or no barrier may have been accepted, in which case nothing can activate it. A capture says which.
Which desktops offered it
| Desktop | State |
|---|---|
| GNOME Shell 48.7 (Debian 13) | present |
| GNOME Shell 51.0 (Fedora 45) | present |
| KDE Plasma, KWin 6.5.6 (NixOS) | present |
| KDE Plasma, KWin 6.8.2 (KDE neon) | present |
| Sway 1.9 | not examined |
| Hyprland 0.56.2 | present |
| COSMIC, cosmic-comp 1.0.0 | absent |
| labwc 0.20.3 (Budgie session, CachyOS) | absent |
| Cinnamon Wayland session (Linux Mint) | absent |
The captures were taken on 2026-11-27 and 2026-11-28 with dsisee observe, one version of each desktop on one virtual machine, with no permission dialog answered. present means the portal exported InputCapture and no session was opened. Sway's portal wasn't running when its capture was taken, so its cell is not examined.
The README's run record lists dsido input-capture enable on Mutter 48.7, with 3 activations. No other desktop has had a session enabled.
How to check it with lamco-dsi-tools
dsisee portal diagnose --wake-portal # InputCapture's version and SupportedCapabilities, named bit by bit
dsisee input routes # every input route, in both directions
dsisee input capture --duration 10 --out ic.json # open a session (dialog): zones and barriers, not enabled
dsitell health ic.json # the InputCapture route, with findings
dsisee input capture records the interface version, the capabilities supported and granted, each zone, and the portal's answer to a barrier on every edge of every zone. It doesn't enable the session, so nothing is captured. --capabilities chooses what to ask for, from keyboard, pointer and touchscreen. In dsitell health the route is read from the portal's InputCapture interface, and from the session, zones, barriers and activations when the input capture dissector ran.
Driving it with dsido
dsido input-capture enable --duration 30 --out enable.json # enable the session (dialog), then push the pointer past an edge
dsido input-capture enable opens the same session, enables it, and records each activation the portal reports. It gives the input back at once with Release, so the desktop keeps its pointer. It's in dsido because it takes input away from the desktop, if only briefly.
Findings
INPUT-009: The InputCapture portal took no pointer barrier.INPUT-010: The InputCapture session failed.PORTAL-008: The portal frontend hadn't been started, so its routes aren't examined.
Related
- libei and the RemoteDesktop portal, input into the desktop.
- xdg-desktop-portal, the service InputCapture belongs to.
- Clipboard portal, which an InputCapture session can carry.
- dsisee reference, for
input capture. - The InputCapture portal's documentation.