This snippet is intended for me, who using Thai Kedmanee and US English keyboard as a daily driver, to correct myself if I, for some reason, type any text in incorrect layout. For example, I want to type "สวัสดี" but I select US one, I'll instead got "l;ylfu" or "Hello" and got "็ำสสน". You get the idea how frustrate I am when it occur.
In Windows, I used to use a programme call "LayoutFix.exe" which, when highlight incorrect phrase and push <ctrl>+<backspace>
, it'll copy that text, correct the layout, and paste the correct text in place instead. Save me countless times.
I "move" to Linux Mint and, since I miss that feature so bad, so I implement one.
- Obviously, install AutoKey
- Create a new script. Paste
LayoutFix.py
content. - Set hotkey to
<ctrl>+<backspace>
- ... and there was much rejoicing!