This is the function called by the lowest keyboard driver when a key is detected. The function peeks at the key data and adds it to the linked list shared by the keyboard callback routine and the file I/O (logging) thread.