[SOLVED] Problem reading simulated touch events from /dev/input/event1



  • Hello All,
    I have created GUI application for my custom board.
    with environment variable export QWS_MOUSE_PROTO=tslib:/dev/input/event0 it works fine for manual touch.

    Now i wanted to create simulation of frequent touch events for application testing.
    So I created one test application which creates touch events and writes in /dev/uinput and this events are automatically re-directed by kernel to /dev/input/event1. Now starts the problem that I can see event by cat /dev/input/event1 but application doesn't get any.

    Any hint, clue, solution.?



  • Hello Guys...
    Found an error in my simulator code.
    Actually I was writing touch release event as...
    @
    struct input_event ev_release[] =
    {
    {{ 0, 0 }, EV_KEY, BTN_TOUCH, 0 }
    };
    @

    I changed above piece of code to...
    @
    struct input_event ev_release[] =
    {
    { { 0, 0 }, EV_KEY, BTN_TOUCH, 0 },
    { { 0, 0 }, EV_ABS, ABS_X, x },
    { { 0, 0 }, EV_ABS, ABS_Y, y },
    { { 0, 0 }, EV_ABS, ABS_PRESSURE, p },
    { { 0, 0 }, EV_SYN, SYN_REPORT, 0 },
    };
    @

    ... and it worked. :)

    So maybe Qt doesn't accept touch/mouse events without coordinates, I assume.
    Correct me if I am wrong.



  • Hi aekam,
    Currently im in a similar situation of simulating touch events by emulating the touch co-ordiantes into the driver.. im new to QT and drivers.. Saw this post as solved,Hence requesting you to help me


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.