Using a standard input method editor (https://en.wikipedia.org/wiki/Input_method) solves the multiple targets problem, and it could be a universal, but customizable solution, as I explained in another comment (https://news.ycombinator.com/item?id=37330658).