added a delay before sending keyboard close/open events
added comments