in reply to Controlling X cursor
If you are looking at doing this at a low level then X11::Protocol might be what you are looking for.
/J\