Skip to content

bug(tui): Keyboard shortcuts don't work with Korean IME active #21163

Description

@MinseongS

Description

Bug Description

Keyboard shortcuts do not work when Korean IME is active. This includes
Ctrl+C (exit), Ctrl+X (leader key), and likely all Ctrl+ combinations.
Must switch to English input method first to use any shortcuts.

I believe this is because the app matches keybindings by character value, so
Ctrl+C registers as Ctrl+ㅊ, Ctrl+X as Ctrl+ㅌ, etc.

Environment: Ubuntu, VSCode integrated terminal

Prior Issues

This has been reported before and similar issues exist for other non-English
IMEs as well:

PRs #5956 and #6753 attempted fixes using physical keycode (baseCode) but
neither was merged.

Proposed Fix

Use baseCode (physical key position) from the Kitty keyboard protocol instead
of name (character value) for keybind matching. When baseCode is available,
prioritize it — this would fix the issue for Korean IME and likely other
non-Latin input methods as well.

Plugins

None

OpenCode version

v1.3.16

Steps to reproduce

  1. Switch to any non-English IME (e.g. Korean, Chinese, Japanese)
  2. Open opencode TUI
  3. Press Ctrl+C to exit → nothing happens
  4. Press Ctrl+X then p (leader key sequence) → nothing happens
  5. Switch to English IME
  6. Same shortcuts now work

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Activity

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

Metadata

Metadata

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