Sharing my WEC7 mouse emulator

This isn’t a question. I just want to share a small project with the community.

On our Colibri iMX6 we were using the Multi-touch solution with an FT5x06 display. At some point in the process, it occurred to me that we don’t need multi-touch capabilities in our application, and all I really want are normal mouse click events. So I modified the multi-touch HW adapter source code to simply fire mouse events as the user touches and moves a finger across the display. The solution does not use the Unified Multi Touch Driver, it’s a stand-alone application.

The cool thing about this is that it works across all applications and even in the Windows desktop. Touching and moving across the display works just like a mouse. Additionally, a long touch gets interpreted as a right-click.

I have attached the source code for anyone who might find this useful. It’s only been tested on a Colibri iMX6 Solo and is specific to the FT5x06 display. It would be a simple matter to port this to other displays.

I just put the thing into the AutoRun folder and never have to worry about having a mouse after that.

There are a few items of data defined at the top of the file mouseEmulator.c. These are pretty self-explanatory.

#define SCREEN_WIDTH 800
#define SCREEN_HEIGHT 480
#define LONG_TOUCH_MSEC 250	// How long to hold a touch (in msec) to 
                               // be interpreted as a right-click.

There are no license restrictions on the code, but the usual caveats apply: use this stuff at your own risk and expense. The code is being provided as-is and no fitness for any particular purpose is implied, blah, blah, blah…

MouseEmulator_FT5x06

Thank you for posting your project. It would be great if other Toradex users would follow up, to grow the community spirit of this platform.
Thanks a lot!!!