Created
April 10, 2024 17:32
-
-
Save Tomurisk/5877c57358e303e019285a1e7d93159a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Licensed as The Unlicense – unlicense.org | |
Endkeys = {LControl}{RControl}{LAlt}{RAlt}{LWin}{RWin}{AppsKey}{F1}{F2}{F3}{F4}{F5}{F6}{F7}{F8}{F9}{F10}{F11}{F12}{Left}{Right}{Up}{Down}{Home}{End}{PgUp}{PgDn}{Del}{Ins}{BS}{Capslock}{Numlock}{PrintScreen}{Pause} | |
SetTitleMatchMode, RegEx | |
Menu, Tray, Icon, lt.ico | |
ro := false | |
CapsLock:: | |
ro:=!ro | |
if (ro) | |
Menu, Tray, Icon, ro.ico | |
else | |
Menu, Tray, Icon, lt.ico | |
return | |
F1::CapsLock | |
F2::SendInput +{Enter} | |
$::SendInput 4 | |
+Enter::SendInput {U+0024} | |
RShift::SendInput {U+201e} | |
+RShift::SendInput % (ro == false) ? "{U+201c}" : "{U+201d}" | |
$4:: | |
KeysToLT := ["č", "š", "ž", "ą", "ė", "ę", "į", "ų", "ū", "Č", "Š", "Ž", "Ą", "Ė", "Ę", "Į", "Ų", "Ū"] | |
KeysToRO := ["ă", "â", "î", "ș", "ț", "Ă", "Â", "Î", "Ș", "Ț"] | |
KeysToKZ := ["ы", "қ", "ғ", "ң", "ұ", "ә", "ө", "ү", "э", "ъ", "ё", "ґ", "Ы", "Қ", "Ғ", "Ң", "Ұ", "Ә", "Ө", "Ү", "Э", "Ъ", "Ё", "Ґ"] | |
LTInvokers := "itensoamrITENSOAMR" | |
ROInvokers := "rentiRENTI" | |
KZInvokers := "оваілжрдфпегОВАІЛЖРДФПЕГ" | |
; ------------------------------------------------------------------------------- | |
LangKeys(key = "", Invokers = "", KeysToLang = "") { | |
KeyIndex := InStr(Invokers, key, CaseSensitive := true) | |
global KeysToKZ, KZInvokers | |
if (KeyIndex > 0) { | |
SendInput % KeysToLang[KeyIndex] | |
} | |
else { | |
KeyIndex := InStr(KZInvokers, key, CaseSensitive := true) | |
if (KeyIndex > 0) { | |
SendInput % KeysToKZ[KeyIndex] | |
} | |
else { | |
SendInput %key% | |
} | |
} | |
} | |
; ------------------------------------------------------------------------------- | |
Input, key, L1, %Endkeys% | |
FoundPos := RegExMatch(ErrorLevel, "EndKey:(.*)", SubPat) | |
if (FoundPos > 0) { | |
key = {%SubPat1%} | |
SendInput %key% | |
} | |
else if (key == "y" || key == "Y") { | |
SendInput {U+2013} | |
} | |
else if (key == "щ" || key == "Щ") { | |
SendInput {U+2014} | |
} | |
else if (ro == false) { | |
LangKeys(key, LTInvokers, KeysToLT) | |
} | |
else { | |
LangKeys(key, ROInvokers, KeysToRO) | |
} | |
return | |
#IfWinActive ahk_exe wacup.exe ahk_class Winamp | |
s:: | |
MButton:: | |
#IfWinActive | |
#IfWinExist ahk_exe wacup.exe | |
#l:: | |
WinSet, AlwaysOnTop, On, ahk_exe wacup.exe ahk_class Winamp v1.x | |
WinMinimize, ahk_exe wacup.exe ahk_class Winamp v1.x | |
WinSet, AlwaysOnTop, Off, ahk_exe wacup.exe ahk_class Winamp v1.x | |
return | |
#IfWinExist ahk_exe wacup.exe |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment