Go to index / Go to protocols

wlr_virtual_pointer_unstable_v1 ↗

wlr_virtual_pointer_unstable_v1
zwlr_virtual_pointer_v1

Version 2

virtual pointer

This protocol allows clients to emulate a physical pointer device. The requests are mostly mirror opposites of those specified in wl_pointer.

zwlr_virtual_pointer_v1
enum error {
    invalid_axis = 0,
    invalid_axis_source = 1,
}
  • invalid_axis — client sent invalid axis enumeration value
  • invalid_axis_source — client sent invalid axis source enumeration value
zwlr_virtual_pointer_v1
request motion(
    time: uint,
    dx: fixed,
    dy: fixed,
)
  • time — timestamp with millisecond granularity
  • dx — displacement on the x-axis
  • dy — displacement on the y-axis

pointer relative motion event

The pointer has moved by a relative amount to the previous request.

Values are in the global compositor space.

zwlr_virtual_pointer_v1
request motion_absolute(
    time: uint,
    x: uint,
    y: uint,
    x_extent: uint,
    y_extent: uint,
)
  • time — timestamp with millisecond granularity
  • x — position on the x-axis
  • y — position on the y-axis
  • x_extent — extent of the x-axis
  • y_extent — extent of the y-axis

pointer absolute motion event

The pointer has moved in an absolute coordinate frame.

Value of x can range from 0 to x_extent, value of y can range from 0 to y_extent.

zwlr_virtual_pointer_v1
request button(
    time: uint,
    button: uint,
    state: uint<wl_pointer.button_state>,
)
  • time — timestamp with millisecond granularity
  • button — button that produced the event
  • state — physical state of the button

button event

A button was pressed or released.

zwlr_virtual_pointer_v1
request axis(
    time: uint,
    axis: uint<wl_pointer.axis>,
    value: fixed,
)
  • time — timestamp with millisecond granularity
  • axis — axis type
  • value — length of vector in touchpad coordinates

axis event

Scroll and other axis requests.

zwlr_virtual_pointer_v1
request frame()

    end of a pointer event sequence

    Indicates the set of events that logically belong together.

    zwlr_virtual_pointer_v1
    request axis_source(
        axis_source: uint<wl_pointer.axis_source>,
    )
    • axis_source — source of the axis event

    axis source event

    Source information for scroll and other axis.

    zwlr_virtual_pointer_v1
    request axis_stop(
        time: uint,
        axis: uint<wl_pointer.axis>,
    )
    • time — timestamp with millisecond granularity
    • axis — the axis stopped with this event

    axis stop event

    Stop notification for scroll and other axes.

    zwlr_virtual_pointer_v1
    request axis_discrete(
        time: uint,
        axis: uint<wl_pointer.axis>,
        value: fixed,
        discrete: int,
    )
    • time — timestamp with millisecond granularity
    • axis — axis type
    • value — length of vector in touchpad coordinates
    • discrete — number of steps

    axis click event

    Discrete step information for scroll and other axes.

    This event allows the client to extend data normally sent using the axis event with discrete value.

    zwlr_virtual_pointer_v1
    request destroy()
    DestructorAvailable since version 1

      destroy the virtual pointer object

      wlr_virtual_pointer_unstable_v1
      zwlr_virtual_pointer_manager_v1

      Version 2
      Compositor Support
      Version 2
      cage 0.3.0
      hyprland 0.52.1
      jay 1.14.0
      labwc 0.20.2
      mir 2.26
      niri 26.04
      phoc 0.55
      river 0.3.13
      sway 1.11
      wayfire 0.9.0

      virtual pointer manager

      This object allows clients to create individual virtual pointer objects.

      zwlr_virtual_pointer_manager_v1
      request create_virtual_pointer(
          seat: nullable object<wl_seat>,
          id: new_id<zwlr_virtual_pointer_v1>,
      )

        Create a new virtual pointer

        Creates a new virtual pointer. The optional seat is a suggestion to the compositor.

        zwlr_virtual_pointer_manager_v1
        request destroy()
        DestructorAvailable since version 1

          destroy the virtual pointer manager

          zwlr_virtual_pointer_manager_v1
          request create_virtual_pointer_with_output(
              seat: nullable object<wl_seat>,
              output: nullable object<wl_output>,
              id: new_id<zwlr_virtual_pointer_v1>,
          )
          Available since version 2

            Create a new virtual pointer

            Creates a new virtual pointer. The seat and the output arguments are optional. If the seat argument is set, the compositor should assign the input device to the requested seat. If the output argument is set, the compositor should map the input device to the requested output.