#include #include #include #include #include #include #include int main(int argc, char *argv[]) { xcb_connection_t *dpy; dpy = xcb_connect(NULL, NULL); if (xcb_connection_has_error(dpy)) err("Can't open display.\n"); xcb_test_fake_input(dpy, XCB_KEY_PRESS, 25, XCB_CURRENT_TIME, XCB_NONE, 0, 0, 0); /* sleep(1); // THIS DOESN'T HELP */ xcb_test_fake_input(dpy, XCB_KEY_RELEASE, 25, XCB_CURRENT_TIME, XCB_NONE, 0, 0, 0); xcb_flush(dpy); xcb_disconnect(dpy); exit(0); }