blob: 566e4f35a812155eaf602b37401d66349573f6f6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
.\" shorthand for double quote that works everywhere.
.ds q \N'34'
.TH INPUTTEST __drivermansuffix__ __vendorversion__
.SH NAME
inputtest \- An X.Org input driver for testing
.SH SYNOPSIS
.nf
.B "Section \*qInputDevice\*q"
.BI " Identifier \*q" devname \*q
.B " Driver \*qinputtest\*q"
.BI " Option \*qSocketPath\*q \*q" path \*q
\ \ ...
.B EndSection
.fi
.SH DESCRIPTION
.B inputtest
is an Xorg input driver that passes events received over a socket on to the
server as input events. It supports the full set of the xf86 driver APIs
exposed by Xorg. The primary use cases of this input driver are various
integration tests that need to interface with the input subsystem.
.SH CONFIGURATION DETAILS
Please refer to __xconfigfile__(__filemansuffix__) for general configuration
details and for options that can be used with all input drivers. This
section only covers configuration details specific to this driver.
.PP
External process can communicate with the input driver via a named socket that
is created after the driver is initialized. The paths to the socket is passed
via input driver options.
.PP
The following driver
.B Options
are supported:
.TP 7
.BI "Option \*qSocketPath\*q \*q" string \*q
Sets the path where the driver will create a named socket. Any existing file
at that location will be removed.
.TP 7
.BI "Option \*qDeviceType\*q \*q" string \*q
Sets the type of the device to be emulated.
.IP
.BI Keyboard
Initializes a keyboard device.
.IP
.BI Pointer
Initializes a relative-mode pointer device. It will have four valuators -
a "Rel X" valuator at axis 0 and a "Rel Y" valuator at axis 1.
A horizontal scroll valuator will be set up at axis 2.
A vertical scroll valuator will be set up at axis 3.
.IP
.BI PointerAbsolute
Initializes an absolute-mode pointer device. It will have four valuators -
an "Abs X" valuator at axis 0 and an "Abs Y" valuator at axis 1.
A horizontal scroll valuator will be set up at axis 2.
A vertical scroll valuator will be set up at axis 3.
.IP
.BI PointerAbsoluteProximity
Initializes an absolute-mode pointer device with proximity support.
The valuators are initialized in the same way as for \fBPointerAbsolute\fR type.
.IP
.BI Touch
Initializes a touch device.
It will have 5 valuators: an "Abs MT Position X" at axis 0,
an "Abs MT Position Y" valuator at axis 1,
a horizontal scroll valuator on axis 2,
a vertical scroll valuator on axis 3 and an "Abs MT Pressure" valuator
at axis 4.
.TP 7
.BI "Option \*qTouchCount\*q \*q" int \*q
Sets the maximum number of simultaneous touches for touch devices.
.TP 7
.BI "Option \*qPointerButtonCount\*q \*q" int \*q
Sets the maximum number of buttons in pointer devices.
.TP 7
.BI "Option \*qPointerHasPressure\*q \*q" bool \*q
Selects whether "Abs Pressure" is available at the axis 4 in pointer devices.
.SH INTERFACE WITH THE DRIVER
The communication with the driver is a binary protocol defined in
include/xf86-input-inputtest-protocol.h
.PP
At the beginning, the client process that communicates with the driver must
connect to the socket that is created by the driver at SocketPath.
Once the connection is established, it must write a xf86ITEventClientVersion
event and read a xf86ITResponseServerVersion response where the driver
specifies the protocol version supported by it. If this version is lower than
requested by the client, then the driver will disconnect.
.PP
After receiving xf86ITResponseServerVersion message the client may send events
to the driver. Each event is an instance of one of the
.BI xf86ITEvent*
structs. The length field defines the full length of the struct in bytes and
the event field defines the type of the struct.
.PP
The responses from the server follow the same structure. Each response is an
instance of one of the
.BI xf86ITResponse*
structs. The length field defines the full length of the struct in bytes and
the event field defines the type of the struct.
.PP
The synchronization with Xorg is performed via
.BI xf86ITEventWaitForSync
event. After sending such event, the client must read of a
.BI xf86ITResponseSyncFinished event from the socket without sending additional
events. The completion of the read operation indicates that Xorg has fully
processed all input events sent to it so far.
.SH AUTHORS
Povilas Kanapickas <povilas@radix.lt>
.SH "SEE ALSO"
__xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__)
|