Hyprland input capture

Bridge input capture to the compositor

This protocol is a bridge of the XDG input capture to the compositor.

manage input capture sessions

This interface allows to create an input capture session.

create_session(session: new_id<hyprland_input_capture_v1>, handle: string)
Argument
Type
Description
sessionnew_id<hyprland_input_capture_v1>
handlestring
create a input capture session

Create a input capture session.


close reproduction of the xdg input capture portal

Interface that is used to create barrier, and trigger capture and release of the pointer. The inputs are sent through an EIS socket, when the cursor hit a barrier. Barriers can only be placed on screen edges and need to be a straight line that cover one corner to another.

clear_barriers()
clear every barriers registered

Remove every barriers from the session, new barriers need to be send before calling enable again.

add_barrier(zone_set: uint, id: uint, x1: uint, y1: uint, x2: uint, y2: uint)
Argument
Type
Description
zone_setuint
The current zone_set
iduint
The zone id
x1uint
y1uint
x2uint
y2uint
add one barrier

Add one barrier to the current session, the barrier need to a line placed on the edge of the screen, and is a straight line from one corner to another.

enable()
enable input capturing

Enable the input capturing to be triggered by the cursor crossing a barrier.

disable()
disable input capturing

Disable input capturing, the crossing of a barrier will not trigger anymore input capture.

release(activation_id: uint, x: fixed, y: fixed)
Argument
Type
Description
activation_iduint
The activation id provided when activated is called
xfixed
the x position of the cursor
yfixed
the y position of the cursor
release input capturing

Release input capturing, the input are not intercepted anymore and barrier crossing will activate it again. If x != -1 and y != -1 then the cursor is warped to the x and y coordinates.

destroy
Type: destructorsince 2
destroy()
destroy the session

Destroy the input capture session.

Any barriers registered by this session are removed, input capturing is stopped, and the eis socket associated with this session is closed by the compositor. The client must not use the object after this request.

eis_fd(fd: fd)
Argument
Type
Description
fdfd
eis socket file descriptor
eis file descriptor

This event provide the file descriptor of an eis socket where inputs will be sent when input capturing is active

disabled()
disable the session

Called when the application will not receive captured input. The application can call enable to request future input capturing

activated(activation_id: uint, x: fixed, y: fixed, barrier_id: uint)
Argument
Type
Description
activation_iduint
Same number used in eis start_emulating to allow synchronisation
xfixed
the x position of the cursor
yfixed
the y position of the cursor
barrier_iduint
the is of the barrier that have been triggered
inputs has been captured

Called when the application is about to receive inputs

deactivated(activation_id: uint)
Argument
Type
Description
activation_iduint
same activation id of the latest activated event
pointer motion

Called when input capture is stopped, and inputs are no longer sent to the application

Argument
Value
Description
invalid_barrier_id0
The barrier id already exist
invalid_barrier1
The barrier coordinates are invalid
invalid_activation_id2
The activation id provided is invalid

Compositor Support

hyprland_input_capture_manager_v1↓
Compositors
CageCage0.3.0
x
COSMICCOSMIC1.11.0
x
flakewm3.0.5
2
GameScopeGameScope3.17.0
x
HyprlandHyprland0.57.2
2
Jay1.14.0
x
KWinKWin6.7
x
LabwcLabwc0.20.2
x
LouvreLouvre2.14.1
x
MangoMango0.16.3
x
MirMir2.26
x
MuffinMuffin6.7.4
x
MutterMutter51
x
niriniri26.04
x
phocphoc0.55
x
Pila0.5.1
x
QtileQtile0.37.1
x
riverriver0.5.0
x
SwaySway1.11
x
TreelandTreeland0.8.0
x
WayfireWayfire0.9.0
x
WestonWeston15.0.1
x

Copyright © 2025 Fl0w

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.