github / github/copilot-cli

Ctrl+C does not work when non-English keyboard layout is active (e.g. Ukrainian)

未關閉
#1,382 1 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視
area:input-keyboard
主要語言
Shell
星號
11.2k
分支
1.9k
平均合併
14 小時 16 分鐘
30 天內合併 PR
6

描述

### Describe the bug

`Ctrl+C` does not cancel the current operation or clear input when a non-English keyboard layout (e.g. Ukrainian) is active. Nothing happens at all — the CLI simply ignores the key combination.

Switching back to an English (US) keyboard layout makes `Ctrl+C` work as expected again.

This likely affects all non-Latin keyboard layouts (Cyrillic, CJK, Arabic, etc.) where the physical key sends a different character code than ASCII `c`.

### Affected version

0.0.406

### Environment

- **OS:** macOS
- **Terminal:** iTerm2
- **Keyboard layout:** Ukrainian (standard macOS layout)

### Steps to reproduce the behavior

1. Start `copilot` in interactive mode
2. Send a prompt and wait for the agent to start working
3. Switch keyboard layout to Ukrainian (or any other non-English layout)
4. Press `Ctrl+C`
5. **Actual:** Nothing happens — the operation is not cancelled
6. Switch keyboard layout back to English
7. Press `Ctrl+C`
8. **Expected:** The operation is cancelled (this works correctly with English layout)

### Expected behavior

`Ctrl+C` should cancel the current operation regardless of the active keyboard layout. The shortcut should be matched by the physical key position (scancode) rather than the character produced by the current layout.

### Additional context

This is a common issue in terminal applications that match key events by character rather than by physical key / scancode. Many terminal frameworks solve this by normalizing modifier+key combinations to their US-layout equivalents.

Related issues:
- #139 — Additional Keyboard Shortcuts
- #1069 — Common editing shortcuts not working as expected
- #540 — Carry over terminal key-bindings
- #838 — Vietnamese IME Input Rendering Issue

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。