Adding ESC/ENTER handling for search feature