Added code to filter both return and and escape keys. Before this sometimes they would be added to the search string. I.e opening the menu and then pressing return, and then typing 'ca' would cause the return string to become '\rca' . With no indication to the user of the inital '\r'. This might only happen if no item is highlighted though. Still filtering it is the right choice.
I also added a quality of life improvement, in the form of enabling left arrow to close the menu. Before if you were three submenus deep and wanted to exit you would have to press left arrow twice to close the submenus, and then esc to close the main menu. Now you can just hit left arrow three times.