Искал такой скрипт, но не где не мог найти, пришлось написать
Решил поделится со всеми, может кому пригодится
Как пользоваться:
Меняем язык на клавиатуре с помощью кнопок Shift + Alt
Когда в трее язык сменится на Русский, можно писать на энг раскладке русскими буквами
Скрипт так же меняет эти буквы ->
Если есть идеи как его можно написать грамотней и красивее, предлагайтеjo=ё
yo=ё
zh=ж
ch=ч
sh=ш
je=э
ju=ю
yu=ю
ja=я
ya=я
Code: Select all
#NoEnv
#SingleInstance Force
Menu, Tray, NoStandard
Menu, Tray, Color, 0xFFFFFF
Menu, Tray, Add, Закрыть Translit, Exit
Menu, Tray, Icon , Закрыть Translit, Shell32.dll, 74
CurrentLang := % DllCall("GetKeyboardLayout", Int,DllCall("GetWindowThreadProcessId", int,WinActive("A"), Int,0))
Count := 0
~!Shift::
~+Alt::
startLang := % DllCall("GetKeyboardLayout", Int,DllCall("GetWindowThreadProcessId", int,WinActive("A"), Int,0))
While (DllCall("GetKeyboardLayout", Int,DllCall("GetWindowThreadProcessId", int,WinActive("A"), Int,0)) == startLang and Count < 100)
{
Sleep, 50
Count += 1
}
CurrentLang := DllCall("GetKeyboardLayout", Int,DllCall("GetWindowThreadProcessId", int,WinActive("A"), Int,0))
Count := 0
return
Exit:
ExitApp
return
#If (CurrentLang == "68748313" and not GetKeyState("Ctrl", "P"))
+SC01E::
SC01E::Send % GetKeyState("Shift", "P") || GetKeyState("CapsLock", "T") ? GetKeySC(A_PriorKey) == "36" or GetKeySC(A_PriorKey) == "21" ? "{BackSpace}{Я}" : "А" : GetKeySC(A_PriorKey) == "36" or GetKeySC(A_PriorKey) == "21" ? "{BackSpace}{я}" : "а"
SC030::б
SC02F::в
SC022::г
SC020::д
+SC012::
SC012::Send % GetKeyState("Shift", "P") || GetKeyState("CapsLock", "T") ? GetKeySC(A_PriorKey) == "36" ? "{BackSpace}{Э}" : "Е" : GetKeySC(A_PriorKey) == "36" ? "{BackSpace}{э}" : "е"
SC02C::з
SC017::и
SC024::й
SC025::к
SC026::л
SC032::м
SC031::н
+SC018::
SC018::Send % GetKeyState("Shift", "P") || GetKeyState("CapsLock", "T") ? GetKeySC(A_PriorKey) == "36" or GetKeySC(A_PriorKey) == "21" ? "{BackSpace}{Ё}" : "О" : GetKeySC(A_PriorKey) == "36" or GetKeySC(A_PriorKey) == "21" ? "{BackSpace}{ё}" : "о"
SC019::п
SC013::р
SC01F::с
SC014::т
+SC016::
SC016::Send % GetKeyState("Shift", "P") || GetKeyState("CapsLock", "T") ? GetKeySC(A_PriorKey) == "36" or GetKeySC(A_PriorKey) == "21" ? "{BackSpace}{Ю}" : "У" : GetKeySC(A_PriorKey) == "36" or GetKeySC(A_PriorKey) == "21" ? "{BackSpace}{ю}" : "у"
SC021::ф
+SC023::
SC023::Send % GetKeyState("Shift", "P") or GetKeyState("CapsLock", "T") ? GetKeySC(A_PriorKey) == "44" ? "{BackSpace}{Ж}" : GetKeySC(A_PriorKey) == "31" ? "{BackSpace}{Ш}" : GetKeySC(A_PriorKey) == "46" ? "{BackSpace}{Ч}" : "Х" : GetKeySC(A_PriorKey) == "44" ? "{BackSpace}{ж}" : GetKeySC(A_PriorKey) == "31" ? "{BackSpace}{ш}" : GetKeySC(A_PriorKey) == "46" ? "{BackSpace}{ч}" : "х"
SC02E::ц
SC011::щ
SC015::ы
SC027::ъ
SC028::ь
SC010::я
+SC035::?
SC035::/
SC033::,
+SC01A::{
+SC01B::}
SC01A::[
SC01B::]
SC034::.
+SC034::>
+SC033::<