Smart keyboard-quit