controlling Photon mouse events


I need help for implementing this article named “How to control the mouse pointer w/o mouse”. This article is available at the following location ( … 000000Smi9).

The code snippet (TmrActivateCb) mentioned in the article is said to be the actual emulation.

I don’t know how to use this snippet and where to start. Should I merely copy this code snippet in .c file and compile it in IDE or Should I make a Photon AppBuilder Project and make some widgets?

Please would need your assistance. Really new to GUI.

Thanks in Advance,

This is a similar project to the keyboard one where you emit keyboard events. What is different here is what you want to accomplish. This code will be part of a Photon Application. An AppBuilder project will have a main window, which may or may not be what you want. The code merely acts as a virtual mouse driver, moving the mouse around, and pressing it’s buttons if desired. If you had another device, eg. a joystick and you wanted to have it function like a mouse, you could use this code.