Closed zzhaolei closed 2 months ago
cmd+d is implemented as duplicate line and duplicate selection.
What happens when you use cmd+d? There are good instructions on debugging keybinding issues on VS Code wiki.
output:
2024-04-28 21:37:29.733 [info] [KeybindingService]: / Soft dispatching keyboard event
2024-04-28 21:37:29.733 [info] [KeybindingService]: \ Keyboard event cannot be dispatched
2024-04-28 21:37:29.735 [info] [KeybindingService]: / Received keydown event - modifiers: [meta], code: MetaLeft, keyCode: 91, key: Meta
2024-04-28 21:37:29.735 [info] [KeybindingService]: | Converted keydown event - modifiers: [meta], code: MetaLeft, keyCode: 57 ('Meta')
2024-04-28 21:37:29.735 [info] [KeybindingService]: \ Keyboard event cannot be dispatched in keydown phase.
2024-04-28 21:37:30.077 [info] [KeybindingService]: / Soft dispatching keyboard event
2024-04-28 21:37:30.077 [info] [KeybindingService]: | Resolving meta+[KeyD]
2024-04-28 21:37:30.078 [info] [KeybindingService]: \ From 5 keybinding entries, matched extension.vim_cmd+d, when: editorTextFocus && vim.active && vim.use<D-d> && !inDebugRepl, source: user extension vscodevim.vim.
2024-04-28 21:37:30.078 [info] [KeybindingService]: / Received keydown event - modifiers: [meta], code: KeyD, keyCode: 68, key: d
2024-04-28 21:37:30.078 [info] [KeybindingService]: | Converted keydown event - modifiers: [meta], code: KeyD, keyCode: 34 ('D')
2024-04-28 21:37:30.078 [info] [KeybindingService]: | Resolving meta+[KeyD]
2024-04-28 21:37:30.078 [info] [KeybindingService]: \ From 5 keybinding entries, matched extension.vim_cmd+d, when: editorTextFocus && vim.active && vim.use<D-d> && !inDebugRepl, source: user extension vscodevim.vim.
2024-04-28 21:37:30.079 [info] [KeybindingService]: + Invoking command extension.vim_cmd+d.
2024-04-28 21:37:30.159 [info] [KeybindingService]: + Storing single modifier for possible chord meta.
2024-04-28 21:37:30.460 [info] [KeybindingService]: + Clearing single modifier due to 300ms elapsed.
From 5 keybinding entries, matched extension.vim_cmd+d
If you don't want vim handling cmd+d, add it (<D-d>
) to vim.handleKeys
set to false
. Note the default value of vim.handleKeys
has 3 entries already, so if you don't have this setting yet you should keep those values in settings.json:
"vim.handleKeys": {
"<C-d>": true,
"<C-s>": false,
"<C-z>": false,
"<D-d>": false, // add this one
},
Now working, thanks!!!!!!!!
macos cmd+d not work
expect: cmd+d Duplicate Line