Hyprland input capture
This protocol is a bridge of the XDG input capture to the compositor.
hyprland_input_capture_manager_v1
This interface allows to create an input capture session.
create_session(session: new_id<hyprland_input_capture_v1>, handle: string)
Argument | Type | Description |
|---|---|---|
| session | new_id<hyprland_input_capture_v1> | |
| handle | string |
Create a input capture session.
hyprland_input_capture_v1
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()
Remove every barriers from the session, new barriers need to be send before calling enable again.
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 the input capturing to be triggered by the cursor crossing a barrier.
disable()
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_id | uint | The activation id provided when activated is called |
| x | fixed | the x position of the cursor |
| y | fixed | the y position of the cursor |
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()
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 |
|---|---|---|
| fd | fd | eis socket file descriptor |
This event provide the file descriptor of an eis socket where inputs will be sent when input capturing is active
disabled()
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_id | uint | Same number used in eis start_emulating to allow synchronisation |
| x | fixed | the x position of the cursor |
| y | fixed | the y position of the cursor |
| barrier_id | uint | the is of the barrier that have been triggered |
Called when the application is about to receive inputs
deactivated(activation_id: uint)
Argument | Type | Description |
|---|---|---|
| activation_id | uint | same activation id of the latest activated event |
Called when input capture is stopped, and inputs are no longer sent to the application
error { invalid_barrier_id, invalid_barrier, invalid_activation_id }
Argument | Value | Description |
|---|---|---|
| invalid_barrier_id | 0 | The barrier id already exist |
| invalid_barrier | 1 | The barrier coordinates are invalid |
| invalid_activation_id | 2 | The activation id provided is invalid |
Compositor Support
| hyprland_input_capture_manager_v1 | ↓ | ||
| Compositors | |||
| Cage | 0.3.0 | x | |
| COSMIC | 1.11.0 | x | |
| flakewm | 3.0.5 | 2 | |
| GameScope | 3.17.0 | x | |
| Hyprland | 0.57.2 | 2 | |
| Jay | 1.14.0 | x | |
| KWin | 6.7 | x | |
| Labwc | 0.20.2 | x | |
| Louvre | 2.14.1 | x | |
| Mango | 0.16.3 | x | |
| Mir | 2.26 | x | |
| Muffin | 6.7.4 | x | |
| Mutter | 51 | x | |
| niri | 26.04 | x | |
| phoc | 0.55 | x | |
| Pila | 0.5.1 | x | |
| Qtile | 0.37.1 | x | |
| river | 0.5.0 | x | |
| Sway | 1.11 | x | |
| Treeland | 0.8.0 | x | |
| Wayfire | 0.9.0 | x | |
| Weston | 15.0.1 | x | |
Copyright
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.