Skip to content

Instantly share code, notes, and snippets.

Created July 15, 2010 18:45
Show Gist options
  • Save anonymous/477343 to your computer and use it in GitHub Desktop.
Save anonymous/477343 to your computer and use it in GitHub Desktop.
#include <X11/Xlib.h>
void move(int dx, int dy) {
Display* d;
d = XOpenDisplay(0);
XWarpPointer(d,0,0,0,0,0,0,dx,dy);
XCloseDisplay(d);
}
int main(void) {
while(1) {
move(1,1);
move(-1,-1);
sleep(1);
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment