Implement keyboard navigation in the dialog