Skip to content

Agent panel MessageEditor drops option/alt modifier, breaking keyboard layouts using option as layer key #52813

@christophebeling

Description

@christophebeling

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

Keyboard layouts that use option/alt as a layer modifier (e.g. Neo2 via Karabiner-Elements on macOS) work correctly in the main editor (Editor mode=full) but are broken in the agent panel's message input (MessageEditor > Editor mode=auto_height).

The option modifier is silently stripped — pressing option+y (which should produce @ on Neo2 Layer 3) registers as just y in the Key Context View's "Last Keystroke" (Typed: "y" instead of alt-y).

Steps to reproduce:

  1. Use any keyboard layout that relies on option to access additional characters (Neo2 via Karabiner, international dead-key layouts, etc.)
  2. Open the agent panel (right dock)
  3. Click into the message input field
  4. Press option + <any letter> — observe that only the plain letter is typed, the option modifier is ignored
  5. Now click into a regular editor buffer — the same key combo correctly produces the layout's special character

Context stack of the affected input (from dev: open key context view):

Workspace os=macos keyboard_layout=Deutsch (Neo 2)
  left_dock=ProjectPanel right_dock=agent_panel
    Dock os=macos
      AgentPanel os=macos acp_thread
        AcpThread
          MessageEditor
            Editor os=macos jupyter mode=auto_height
              edit_prediction_mode=eager

Key Context View "Last Keystroke" when pressing option+y in the agent panel:

Typed: "y"

Expected: alt-y or the composed character from the keyboard layout (@ in Neo2).

Root cause hypothesis

The main editor (mode=full) correctly passes option+key events through the macOS text input system (NSTextInputClient / IME), which then consults the active keyboard layout and produces the composed character. The MessageEditor > Editor (mode=auto_height) in the agent panel appears to strip the option modifier before it reaches the IME, so the keyboard layout never gets to process it.

Environment

  • macOS (Darwin 25.3.0, Apple Silicon)
  • Zed latest stable (2026-03-31)
  • Keyboard layout: Deutsch (Neo 2) via Karabiner-Elements
  • Karabiner remaps CapsLock → left_option (Neo2 Mod3), macOS Neo2 layout uses option+key for Layer 3 characters
  • Base keymap: JetBrains

Screenshots

Neo2 Layer 1 layout (CapsLock = Mod3 left, M3 = Mod3 right):

neo2-layout

Key Context View showing Typed: "y" when option+y is pressed in the agent panel — the option modifier is dropped:

(Context stack and Last Keystroke visible in dev: open key context view)

If applicable, attach your Zed.log file to this issue.

Not applicable — this is a key dispatch issue, not a crash.

Metadata

Metadata

Assignees

No one assigned

    Labels

    state:needs triagetriage is not complete: no `area:*` label, or no `priority:*`/`frequency:*` for Bugs/Crashes

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions