Skip to content

macOS: CapsLock IME toggle inserts U+E00E in VS Code 1.110 integrated terminal #16310

Closed as not planned

Description

@danix800

Summary

When running opencode in VS Code's integrated terminal on macOS, pressing CapsLock to toggle Chinese/English input inserts an unexpected character U+E00E into the prompt/input buffer.

This started in VS Code 1.110. VS Code 1.109.x does not show this behavior.

Reproduction

  1. macOS + Chinese IME configured (CapsLock toggles input source).
  2. Open VS Code 1.110 integrated terminal.
  3. Run opencode.
  4. Press CapsLock to switch IME.

Actual

A private-use character corresponding to U+E00E is inserted into input.

Expected

CapsLock IME toggle should not insert any visible character into opencode input.

Additional findings

Setting this in VS Code avoids the issue:

"terminal.integrated.enableKittyKeyboardProtocol": false

This suggests opencode is receiving kitty keyboard protocol functional key events and treating some non-text events as printable text.

Likely root cause

Under kitty keyboard protocol, CapsLock can be reported as functional key code 57358 (0xE00E, private-use code point). opencode likely does not filter this event path and inserts it as text.

Suggested fix direction

  • Distinguish text input from functional key events in stdin/raw key parsing.
  • Ignore lock keys (CapsLock/NumLock/ScrollLock) for text insertion.
  • Add a guard against private-use single-codepoint insertions (U+E000-U+F8FF) unless explicitly mapped to actions.

Environment

  • macOS
  • VS Code 1.110 (integrated terminal)
  • Not reproducible in VS Code 1.109.x

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Mar 6, 2026
  2. github-actions commented on Mar 6, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    For keybind-related issues, please also check our pinned keybinds documentation: #4997

  3. zHElEARN commented on Mar 20, 2026

    @zHElEARN

    same issue for me

  4. std4453 commented on Mar 26, 2026

    @std4453

    This happens with Claude Code as well, but not when inputting directly in the terminal.

  5. removed
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  6. github-actions commented on Jul 3, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions