Created
August 6, 2020 02:55
-
-
Save KudoLayton/27a053f1a01e24d8f86b7907c67ae5b8 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
IME_CHECK(WinTitle) | |
{ | |
WinGet,hWnd,ID,%WinTitle% | |
Return Send_ImeControl(ImmGetDefaultIMEWnd(hWnd),0x005,"") | |
} | |
Send_ImeControl(DefaultIMEWnd, wParam, lParam) | |
{ | |
DetectSave := A_DetectHiddenWindows | |
DetectHiddenWindows,ON | |
SendMessage 0x283, wParam,lParam,,ahk_id %DefaultIMEWnd% | |
if (DetectSave <> A_DetectHiddenWindows) | |
DetectHiddenWindows,%DetectSave% | |
return ErrorLevel | |
} | |
ImmGetDefaultIMEWnd(hWnd) | |
{ | |
return DllCall("imm32\ImmGetDefaultIMEWnd", Uint,hWnd, Uint) | |
} | |
Esc:: | |
WinGetActiveTitle, ExplorerTitle | |
ime_status := % IME_CHECK("A") | |
if (ime_status="0") | |
{ | |
} else { | |
Send, {vk15sc138} | |
} | |
HotKey, ESC, Off | |
Send {Esc} | |
HotKey, ESC, On | |
return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment