add a function to check keyboard events