Go to index / Go to protocols

hyprland_input_capture_v1 ↗

Bridge input capture to the compositor

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

hyprland_input_capture_v1
hyprland_input_capture_manager_v1

Version 2

manage input capture sessions

This interface allows to create an input capture session.

hyprland_input_capture_manager_v1
request create_session(
    session: new_id<hyprland_input_capture_v1>,
    handle: string,
)

    create a input capture session

    Create a input capture session.

    hyprland_input_capture_v1
    hyprland_input_capture_v1

    Version 2

    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.

    hyprland_input_capture_v1
    request clear_barriers()

      clear every barriers registered

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

      hyprland_input_capture_v1
      request add_barrier(
          zone_set: uint,
          id: uint,
          x1: uint,
          y1: uint,
          x2: uint,
          y2: uint,
      )
      • zone_set — The current zone_set
      • id — The zone id

      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.

      hyprland_input_capture_v1
      request enable()

        enable input capturing

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

        hyprland_input_capture_v1
        request disable()

          disable input capturing

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

          hyprland_input_capture_v1
          request release(
              activation_id: uint,
              x: fixed,
              y: fixed,
          )
          • activation_id — The activation id provided when activated is called
          • x — the x position of the cursor
          • y — 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.

          hyprland_input_capture_v1
          event eis_fd(
              fd: fd,
          )
          • fd — 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

          hyprland_input_capture_v1
          event disabled()

            disable the session

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

            hyprland_input_capture_v1
            event activated(
                activation_id: uint,
                x: fixed,
                y: fixed,
                barrier_id: uint,
            )
            • activation_id — Same number used in eis start_emulating to allow synchronisation
            • x — the x position of the cursor
            • y — the y position of the cursor
            • barrier_id — the is of the barrier that have been triggered

            inputs has been captured

            Called when the application is about to receive inputs

            hyprland_input_capture_v1
            event deactivated(
                activation_id: uint,
            )
            • activation_id — 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

            hyprland_input_capture_v1
            request destroy()
            DestructorAvailable since version 2

              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.

              hyprland_input_capture_v1
              enum error {
                  invalid_barrier_id = 0,
                  invalid_barrier = 1,
                  invalid_activation_id = 2,
              }
              • invalid_barrier_id — The barrier id already exist
              • invalid_barrier — The barrier coordinates are invalid
              • invalid_activation_id — The activation id provided is invalid