Automatically switch IME status when entering/leaving insert mode