translate selection back to a keyword