v1.8.7: fix Ctrl+C/V with Russian keyboard layout

- Add Cyrillic key bindings for Ctrl+C/V/D/L/Z and Ctrl+Shift+C/V
- Russian layout: с=C, м=V, в=D, д=L, я=Z
- Fixes: Ctrl+C (SIGINT/copy), Ctrl+V (paste) not working with РУС layout

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
chrome-storm-c442
2026-02-24 04:17:24 -05:00
parent 11ea811c4f
commit 0d3c433bac
2 changed files with 8 additions and 0 deletions

View File

@@ -224,6 +224,14 @@ class TerminalWidget(tk.Frame):
self._text.bind("<Control-Shift-C>", self._on_copy)
self._text.bind("<Control-Shift-V>", self._on_ctrl_v)
self._text.bind("<<Paste>>", lambda e: "break")
# Russian keyboard layout: Cyrillic equivalents (Windows)
self._text.bind("<Control-\u0441>", self._on_ctrl_c) # с
self._text.bind("<Control-\u043c>", self._on_ctrl_v) # м (Ctrl+V → м)
self._text.bind("<Control-\u0432>", self._on_ctrl_d) # в (Ctrl+D → в)
self._text.bind("<Control-\u0434>", self._on_ctrl_l) # д (Ctrl+L → д)
self._text.bind("<Control-\u044f>", self._on_ctrl_z) # я (Ctrl+Z → я)
self._text.bind("<Control-Shift-\u0421>", self._on_copy) # С (Shift)
self._text.bind("<Control-Shift-\u041c>", self._on_ctrl_v) # М (Shift)
# ── Mouse bindings ──
self._text.bind("<Button-1>", self._on_mouse_press)