Fix key-press-event handler for search bar