The script/class lyt from stealzy otherwise perfectly working, fails to switch keyboard layout if just a desktop is selected. Use-case: I want to rename the file located on the desktop, press the trigger button (CaseLock in my case), but nothing happens. AHK correctly sends the event to the script (checked with the msgbox), but the layout stays in the old position. If I do file rename in Explorer window, I can switch layout normally.
I think the problem happening because there is actually "no process" to switch the layout. The problem lies somewhere in the mechanism of Lyt class, how it selects the processes to switch the layout. In this case I think the explorer.exe must be manipulated, although its process window is not active.
Could anybody check my assumptions and fix idea please? I will be glad to try the fix and write back if it worked.
That's the script I use:
Code: Select all
toggle=1
Capslock::
if (toggle:=!toggle)
Lyt.Set(0x4070409)
else
Lyt.Set("RU")
SoundBeep 999,1
Return
Anton