Created
October 30, 2015 09:56
-
-
Save urouro/4539b4194a4fafef9a40 to your computer and use it in GitHub Desktop.
Windows 8 + Google IME + AutoHotKey / 左Altを押したときに英数入力、右Altを押したときに日本語入力できるようにする
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
; | |
; rf. http://qiita.com/844196/items/9fc1cd8470a9ad9c3a69#2-3 | |
; | |
IME_ON(hWindow, IsON) | |
{ | |
; WM_IME_CONTROL = 0x0283 | |
; IMC_SETOPENSTATUS = 0x0006 | |
bufCurrentDetectMode := A_DetectHiddenWindows | |
DetectHiddenWindows, On | |
buf := DllCall("user32.dll\SendMessageA", "UInt", DllCall("imm32.dll\ImmGetDefaultIMEWnd", "Uint",hWindow), "UInt", 0x0283, "Int", 0x0006, "Int", IsON) | |
DetectHiddenWindows, %bufCurrentDetectMode% | |
Return buf | |
} | |
LAlt::IME_ON(WinExist("A"), False) | |
RAlt::IME_ON(WinExist("A"), True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment