keypresses should not be processed in edit mode - close #883