Skift sprog for allerede skrevet tekst

Good afternoon! Is there such a script for example: I typed randomly "rjvajhn", pressed a combination of keys and the text was transformed into "комфорт", and vice versa: I typed "луны", pressed a combination of keys and the text was transformed into "keys"?
Like translit, but only changed the layout.
Thank you in advance!

ManamanN

You just need to use the action "Change the input language or layout of the last typed characters":

Change the language of already typed text