better keyboard handling, headers in Makefile