handle copy/paste event