implement keyboard navigation for editing