diff --git a/Makefile b/Makefile index 1f7ed02..eb167b4 100644 --- a/Makefile +++ b/Makefile @@ -4,9 +4,9 @@ # rpi - uses xwindows to provide event handling # rpi_noX - get keyboard events from raw input, xwindows not needed -#PLATFORM=xorg +PLATFORM=xorg #PLATFORM=rpi -PLATFORM=rpi_noX +#PLATFORM=rpi_noX #### diff --git a/src/input.c b/src/input.c index c6bcf4b..1010e29 100644 --- a/src/input.c +++ b/src/input.c @@ -246,7 +246,7 @@ bool *getKeys() int n; n = scandir ("/dev/input/by-path/", &eps, __dfilter, __dsort); - if (n > 0) + if (n >= 0) { // only check 1st usb keyboard.... char fn[256]; @@ -276,7 +276,7 @@ bool *getKeys() if (ioctl(__key_fd, KDGKBMODE, &old_keyboard_mode) < 0) { //return 0; printf("couldn't get the keyboard, are you running via ssh\n"); - printf("without setting evdev permissions? \n"); + printf("or without setting evdev permissions? \n"); } tcgetattr(__key_fd, &tty_attr_old);