setting mouse position

Hi all,

just wondering if there is a way to set the mouse position from within open frameworks. I want to set the mouse/cursor back to the centre of the screen after finishing an event, but i’m not sure that it is possible. Of course i can draw a custom cursor wherever i want, but if its position is tied to the actual mouse, it will revert back the next time the mouse is moved.

otherwise, is there some kind of OS specific calls that will do this for Mac or Windows?
i don’t really want to break cross platform portability though, if can avoid it.

thanks.

yo drosen,

I have been collecting this kind of code in this thread:

http://forum.openframeworks.cc/t/how-to-set-mouse-position/1438/0

1 Like

thanks for the link, things worked as they were supposed to, both mac and windows.