Skip to content

macOS: switching input source during CJK composition inserts the uncommitted text instead of sending it as keys #13195

Closed

Description

@bo2themax

Discussed in #13193

Originally posted by Nagato-Yuzuru July 5, 2026

Issue Description

In nvim normal mode, while typing with a CJK system input method and the composition is still uncommitted (characters typed, no candidate picked yet), switching the input method (Caps Lock or Fn) inserts the uncommitted characters directly into the buffer. In other words, text gets inserted while I'm in normal mode.

On other terminals (Terminal.app, WezTerm, etc.) the uncommitted characters are instead sent as key events, so nvim reads them as normal-mode commands. Example: type jjjj, then switch input

method: on other terminals the cursor moves down four lines, while on Ghostty jjjj gets inserted into the buffer.

Expected Behavior

On an input-method switch, the uncommitted characters should reach nvim as normal key input, so nvim interprets them in its current mode. In normal mode that means they run as commands, the same as Terminal.app and WezTerm.

wezterm2026-07-05.12.29.23.mov

Actual Behavior

In nvim normal mode, while typing with a CJK system input method and the composition is still uncommitted (characters typed, no candidate picked yet), switching the input method (Caps Lock or Fn) inserts the uncommitted characters directly into the buffer. In other words, text gets inserted while I'm in normal mode.

2026-07-05.12.26.27.mov

Reproduction Steps

  1. Open Ghostty and start nvim.
  2. Make sure you're in normal mode.
  3. Switch to a system CJK input method.
  4. Type jjj so a composition is active (candidate window open, nothing committed yet).
  5. Switch the input method with Fn or Caps Lock.

Result: jjj gets inserted into the buffer.
Expected: it's handled as normal-mode commands (cursor moves down three lines), as on Terminal.app / WezTerm.

Ghostty Logs

No response

Ghostty Version

Ghostty 1.3.2-main-+8642142a3

Version
  - version: 1.3.2-main-+8642142a3
  - channel: tip
Build Config
  - Zig version   : 0.15.2
  - build mode    : .ReleaseFast
  - app runtime   : .none
  - font engine   : .coretext
  - renderer      : renderer.generic.Renderer(renderer.Metal)
  - libxev        : kqueue

OS Version Information

Darwin Kernel Version 25.5.0 macOS Tahoe 26.5.1 (25F80) arm64

(Linux only) Display Server

None

(Linux only) Desktop Environment/Window Manager

No response

Minimal Ghostty Configuration

--config-default-files=false

Additional Relevant Configuration

neovim with any version( I tried in 0.10.* ~ 0.12.*, all repro )

I acknowledge that:

  • I have reviewed the FAQ and confirm that my issue is NOT among them.
  • I have searched the Ghostty repository (both open and closed Discussions and Issues) and confirm this is not a duplicate of an existing issue or discussion.
  • I have checked the "Preview" tab on all text fields to ensure that everything looks right, and have wrapped all configuration and code in code blocks with a group of three backticks (```) on separate lines.

Activity

  1. added
    needs-confirmationA reproduction has been reported, but the bug hasn't been confirmed or reproduced by a maintainer.
    on Jul 5, 2026
  2. added
    inputKeyboard or mouse input
    and removed
    needs-confirmationA reproduction has been reported, but the bug hasn't been confirmed or reproduced by a maintainer.
    on Jul 5, 2026
  3. added this to the 1.4.0 milestone on Jul 8, 2026
  4. archcst commented on Jul 16, 2026

    @archcst

    I’m facing the same issue here on mac os.
    I tried on iterm2/kitty and even on cmux - which use ghostty as it's backend - they all work fine.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions