oninput is definitely better than onkeyup.
It overcomes the issue of firing the translate function when it has not been edited.
I've tried it in the fully automated version.
It works and has eliminated a major problem.
This allows the actual problem to become visible:
It is best reproduced by adding a single comma or full stop to a page of text.
This edit is effected so quickly that the compare function fires and grabs some French text and some English text.
Ie. The English text being in the process of changing to French.
It's a fundamental barrier to timing.
Even if you add a delay; the user can easily have added another character, causing the screen to be in the same mid-state of change (from English2French).
The human eye works + a command.
You see when the text has all changed from English to French, and then you hit the reverse translate key.
How can that simple task be replaced by code?