Added the paste event handling to be just like the keydown event
handler.