#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <X11/Xlib.h>
#include <X11/Xproto.h>
#include <X11/X.h>
#include <X11/extensions/Xevie.h>
#include <X11/Xutil.h>
int main(int argc, char **argv)
{
Display *dpy;
XEvent event;
dpy = XOpenDisplay(NULL);
if(XevieStart(dpy))
printf("XevieStart(dpy) finished \n");
else {
printf("XevieStart(dpy) failed, only one client is allowed to do event
interception\n");
return 1;
}
XevieSelectInput(dpy, KeyPressMask | KeyReleaseMask );
while(1) {
XNextEvent(dpy, &event);
switch(event.type) {
case KeyPress:
case KeyRelease:
printf("%d\n",event.xkey.keycode);
break;
}
XevieSendEvent(dpy, &event, XEVIE_UNMODIFIED);
}
XevieEnd(dpy);
return 0;
}
--
can't use XevieStart function on 8.04 LTS (libxevie,XEVIE extension)
https://bugs.launchpad.net/bugs/229807
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs