Dead key used as a shortcut or first key of a chord leaves dead-key composition active
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
Type: Bug
There are existing issues related to dead keys and international keyboard layouts, but I couldn't find one covering dead keys used in a shortcut by itself, or as the first key of a sequential chord. This issue describes that specific case.
**Steps to reproduce**
1. Use the Finnish keyboard layout.
2. Add a keybinding that uses a dead key as a physical-key shortcut or the first part of a chord, for example:
```json
{
"key": "[BracketRight] d",
"command": "workbench.action.showCommands"
}
```
(`BracketRight` is the `¨` dead key on the Finnish layout.)
3. Open a text editor.
4. Press `¨ d`.
**Expected Result**
* The command executes.
* No text is inserted into the field.
* The dead-key composition state is cleared because the key sequence was consumed as a shortcut.
**Actual Result**
* The command executes correctly.
* A literal `d` is also inserted into the text field.
This only happens when the first key is a dead key.
For comparison, using:
```json
{
"key": "[BracketLeft] d",
"command": "workbench.action.showCommands"
}
```
(where `BracketLeft` is `å` on the Finnish layout, not a dead key) executes the command without inserting text.
**Additional Observations**
Using a single-key shortcut bound to the dead key:
```json
{
"key": "[BracketRight]",
"command": "workbench.action.showCommands"
}
```
does not immediately insert any text, but the dead-key composition remains active after the command executes.
The next keypress behaves as if the dead key had been typed normally:
* Pressing `e` produces `ë`.
* Pressing `d` (which does not have a composed form) inserts `¨d`.
This suggests the shortcut consumes the keyboard event but does not clear the pending dead-key composition state.
The same behavior occurs with extensions disabled, so it does not appear to be caused by VSCodeVim or another extension.
**Keyboard Shortcuts Troubleshooting Log**
The troubleshooting log shows that the shortcut is matched and invoked normally, with no additional `keydown` events corresponding to the inserted character. For example:
```
2026-07-16 16:21:27.994 [info] [Window] [KeybindingService]: / Soft dispatching keyboard event
2026-07-16 16:21:27.995 [info] [Window] [KeybindingService]: | Resolving ;
2026-07-16 16:21:27.995 [info] [Window] [KeybindingService]: \ From 1 keybinding entries, awaiting 1 more chord(s), when: no when condition, source: user.
2026-07-16 16:21:27.996 [info] [Window] [KeybindingService]: / Received keydown event - modifiers: [], code: BracketRight, keyCode: 186, key: Dead
2026-07-16 16:21:27.996 [info] [Window] [KeybindingService]: | Converted keydown event - modifiers: [], code: BracketRight, keyCode: 85 (';')
2026-07-16 16:21:27.996 [info] [Window] [KeybindingService]: | Resolving ;
2026-07-16 16:21:27.999 [info] [Window] [KeybindingService]: \ From 1 keybinding entries, awaiting 1 more chord(s), when: no when condition, source: user.
2026-07-16 16:21:28.001 [info] [Window] [KeybindingService]: + Entering multi-chord mode...
2026-07-16 16:21:28.253 [info] [Window] [KeybindingService]: / Soft dispatching keyboard event
2026-07-16 16:21:28.254 [info] [Window] [KeybindingService]: | Resolving ;,D
2026-07-16 16:21:28.254 [info] [Window] [KeybindingService]: \ From 1 keybinding entries, matched workbench.action.showCommands, when: no when condition, source: user.
2026-07-16 16:21:28.255 [info] [Window] [KeybindingService]: / Received keydown event - modifiers: [], code: KeyD, keyCode: 68, key: d
2026-07-16 16:21:28.255 [info] [Window] [KeybindingService]: | Converted keydown event - modifiers: [], code: KeyD, keyCode: 34 ('D')
2026-07-16 16:21:28.256 [info] [Window] [KeybindingService]: | Resolving ;,D
2026-07-16 16:21:28.256 [info] [Window] [KeybindingService]: \ From 1 keybinding entries, matched workbench.action.showCommands, when: no when condition, source: user.
2026-07-16 16:21:28.270 [info] [Window] [KeybindingService]: + Invoking command workbench.action.showCommands.
```
No additional keyboard events are logged, even though a literal `d` is inserted into the text field afterwards.
This suggests the extra character is coming from the text composition/dead-key input pipeline rather than the keybinding service.
VS Code version: Code 1.129.0 (125df4672b8a6a34975303c6b0baa124e560a4f7, 2026-07-15T00:08:44Z)
OS version: Windows_NT x64 10.0.26200
Modes:
System Info
|Item|Value|
|---|---|
|CPUs|13th Gen Intel(R) Core(TM) i5-1335U (12 x 2496)|
|GPU Status|2d_canvas: enabled
GPU0: VENDOR= 0x8086, DEVICE=0xa7a1 [Intel(R) Iris(R) Xe Graphics], DRIVER_VENDOR=Intel, DRIVER_VERSION=31.0.101.5382 *ACTIVE*
GPU1: VENDOR= 0x1414, DEVICE=0x008c [Microsoft Basic Render Driver], DRIVER_VERSION=10.0.26100.8521
Machine model name:
Machine model version:
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
trees_in_viz: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgpu: enabled
webnn: disabled_off|
|Load (avg)|undefined|
|Memory (System)|15.69GB (3.77GB free)|
|Process Argv|--crash-reporter-id 72398e6e-23bc-49ee-aaa8-393e17700b2b|
|Screen Reader|no|
|VM|0%|
Extensions disabled
A/B Experiments
```
vsliv368:30146709
pythonvspyt551cf:31249601
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythonrdcb7:31342333
6518g693:31463988
aj953862:31281341
4f60g487:31327383
63221493:31336333
envsactivate1:31551504
cloudbuttont:31379625
3efgi100_wstrepl:31403338
839jf696:31457053
ec5jj548:31422691
cp_cls_t_966_ss:31526232
4je02754:31466945
c3h7c220:31478652
cp_cls_c_1081:31454833
conptydll_true:31498968
e9c30283:31461165
test_treatment2:31471001
46204921:31447328
idci7584:31464702
e3e4d672:31494082
ei9d7968:31496641
chat:31457767
7e187181:31503455
ghj88844:31499326
ddid_t:31478206
hmra_i5g22:31518061
7df3h592:31512476
cp_cls_t_1082:31535311
logging_enabled_new:31498466
db5d2638:31499441
jb_cp_cls_t_632:31543129
b1ei0813:31506238
56dj4588:31512888
32d76977:31512328
ha629193:31508444
cdk-lw-on:31524445
f9bf7985:31543584
jh5f2457_c:31540921
g4a0e106:31529594
41836166:31537719
prpt_lrg:31518466
jbcp_cls_pctr_t:31531130
61138546:31518536
cp_intellij_t_nes:31548657
d7b18187:31526828
h561g132:31533256
sessions_5:31532894
ihg5j128:31534457
f412h606:31551416
7g2b5551:31542111
7642ad28:31551796
6i51c363:31551401
```
Contributor guide
Assessment
This issue has not been assessed yet.