Skip to content

macOS native Chinese IME composition is not cancelled correctly when pressing Esc #37911

Closed as not planned

Description

@QX9967

Description

Description

When using the built-in macOS Chinese Pinyin input method, pressing Esc to cancel an unfinished pinyin composition does not behave correctly in opencode.

In some applications, pressing Esc during IME composition correctly clears the unfinished pinyin. However, in opencode, the unfinished pinyin text remains in the input field.

Expected behavior

The unfinished pinyin composition should be cancelled and removed, leaving the input field empty.

Actual behavior

The unfinished pinyin remains in the input field as plain text:

nihao

Additional context

This appears to be related to macOS IME composition handling. The application may not be correctly handling the cancellation of marked text / composition events from the native input method.

Other native macOS applications (such as Notes/TextEdit) correctly clear the composition when pressing Esc, so this may be an issue with opencode's text input handling rather than the input method itself.

Thanks!

Plugins

nothing

OpenCode version

1.18.3

Steps to reproduce

  1. Use macOS built-in Chinese Pinyin input method.
  2. Open opencode input field.
  3. Type an incorrect pinyin sequence, for example:
nihao
  1. Press Esc to cancel the current IME composition.

Screenshot and/or share link

Image

Operating System

mac os 26.5.2

Terminal

No response

Activity

  1. github-actions commented on Jul 20, 2026

    @github-actions
    Contributor

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

  2. github-actions commented on Sep 20, 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