updating keyboard events