added keyboard events for dismissing