added more stuff to the keyboard function for debugging