virtual pointer

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

motion(time: uint, dx: fixed, dy: fixed)
Argument
Type
Description
timeuint
timestamp with millisecond granularity
dxfixed
displacement on the x-axis
dyfixed
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.

motion_absolute(time: uint, x: uint, y: uint, x_extent: uint, y_extent: uint)
Argument
Type
Description
timeuint
timestamp with millisecond granularity
xuint
position on the x-axis
yuint
position on the y-axis
x_extentuint
extent of the x-axis
y_extentuint
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.

button(time: uint, button: uint, state: uint<wl_pointer.button_state>)
Argument
Type
Description
timeuint
timestamp with millisecond granularity
buttonuint
button that produced the event
stateuint<wl_pointer.button_state>
physical state of the button
button event

A button was pressed or released.

axis(time: uint, axis: uint<wl_pointer.axis>, value: fixed)
Argument
Type
Description
timeuint
timestamp with millisecond granularity
axisuint<wl_pointer.axis>
axis type
valuefixed
length of vector in touchpad coordinates
axis event

Scroll and other axis requests.

frame()
end of a pointer event sequence

Indicates the set of events that logically belong together.

Argument
Type
Description
axis_sourceuint<wl_pointer.axis_source>
source of the axis event
axis source event

Source information for scroll and other axis.

axis_stop(time: uint, axis: uint<wl_pointer.axis>)
Argument
Type
Description
timeuint
timestamp with millisecond granularity
axisuint<wl_pointer.axis>
the axis stopped with this event
axis stop event

Stop notification for scroll and other axes.

axis_discrete(time: uint, axis: uint<wl_pointer.axis>, value: fixed, discrete: int)
Argument
Type
Description
timeuint
timestamp with millisecond granularity
axisuint<wl_pointer.axis>
axis type
valuefixed
length of vector in touchpad coordinates
discreteint
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.

destroy
Type: destructorsince 1
destroy()
destroy the virtual pointer object
Argument
Value
Description
invalid_axis0
client sent invalid axis enumeration value
invalid_axis_source1
client sent invalid axis source enumeration value

virtual pointer manager

This object allows clients to create individual virtual pointer objects.

create_virtual_pointer(seat: object<wl_seat>, id: new_id<zwlr_virtual_pointer_v1>)
Argument
Type
Description
seatobject<wl_seat>allow null
idnew_id<zwlr_virtual_pointer_v1>
Create a new virtual pointer

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

destroy()
destroy the virtual pointer manager
create_virtual_pointer_with_output(seat: object<wl_seat>, output: object<wl_output>, id: new_id<zwlr_virtual_pointer_v1>)
Argument
Type
Description
seatobject<wl_seat>allow null
outputobject<wl_output>allow null
idnew_id<zwlr_virtual_pointer_v1>
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.


Compositor Support

Mutter
Mutter
46
KWin
KWin
6.2
Sway
Sway
1.9
COSMIC
COSMIC
1.0.0
Hyprland
Hyprland
0.42.0
niri
0.1.8
Weston
Weston
13
Mir
Mir
2.18
GameScope
GameScope
3.15.14
Jay
1.7.0
zwlr_virtual_pointer_manager_v1
x
x
2
x
2
x
x
2
x
x

Copyright © 2019 Josef Gajdusek

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.