Added fix for keyboard_lastkey for Xlib