title: How to do a fake mouse wheel move in linux
body: <p>I'm trying to simulate keyboard and mouse events, i've successfully made fake keyboard keydown, keyup. Fake mouse button down, up and fake mouse move, but i don't found how to do fake mouse wheel move, can someone explain to me a simple way to do this in c++?</p>
  
  <p>Mouse Move and Mouse button press:</p>
  
  <pre><code>Display *dpy = XOpenDisplay(NULL);
  XTestFakeMotionEvent(dpy, -1, 50, 50, 0);
  XTestFakeButtonEvent(dpy, Button1, true, 0);
  XTestFakeButtonEvent(dpy, Button1, false, 0);
  XFlush(dpy);
  XCloseDisplay(dpy);
  </code></pre>
  
  <p>Keyboard key press:</p>
  
  <pre><code>Display *dpy = XOpenDisplay(NULL);
  unsigned int keycode = XKeysymToKeycode(dpy, XK_Super_L);
  XTestFakeKeyEvent(dpy, keycode, true, 0);
  XTestFakeKeyEvent(dpy, keycode, false, 0);
  XFlush(dpy);
  XCloseDisplay(dpy);
  </code></pre>