#include #include Result luna_main(int, char**) { auto mouse = TRY(os::File::open("/dev/mouse", os::File::ReadOnly)); mouse->set_buffer(os::File::NotBuffered); while (1) { moon::MousePacket packet; TRY(mouse->read_typed(packet)); os::println("Mouse packet: xdelta=%d, ydelta=%d, buttons=%d", packet.xdelta, packet.ydelta, packet.buttons); } }