Skip to content

Keybinding cmd+^ won't work with French keyboard layout on macOS because of dead key #307895

@ludon89

Description

@ludon89

Type: Bug

I'm using VS Code with a French keyboard layout on macOS and the keybinding I've set up for cmd+^ won't work.

The ^ key is a dead key on French keyboards, located where the [ key is on QWERTY layout. I've set the cmd+^ keybinding to toggle folding but pressing the key combination acts like pressing the ^ dead key without modifier keys: it waits for the next key to be input and adds the circumflex accent if it's a valid one like an E, A...

Expected behavior:
Set up "toggle folding" to cmd+^ keybinding (shows up as cmd+[BracketLeft] in the keybindings editor). Pressing the key in the editor should toggle folding.

Actual behavior:
the result of typing on the ^ key without holding cmd happens instead of folding being toggled.

Here's the log output for pressing the keyboard shortcut:

2026-04-05 14:57:46.988 [info] [Window] [KeybindingService]: / Soft dispatching keyboard event
2026-04-05 14:57:46.989 [info] [Window] [KeybindingService]: \ Keyboard event cannot be dispatched
2026-04-05 14:57:46.989 [info] [Window] [KeybindingService]: / Received  keydown event - modifiers: [meta], code: MetaLeft, keyCode: 91, key: Meta
2026-04-05 14:57:46.990 [info] [Window] [KeybindingService]: | Converted keydown event - modifiers: [meta], code: MetaLeft, keyCode: 57 ('Meta')
2026-04-05 14:57:46.990 [info] [Window] [KeybindingService]: \ Keyboard event cannot be dispatched in keydown phase.
2026-04-05 14:57:47.067 [info] [Window] [KeybindingService]: / Soft dispatching keyboard event
2026-04-05 14:57:47.068 [info] [Window] [KeybindingService]: | Resolving meta+[BracketLeft]
2026-04-05 14:57:47.068 [info] [Window] [KeybindingService]: \ From 1 keybinding entries, matched editor.toggleFold, when: editorTextFocus && foldingEnabled, source: user.
2026-04-05 14:57:47.150 [info] [Window] [KeybindingService]: + Storing single modifier for possible chord meta.
2026-04-05 14:57:47.451 [info] [Window] [KeybindingService]: + Clearing single modifier due to 300ms elapsed.

Interestingly, this issue doesn't occur for the other modifier keys alt/option and ctrl and the keybinding works as expected. Here's the log output for the same keybinding assigned to ctrl+^:

2026-04-05 15:01:50.746 [info] [Window] [KeybindingService]: / Soft dispatching keyboard event
2026-04-05 15:01:50.747 [info] [Window] [KeybindingService]: \ Keyboard event cannot be dispatched
2026-04-05 15:01:50.747 [info] [Window] [KeybindingService]: / Received  keydown event - modifiers: [ctrl], code: ControlLeft, keyCode: 17, key: Control
2026-04-05 15:01:50.747 [info] [Window] [KeybindingService]: | Converted keydown event - modifiers: [ctrl], code: ControlLeft, keyCode: 5 ('Ctrl')
2026-04-05 15:01:50.747 [info] [Window] [KeybindingService]: \ Keyboard event cannot be dispatched in keydown phase.
2026-04-05 15:01:50.898 [info] [Window] [KeybindingService]: / Soft dispatching keyboard event
2026-04-05 15:01:50.899 [info] [Window] [KeybindingService]: | Resolving ctrl+[BracketLeft]
2026-04-05 15:01:50.899 [info] [Window] [KeybindingService]: \ From 1 keybinding entries, matched editor.toggleFold, when: editorTextFocus && foldingEnabled, source: user.
2026-04-05 15:01:50.899 [info] [Window] [KeybindingService]: / Received  keydown event - modifiers: [ctrl], code: BracketLeft, keyCode: 219, key: Dead
2026-04-05 15:01:50.899 [info] [Window] [KeybindingService]: | Converted keydown event - modifiers: [ctrl], code: BracketLeft, keyCode: 92 ('[')
2026-04-05 15:01:50.900 [info] [Window] [KeybindingService]: | Resolving ctrl+[BracketLeft]
2026-04-05 15:01:50.900 [info] [Window] [KeybindingService]: \ From 1 keybinding entries, matched editor.toggleFold, when: editorTextFocus && foldingEnabled, source: user.
2026-04-05 15:01:50.900 [info] [Window] [KeybindingService]: + Invoking command editor.toggleFold.
2026-04-05 15:01:51.059 [info] [Window] [KeybindingService]: + Ignoring single modifier ctrl due to it being pressed together with other keys.

I've found similar reported issues with keybindings and dead keys but nothing on macOS.


VS Code version: Code 1.114.0 (e7fb5e9, 2026-04-01T09:27:11Z)
OS version: Darwin arm64 25.3.0
Modes:

System Info
Item Value
CPUs Apple M2 Pro (10 x 2400)
GPU Status 2d_canvas: enabled
GPU0: VENDOR= 0x106b [Google Inc. (Apple)], DEVICE=0x0000 [ANGLE (Apple, ANGLE Metal Renderer: Apple M2 Pro, Version 26.3.1 (Build 25D2128))], DRIVER_VENDOR=Apple, DRIVER_VERSION=26.3.1 ACTIVE
Machine model name: Mac
Machine model version: 14.9
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: enabled_on
trees_in_viz: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) 2, 2, 2
Memory (System) 32.00GB (0.08GB free)
Process Argv --crash-reporter-id d5ed6f0e-bf30-4fb1-9d66-99fe2f5db061
Screen Reader no
VM 0%
Extensions (66)
Extension Author (truncated) Version
better-comments aar 3.0.2
TabOut alb 0.2.4
increment-selection alb 0.2.0
Bookmarks ale 14.0.0
json-lines-editor Ano 0.1.0
markdown-mermaid bie 1.32.0
vscode-tailwindcss bra 0.14.29
npm-intellisense chr 1.4.5
gitignore cod 0.10.0
vscode-eslint dba 3.0.24
composer-php-vscode DEV 1.69.18673
phptools-vscode DEV 1.69.18673
profiler-php-vscode DEV 1.69.18673
rewrap-revived dnu 1.16.3
es7-react-js-snippets dsz 4.4.3
vscode-html-css ecm 2.0.14
EditorConfig Edi 0.18.1
prettier-vscode esb 12.4.0
auto-rename-tag for 0.1.10
codespaces Git 1.18.12
copilot-chat Git 0.42.3
remotehub Git 0.64.0
prettier-sql-vscode inf 1.6.0
svg joc 1.5.4
add-gitignore kur 0.0.3
lldb-dap llv 0.4.1
rainbow-csv mec 3.24.1
render-crlf med 1.9.3
git-graph mhu 1.30.0
shfmt mkh 1.5.1
compare-folders mos 0.29.0
vscode-containers ms- 2.4.1
vscode-docker ms- 2.0.0
debugpy ms- 2025.18.0
python ms- 2026.4.0
vscode-pylance ms- 2026.2.1
vscode-python-envs ms- 1.26.0
remote-containers ms- 0.447.0
remote-ssh ms- 0.122.0
remote-ssh-edit ms- 0.87.0
vscode-remote-extensionpack ms- 0.26.0
cmake-tools ms- 1.22.28
cpp-devtools ms- 0.4.6
cpptools ms- 1.31.4
cpptools-extension-pack ms- 1.5.1
powershell ms- 2025.4.0
remote-explorer ms- 0.5.0
remote-repositories ms- 0.42.0
remote-server ms- 1.5.3
material-icon-theme PKi 5.33.1
java red 1.53.0
LiveServer rit 5.7.10
reveal smu 1.2.7
swift-vscode swi 2.16.2
markdowntable Tak 0.13.0
scroll-to-cursor tob 0.1.0
vscode-status-bar-format-toggle tom 3.2.0
pdf tom 1.2.2
vscode-gradle vsc 3.17.2
vscode-java-debug vsc 0.58.5
vscode-java-dependency vsc 0.27.1
vscode-java-pack vsc 0.30.5
vscode-java-test vsc 0.44.0
vscode-maven vsc 0.45.1
php-debug xde 1.40.0
material-theme zhu 3.19.0

(6 theme extensions excluded)

A/B Experiments
vsliv368cf:30146710
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythonrdcb7:31342333
6518g693:31463988
aj953862:31281341
6abeh943:31336334
envsactivate1:31464700
cloudbuttont:31379625
42190218_ostrepl:31403339
use-responses-api:31390855
je187915:31454425
ec5jj548:31422691
cp_cls_t_966_ss:31454198
a9239246:31485761
c3h7c220:31478652
2bd77578_control:31488152
38bie571_auto:31426784
cp_cls_c_1081:31454833
ia-use-proxy-models-svc:31452481
e9c30283:31461165
test_treatment2:31471001
idci7584:31464702
nes-ftch-ctrl:31485414
showingstats:31481873
ei9d7968:31458072
534a6447_copy:31478748
hg17d649:31458077
chat:31457767
8hig5102:31480529
67jbj424:31486320
t-some:31486549
cpptoolsoff-v2:31475362
i2gc6536:31488224
regularsignin:31487065
db0gd219:31481871
ec1eg703:31488002
ddid_c:31478207
ja75b849:31488522
jah3f675:31485061
0he74425_c:31489329

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions