Two different keys record as the same shortcut when a layout puts punctuation on a letter key
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 35/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- typescript
- Domínio
- desktop
Direção de pesquisa
Start in packages/shared/src/keybindingMatching.ts, where shortcutKeyFromEvent chooses between event.key and event.code via EVENT_CODE_SHORTCUT_KEYS, and where recordedLayoutShortcutKey and resolveEventKeys decide what gets stored and matched. Reproduce the collision by checking that a keydown with key '.' and code KeyH is recorded differently from key '.' and code Period. Done means those two keys no longer record the same shortcut, while letter-layout cases such as Colemak and AZERTY (#7995) still behave as before. The mapping rule needs a maintainer decision first.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
What happened
On Linux (Hyprland, Wayland) with a custom XKB layout that puts . on the physical H key, Ctrl+H and Ctrl+. both record as ctrl+. in Settings → Keybindings. The two can't be bound separately. A ctrl+. binding fires on both keys, and on H a ctrl+h binding fires as well.
Diagnosis
Chromium reports:
- physical Ctrl+H:
key=".",code=KeyH - physical Ctrl+.:
key=".",code=Period
In packages/shared/src/keybindingMatching.ts, shortcutKeyFromEvent keeps event.key only when it is a letter. Otherwise it maps punctuation event.codes through EVENT_CODE_SHORTCUT_KEYS and falls back to event.key:
- KeyH:
.isn't a letter and KeyH isn't a punctuation code, so it falls back to"." - Period: maps to
"."
recordedLayoutShortcutKey records "." for both. resolveEventKeys returns {".", "h"} for KeyH and {"."} for Period, so ctrl+. matches both keys.
The ambiguity comes from mixing two rules: the layout symbol for letters, and the physical key for punctuation. When event.key is punctuation but event.code is Key[A-Z], one option is to record and match by that letter, as resolveEventKeys already adds it for matching. That keeps Colemak and AZERTY (#7995) working.
Steps to reproduce
- On Linux, use an XKB layout whose base symbol on the physical H key is
., e.g.key <AC06> { [ period, parenright ] };while<AB09>keeps.reachable. - Settings → Keybindings: record a shortcut with Ctrl + physical H. It records
ctrl+.. - Record another with Ctrl + physical
.. It also recordsctrl+., so the two conflict.
Version
0.1.10-nightly.20261111.4544 (desktop AppImage, commit 1264c206). No changes to the shortcut matching or recording code through main as of 2026-11-13 (nightly 0.1.10-nightly.20261113.4616).
Environment
NixOS, Linux 6.18 x64, Hyprland (Wayland), custom XKB layout (Halmak-based, with a Ctrl/Super level that gives QWERTY symbols), keyd 2.6.0.
Evidence
`keydown` events captured inside T3 Code Desktop, with no key remapping active for the app:
mods=ctrl key="." code=KeyH keyCode=72
mods=ctrl key="." code=Period keyCode=75
mods=ctrl key="e" code=KeyK keyCode=69
mods=ctrl key="v" code=KeyC keyCode=86
mods=ctrl key="c" code=KeyV keyCode=67
Chromium ignores the layout's Ctrl level for most keys. That part is upstream Chromium behaviour and isn't what this issue asks to fix. The collision between the first two lines happens in T3's own logic.
Related issues
#7995 / PR #4469 (shortcuts now follow layout symbols), #15954 / open PR #24034 (layout map for macOS Option shortcuts; same files, doesn't cover this case), #14833 (German +).
Fix applied or workaround
None.
Filed by
Claude Opus 5.5 (claude-opus-5-5) through T3 Code triage, in Claude Code.
- Linguagem predominante
- TypeScript
- Estrelas
- 24.8k
- Forks
- 6.4k
- Merge médio
- 59min
- PRs com merge (30d)
- 418
Preparar o ambiente
Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de pingdotgg/t3code
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 66/100
Mantenedores costumam responder em até 1 dia
-
via-triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 Meio dia Facilidade para iniciantes 68/100
Mantenedores costumam responder em até 1 dia
-
Question card options show LaTeX as raw source, though the question text renders itTalvez já em andamento Um pull request vinculado a esta issue está aberto ou já foi mesclado. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
Mantenedores costumam responder em até 1 dia
-
[Bug]: Settings inheritance popover shows raw slugs for branch naming, default permissions and response streamingTalvez já em andamento @juliusmarminge assumiu há 1 dia. Abertavouch:denounced
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
Mantenedores costumam responder em até 1 dia
Todas as issues de pingdotgg/t3code
Issues semelhantes
-
skill fork: kickoff message "Run the X skill now" makes the child call the skill tool on itselfAbertaarea: skills bug priority: medium
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 68/100
griffinwork40/agent-afk#4874 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
paperclipai/paperclip#21503 ·
Mantenedores costumam responder em até 1 dia
-
[Bug] List: the reorder hint's Move up stays enabled on the first row, and Move down on the lastAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 83/100
-
Blocklist addition requestAbertablocklist addition
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
MetaMask/eth-phishing-detect#312343 ·
Mantenedores costumam responder em até 1 dia
-
packages:player
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
Mantenedores costumam responder em até 1 dia