DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
[STR New]
Link: http://www.fltk.org/str.php?L2232
Version: 1.3-current
Link: http://www.fltk.org/str.php?L2232
Version: 1.3-current
#include <stdio.h>
#include "Xlib.h"
#include "XTest.h"
int main(void)
{
Display *display;
int i;
KeyCode keycode;
/* Connect to the server specified in the DISPLAY evironment variable */
display = XOpenDisplay(NULL);
if (display == NULL)
{
fprintf (stderr, "Cannot connect to X server %s.\n",
XDisplayName(NULL));
return;
}
if (!XQueryExtension (display, "XTEST", &i, &i, &i))
{
fprintf (stderr, "Extension XTest unavailable on display '%s'.\n",
XDisplayName(NULL));
XCloseDisplay (display);
return;
}
unsigned char keycodes[] = {0x3a, 0x20, 0x1b, 0x39, 0x1f, 0x39, 0x2a, 0x41};
for(i=0; i<sizeof(keycodes); i++)
{
XTestFakeKeyEvent(display, keycodes[i], 1, 0);
XTestFakeKeyEvent(display, keycodes[i], 0, 0);
}
XCloseDisplay (display);
}
_______________________________________________
fltk-bugs mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-bugs