Translate characters caused by typos because you forgot to change the keyboard language layout.
pip install key-changer
python3 -m key_changer --help
import key_changer
translator = key_changer.KeyChanger("ANSI", "QWERTY", "Thai_Kedmanee")
translator.translate("l;ylfu")
# 'สวัสดี'
translator.reverse("้ำสสน")
# 'hello'
translator.auto(";yoouhvkdkLfu")
# 'วันนี้อากาศดี'
translator.auto("ะนกฟั ะ้ำ ไำฟะ้ำพ รห เนนก")
# 'today the weather is good'
key_changer.KeyboardLayout
# ('ANSI',)
key_changer.LanguageLayout
# ('QWERTY', 'Thai_Kedmanee', 'Thai_Pattachote')
Keyboard layout | Language layout |
---|---|
ANSI | QWERTY |
Thai_Kedmanee | |
Thai_Pattachote |