Skip to content

Instantly share code, notes, and snippets.

@javiercantero
javiercantero / xreadkeys.c
Last active April 17, 2025 05:49
A X11/Xlib program that reads the KeyPress and KeyRelease events from the window and prints them to the standard output. Used to debug the keyboard within X.
#include <X11/Xlib.h>
#include <stdio.h>
#include <stdlib.h>
int main()
{
Display *display;
Window window;
XEvent event;
int s;