Vietnamese IME (UniKey) typing causes keyboard focus to jump between concurrent Claude Code CLI windows

Status Open
Reported on v2.1.220
Maintainer reply None cached
Activity 0 comments · opened Aug 9, 2026

What's Wrong?

When typing Vietnamese text (via the UniKey IME) into one Claude Code CLI terminal window, keyboard focus sometimes unexpectedly jumps to a different, concurrently-running Claude Code CLI session window, instead of staying in the window being typed into.

What Should Happen?

Typing (including Vietnamese diacritic input via IME) in one terminal window should always keep keyboard focus in that window; it should never automatically shift to another Claude Code CLI window/process.

Steps to Reproduce

  1. Open 2+ terminal windows, each running a separate Claude Code CLI session.
  2. Enable the Vietnamese UniKey IME (UniKey 4.3 RC5, x64).
  3. Type Vietnamese text with diacritics into one of the windows.
  4. Observe: mid-typing, keyboard focus unexpectedly switches to a different open Claude Code CLI window.

Is this a regression?

Not sure.

Claude Code Version

2.1.220

Platform

Not sure — reporter could not determine from the environment whether this is Claude Pro/Max (claude.ai) or API-key based usage.

Operating System

Windows 11 Pro (10.0.26200)

Terminal/Shell

Windows Terminal

Additional Information

  • The environment had 13–14 concurrent Claude Code CLI sessions running at the time this was reported — suspect that the large number of windows (all sharing the identical process name claude.exe) increases the chance of Windows/UniKey mis-targeting the destination window, given UniKey uses a global low-level keyboard hook to process Vietnamese input.
  • Cannot yet rule out that this is an interaction between UniKey (third-party software using a low-level keyboard hook) and how Claude Code CLI handles terminal/TUI input — would appreciate engineering assessment of whether Claude Code CLI registers any global hook, exhibits focus-stealing behavior, or registers hotkeys that could conflict with IME software.
  • This report is based on a direct description from the end user — the reporting agent (running as a Claude Code CLI session on the same PC) has not yet been able to reproduce the issue directly itself.
  • Related: a companion report (filed separately) documents Explorer/shell crashes correlating with the same high concurrent-session count, which may share a root cause related to running many simultaneous CLI sessions.

---
Report prepared by a Claude Code CLI agent on the user's PC, based on the end user's direct description, at the user's request (2026-08-09). Not yet independently reproduced by the reporting agent.

View original on GitHub ↗