Skip to content

Warp crashes when switching input method via AutoHotkey PostMessage(0x50) #7074

@liuzsen

Description

@liuzsen

Pre-submit Checks

Describe the bug

When using AutoHotkey v2 to switch input methods by sending a WM_INPUTLANGCHANGEREQUEST message to the active window, Warp immediately freezes (white screen), becomes unresponsive, and then crashes. This issue does not occur in most other applications (tested with Notepad, Chrome, VS Code, etc.).

This suggests Warp might have an unhandled case when receiving WM_INPUTLANGCHANGEREQUEST with a specific HKL, causing it to crash.

To reproduce

  1. Install AutoHotkey v2.
  2. Create a script like:
; Ctrl+Shift+9 => Simplified Chinese
^+9:: SetInputLangByKLID("00000804")  ; zh-CN (Microsoft Pinyin)

; Ctrl+Shift+0 => US English
^+0:: SetInputLangByKLID("00000409")  ; en-US (US keyboard)

SetInputLangByKLID(klid) {
    hwnd := WinGetID("A")
    if !hwnd
        return false
    hkl := DllCall("LoadKeyboardLayoutW", "Str", klid, "UInt", 0x00000001, "Ptr")
    if !hkl
        return false
    PostMessage(0x50, 0, hkl, , "ahk_id " hwnd)
    return true
}
  1. Open Warp terminal.
  2. Focus Warp window.
  3. Press Ctrl+Shift+9 or Ctrl+Shift+0.

Expected behavior

Warp should switch the input method without freezing or crashing.

Screenshots, videos, and logs

Image

Operating system (OS)

Windows

Operating system and version

windows 10

Shell Version

No response

Current Warp version

v0.2025.08.06.08.12.stable_02

Regression

No, this bug or issue has existed throughout my experience using Warp

Recent working Warp date

No response

Additional context

No response

Does this block you from using Warp daily?

No

Is this an issue only in Warp?

Yes, I confirmed that this only happens in Warp, not other terminals.

Warp Internal (ignore): linear-label:b9d78064-c89e-4973-b153-5178a31ee54e

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:terminal-inputTerminal command-line input, cursor movement, key handling, and input editing.bugSomething isn't working.needs-infoMore issue-specific reporter detail is needed before the problem can be confidently triaged.os:windowsWindows-specific behavior, regressions, or requests.triagedIssue has received an initial automated triage pass.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions