EclipseがPHP8に対応していないのでVScodeを採用
しかし、VScodeでプラグインをいろいろ追加してみたがEscでIMEがオンの状態(日本語入力)を解決できなかったのでWindows側で制御することにした話
.ahkファイル
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
IME_SET(SetSts, WinTitle="A") {
ControlGet,hwnd,HWND,,,%WinTitle%
if (WinActive(WinTitle)) {
ptrSize := !A_PtrSize ? 4 : A_PtrSize
VarSetCapacity(stGTI, cbSize:=4+4+(PtrSize*6)+16, 0)
NumPut(cbSize, stGTI, 0, "UInt") ; DWORD cbSize;
hwnd := DllCall("GetGUIThreadInfo", Uint,0, Uint,&stGTI)
? NumGet(stGTI,8+PtrSize,"UInt") : hwnd
}
return DllCall("SendMessage"
, UInt, DllCall("imm32\ImmGetDefaultIMEWnd", Uint,hwnd)
, UInt, 0x0283 ;Message : WM_IME_CONTROL
, Int, 0x006 ;wParam : IMC_SETOPENSTATUS
, Int, SetSts) ;lParam : 0 or 1
}
~Esc::IME_SET(0)
sc079::Return
sc079 & h::left
sc079 & j::down
sc079 & k::up
sc079 & l::right
sc079 & o::Enter
sc079 & i::Backspace
IDEに依存せず、EscでIMEオフでコマンドモードに戻り、変換キーをつぶして変換 + hjkl