Minor fix with the keyboard events