<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<tt>Erik,<br>
<br>
I use XTest to allow clients to send both pointer and keyboard<br>
events to the X server. I'm not sure what you are trying to do<br>
so I do not know why you would want to write a driver. <br>
<br>
In any case, your X server has to support the XTest extension.<br>
(Most do.) You can use xdpyinfo to determine this. You'll get<br>
something like:<br>
</tt>
<blockquote><tt>number of extensions: 16</tt><br>
<tt> BIG-REQUESTS</tt><br>
<tt> ...</tt><br>
<tt> XTEST</tt><br>
<tt> XTestExtension1</tt><br>
<tt> ...</tt><br>
</blockquote>
<tt>Programmatically, use XTestQueryExtension. Next you need to<br>
determine if the server is going to allow you to grab control.<br>
Use XTestGrabControl for this. After that, depending on what <br>
you want to so, use:<br>
XTestFakeMotionEvent (pointer motion)<br>
XTestFakeButtonEvent (mouse button press/release)<br>
XTestFakeKeyEvent (keyboard key press/release)<br>
</tt><br>
<tt>I didn't find any man pages on XTest but am sure there are some<br>
floating around somewhere. In any case, the code is pretty<br>
straightforward: xc/lib/Xtst/XTest.c.<br>
<br>
John<br>
</tt><br>
Erik de Castro Lopo wrote:
<blockquote cite="mid20061108070407.273421a9.mle+xorg@mega-nerd.com"
type="cite">
<pre wrap="">Hi all,
I'm writing a driver for a touch screen device and need a way
to get X events into the X server with as little effor on my
part as possible.
This is mainly for testing. Eventually I intend to either write
a proper kernel level driver of an X input diver.
Any advice or pointers?
Thanks,
Erik
</pre>
</blockquote>
</body>
</html>