functionality for keydown in formula editor, less is more