Capture paste events properly