add hook to allow pasting into term mode