handles paste on terminal, for firefox