简体   繁体   中英

How do I catch keyboard events in X11?

I'm writing an LCD controller, and one feature I want to add is the ability to catch keyboard strokes so that you can do stuff like instant messaging over the LCD. I found xsnoop.c but it's outdated. I'm using xorg-x11-server 1.6.4-0.1.fc11 on Fedora 11. I'm also using Qt. I didn't find anything in the docs that might help, but figured I'd mention it.

Any hints?

I've just tried compiling xsnoop.c and there was a line

 #include <vroot.h>

which needs to be just removed, but apart from that it works.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM