Skip to content

Instantly share code, notes, and snippets.

View robjinman's full-sized avatar
🇬🇧

Rob Jinman robjinman

🇬🇧
View GitHub Profile
@robjinman
robjinman / gist:9d7bea82d7f6315f695a2d3c1ee8db45
Created May 11, 2026 17:09
Poll events from input devices using libevdev
#include <libevdev-1.0/libevdev/libevdev.h>
#include <filesystem>
#include <iostream>
#include <vector>
#include <fcntl.h>
struct InputDevice
{
int fileDescriptor = 0;
libevdev* device = nullptr;