Ok so here is what I am trying to do. I want the keyboard language temperedly to Greek (mainly for math) while holding the menu button, kind of like how the shift key temperedly sets the keyboard to caps. Also, I need to be able to use 2 languages (besides the occasional Greek letter) I need to be able to use two languages, and if I have Greek as one of my languages I also have to cycle through Greek when using alt shift. Here's my code to try to solve this:
Code: Select all
bool := true
!+::
bool := !bool
if (bool)
SetInputLang(0x0409)
else
SetInputLang(0x040d)
return
AppsKey::SetInputLang(0x0408)
AppsKey up::
if (bool)
SetInputLang(0x0409)
else
SetInputLang(0x040d)
return
SetInputLang(Lang)
{
WinExist("A")
ControlGetFocus, CtrlInFocus
PostMessage, 0x50, 0, % Lang, %CtrlInFocus%
}
The temporarily switch to Greek works perfectly, but the alt shift part does absolutely nothing, even after disabling the alt shift combo in the windows settings.
I am
very new to AutoHotKey and I really have no idea what I'm doing wrong.