handle KEY_RETURN and KEY_DELETE key