INPUTTEST(4) | Device Drivers Manual | INPUTTEST(4) |
inputtest - An X.Org input driver for testing
Section "InputDevice" Identifier "devname" Driver "inputtest" Option "SocketPath" "path" ... EndSection
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.
Please refer to xorg.conf(5) 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.
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.
The following driver Options are supported:
The communication with the driver is a binary protocol defined in include/xf86-input-inputtest-protocol.h
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.
After receiving xf86ITResponseServerVersion message the client may send events to the driver. Each event is an instance of one of the xf86ITEvent* structs. The length field defines the full length of the struct in bytes and the event field defines the type of the struct.
The responses from the server follow the same structure. Each response is an instance of one of the xf86ITResponse* structs. The length field defines the full length of the struct in bytes and the event field defines the type of the struct.
The synchronization with Xorg is performed via xf86ITEventWaitForSync event. After sending such event, the client must read of a xf86ITResponseSyncFinishedeventfromthesocketwithoutsendingadditional events. The completion of the read operation indicates that Xorg has fully processed all input events sent to it so far.
Povilas Kanapickas <povilas@radix.lt>
xorg-server 21.1.7 | X Version 11 |