inserting X events via the X11 socket - Xwindows

This is a discussion on inserting X events via the X11 socket - Xwindows ; in another post I asked how to run two independent X server displays on a machine so that I can use multiple mouse input devices where each mouse is restricted to a given screen. In lieu of actually making that ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: inserting X events via the X11 socket

  1. inserting X events via the X11 socket

    in another post I asked how to run two independent X server displays on a
    machine so that I can use multiple mouse input devices where each mouse is
    restricted to a given screen. In lieu of actually making that work, there
    is another alternative.

    I will be using two serial touchscreens (one on each display) and I should
    be able to (through the use of a daemon) intercept their serial commands,
    and create pseudo-mouse events, then send those events to the X11 socket.
    This will allow me to use a single server, dual display, configuration
    with xinerama and trick the X system into thinking that a mouse event
    happened on the correct display by offsetting the mouse coordinates
    relative to their intended screen.

    My X11 experience is more high level (Qt applications with some Xv video
    work) and about all I know of the lower level X programming is the
    heirarchy of xlib, xt, athena, and motif. Could someone point me to a
    reference or example of how I can code a daemon that will send mouse
    events to the X11 socket?

    I know this is possible because I received a binary only package from a
    vendor that does what I want (sort of).


  2. Re: inserting X events via the X11 socket

    On Aug 13, 5:28*pm, No one wrote:
    > in another post I asked how to run two independent X server displays on a
    > machine so that I can use multiple mouse input devices where each mouse is
    > restricted to a given screen. *In lieu of actually making that work, there
    > is another alternative.
    >
    > I will be using two serial touchscreens (one on each display) and I should
    > be able to (through the use of a daemon) intercept their serial commands,
    > and create pseudo-mouse events, then send those events to the X11 socket.*
    > This will allow me to use a single server, dual display, configuration
    > with xinerama and trick the X system into thinking that a mouse event
    > happened on the correct display by offsetting the mouse coordinates
    > relative to their intended screen.
    >
    > My X11 experience is more high level (Qt applications with some Xv video
    > work) and about all I know of the lower level X programming is the
    > heirarchy of xlib, xt, athena, and motif. *Could someone point me to a
    > reference or example of how I can code a daemon that will send mouse
    > events to the X11 socket?
    >
    > I know this is possible because I received a binary only package from a
    > vendor that does what I want (sort of).


    It would be much easier taking a different approach. If you write a
    program using the XTest extension, you can synthesize events, such as
    mouse cicks, etc, from a normal X11 program.

    By way of example, look at my "scribe" program here:
    http://svr-www.eng.cam.ac.uk/~er258/code/x11.html

    Specifically the "send_code" function for faking keypresses.

    -Ed

    --
    (You can't go wrong with psycho-rats.)(http://mi.eng.cam.ac.uk/~er258)

    /d{def}def/f{/Times s selectfont}d/s{11}d/r{roll}d f 2/m{moveto}d -1
    r 230 350 m 0 1 179{ 1 index show 88 rotate 4 mul 0 rmoveto}for/s 12
    d f pop 235 420 translate 0 0 moveto 1 2 scale show showpage

  3. Re: inserting X events via the X11 socket

    On Mon, 18 Aug 2008 10:54:45 -0700, Edward Rosten wrote:
    > It would be much easier taking a different approach. If you write a
    > program using the XTest extension, you can synthesize events, such as
    > mouse cicks, etc, from a normal X11 program.
    >
    > By way of example, look at my "scribe" program here:
    > http://svr-www.eng.cam.ac.uk/~er258/code/x11.html
    >
    > Specifically the "send_code" function for faking keypresses.



    I'd prefer to not use the XTest extension because I don't want an
    additional X client running. But thanks for the comment and I'll withhold
    judgment until I've researched your idea more thoroughly.


+ Reply to Thread