You are not logged in.
The Paste function suddenly stopped working in VSCode. The Ctrl+V shortcut does nothing, and selecting Paste in the context menu doesn't work either. The problem is with any text in VSCode. So, it is not only in the editor itself but also in all search bars.
It does work, however, when I copy and paste files in the VSCode's Explorer. Paste also works in the Terminal (Ctrl+Shift+V), and Ctrl+V works everywhere in the system. Ctrl+C/Copy and Ctrl+X/Cut work normally in VSCode; the problem is with Paste only.
The problem persists in VSCode launched with no extensions (code --disable-extensions).
I deleted ~/.config/Code - OSS, uninstalled VSCode (pacman -Rsn), and installed it again. Didn't help.
It seems the problem is not the keyboard shortcut (since the context menu's Paste doesn't work either), but I also tried the following:
1. In the Keyboard Shortcuts there are two Ctrl+V combinations:
{
"key": "ctrl+v",
"command": "editor.action.clipboardPasteAction"
}
{
"key": "ctrl+v",
"command": "filesExplorer.paste",
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceReadonly && !inputFocus"
}
Disabling the second one did not fix the issue.
2. Developer: Toggle Keyboard Shortcuts Troubleshooting gives the following when I press Ctrl+V:
2025-02-04 15:52:59.043 [info] [KeybindingService]: / Soft dispatching keyboard event
2025-02-04 15:52:59.074 [info] [KeybindingService]: \ Keyboard event cannot be dispatched
2025-02-04 15:52:59.074 [info] [KeybindingService]: / Received keydown event - modifiers: [ctrl], code: ControlLeft, keyCode: 17, key: Control
2025-02-04 15:52:59.074 [info] [KeybindingService]: | Converted keydown event - modifiers: [ctrl], code: ControlLeft, keyCode: 5 ('Ctrl')
2025-02-04 15:52:59.074 [info] [KeybindingService]: \ Keyboard event cannot be dispatched in keydown phase.
2025-02-04 15:52:59.634 [info] [KeybindingService]: / Soft dispatching keyboard event
2025-02-04 15:52:59.635 [info] [KeybindingService]: | Resolving ctrl+[KeyV]
2025-02-04 15:52:59.635 [info] [KeybindingService]: \ From 2 keybinding entries, matched editor.action.clipboardPasteAction, when: no when condition, source: built-in.
2025-02-04 15:52:59.636 [info] [KeybindingService]: / Received keydown event - modifiers: [ctrl], code: KeyV, keyCode: 86, key: v
2025-02-04 15:52:59.636 [info] [KeybindingService]: | Converted keydown event - modifiers: [ctrl], code: KeyV, keyCode: 52 ('V')
2025-02-04 15:52:59.636 [info] [KeybindingService]: | Resolving ctrl+[KeyV]
2025-02-04 15:52:59.636 [info] [KeybindingService]: \ From 2 keybinding entries, matched editor.action.clipboardPasteAction, when: no when condition, source: built-in.
2025-02-04 15:52:59.636 [info] [KeybindingService]: + Invoking command editor.action.clipboardPasteAction.
2025-02-04 15:53:01.418 [info] [KeybindingService]: + Ignoring single modifier ctrl due to it being pressed together with other keys.
It invokes the command, so it should be OK, I guess.
3. keybindings.json is empty, but I tried to add a custom combination for editor.action.clipboardPasteAction. It didn't work.
Could it be the last update on 2025-01-17 broke the editor.action.clipboardPasteAction command or something else? I haven't been using VSCode for the last couple of weeks, so I'm not sure when the issue occurred for the first time. Now I need VSCode again, but it is absolutely unusable without Paste.
VSCode (OSS): extra/code 1.96.4-1
Electron: extra/electron32 32.3.0-1
Thanks in advance!
Last edited by yked (2025-02-04 21:43:49)
Offline
Okay, I kinda fixed it. Not quite, but it is a workaround.
I unbound Ctrl+V from editor.action.clipboardPasteAction in ~/.config/Code - OSS/User/keybinding.json:
[
{
"key": "ctrl+v",
"command": "-editor.action.clipboardPasteAction"
}
]
The context menu's Paste still doesn't work, but Ctrl+V does.
Offline
It stopped working for me today as well! Many thanks for the workaround.
I am using Gnome on Wayland. Are you on Wayland as well?
Last edited by Vortex375 (2025-02-04 20:31:42)
Offline
This has been broken at least a week. I use Xfce on X11. How does a showstopper bug like this happen.
I have not found ANY workaround. Neither keybinding nor Edit menu work. Vscode is useless right now.
Last edited by danh337 (2025-02-04 20:53:55)
Offline
With an empty keybindings.json, and --disable-extensions, I just blindly discovered that Ctrl+Shift+V does do a paste. Sigh.
Offline
Ah, here you go folks:
https://github.com/microsoft/vscode/issues/238609
Offline
Are you on Wayland as well?
Yes, Wayland + KDE Plasma. But I just installed VSCode on another machine (Arch, GNOME + X11); the same issue, the same solution.
With an empty keybindings.json, and --disable-extensions, I just blindly discovered that Ctrl+Shift+V does do a paste. Sigh.
Does unbinding work?
Last edited by yked (2025-02-04 21:51:46)
Offline
I downgraded to Electron 32.2.8 and it works now. Bug is in Electron apparently.
(BTW, side rant, this is the last straw. I will be switching to Neovim. I've had it with Vscode and Electron apps.)
Last edited by danh337 (2025-02-04 21:55:41)
Offline
Offline