Key and hook for ansi-term