Added hook on paste event to search for the pasted input.

Added support for paste event that didn't work on Mac OSX (it worked with Windows and Linux though). Now it works on every OS.
You could extract this to a method inputPaste(), kinda like the other event handlers