Русская версия заметки доступна по ссылке.
I know about Punto Switcher, X Neural Switcher and some other similar software to switch layout for typed text:
Руддщб Цщкдв! → Hello, World! (and/or backwards, Hello, World! → Руддщб Цщкдв!)
But I have issues with applications running on Wine when I use XNeur, and can use Punto in Windows or Mac OS only. Besides both of them are too excess functionality for me, so I don't need automation for text editing. Sure, this software have many other useful features for text typing, but for me is enough, that after I use keyboard hotkeys text by the left of cursor get changed from one keyboard layout to another and when it works for applications, which running on Wine.
And I after tips of many intelligence people of Internet, who say "You need a software? Code it by yourself!", I made Python 3 script to "switch over" typed text.
The script works only when you need to change text and its does following:
– cut the part of text (by the left of cursor to the line's start or, if there is parameters on start, it can be a selected text or also last word – characters after closest left space);
– change each character of cutted text from first layout to founded by number of place character of second layout (it is trying to find out right layouts is with first three characters of cutted text);
– puts result of modification on same place it was before cut.
I know about Punto Switcher, X Neural Switcher and some other similar software to switch layout for typed text:
Руддщб Цщкдв! → Hello, World! (and/or backwards, Hello, World! → Руддщб Цщкдв!)
But I have issues with applications running on Wine when I use XNeur, and can use Punto in Windows or Mac OS only. Besides both of them are too excess functionality for me, so I don't need automation for text editing. Sure, this software have many other useful features for text typing, but for me is enough, that after I use keyboard hotkeys text by the left of cursor get changed from one keyboard layout to another and when it works for applications, which running on Wine.
And I after tips of many intelligence people of Internet, who say "You need a software? Code it by yourself!", I made Python 3 script to "switch over" typed text.
The script works only when you need to change text and its does following:
– cut the part of text (by the left of cursor to the line's start or, if there is parameters on start, it can be a selected text or also last word – characters after closest left space);
– change each character of cutted text from first layout to founded by number of place character of second layout (it is trying to find out right layouts is with first three characters of cutted text);
– puts result of modification on same place it was before cut.