Take some Imm32-based IME code from old ChewingIME for Imm32 support.