accept/cancel edits by pressing enter/escape keys