if createEvent("KeyEvents") doesn't work, try createEvent("KeyboardEvent") next