-#include <lunaix/fctrl.h>
-#include <lunaix/foptions.h>
#include <lunaix/input.h>
-#include <lunaix/lunistd.h>
+
#include <ulibc/stdio.h>
+#include <usr/errno.h>
+#include <usr/fcntl.h>
+#include <usr/sys/lunaix.h>
+#include <usr/unistd.h>
#define STDIN 1
#define STDOUT 0
int fd = open("/dev/input/i8042-kbd", 0);
if (fd < 0) {
- printf("fail to open (%d)", fd);
+ printf("fail to open (%d)", errno);
return;
}
action = "release";
}
- printf("%u: %s '%c', class=0x%x, scan=%d\n",
+ printf("%u: %s '%c', class=0x%x, scan=%x\n",
event.timestamp,
action,
event.sys_code & 0xff,