I need to copy the text entered in a field (whether it was typed in, pasted or from browser auto-filler) and paste it in another field either at the same time or as soon as
You are almost there... The function is correct, you just have to assign it to the change event of the input:
change