fix keyboard events