Reputation: 59
I am experiencing an issue with Visual Studio Code. When I try to paste text into VS Code after copying from certain browsers and applications, the paste operation does not work as expected.
The copied text should be pasted into the file in Visual Studio Code.
Nothing is pasted when pressing Ctrl+V in VS Code if the text was copied from a Chromium-based browser. However, when checking the clipboard history with Windows+V, the text is visible and selecting it from the clipboard allows it to be pasted into VS Code.
The issue does not occur when pasting into other applications or when the text is copied from Firefox. I have also tried copying from the Obsidian app and encountered the same issue.
Has anyone else experienced this issue or does anyone have suggestions for potential solutions or workarounds?
video demonstration of the issue showing the steps and the behavior I am encountering.
Upvotes: 2
Views: 3237
Reputation: 98
Unbinding paste from Keyboard Shortcuts fixes this problem for me.
Related GH issue: https://github.com/microsoft/vscode/issues/238609#issuecomment-2611147382
Arch, Hyprland, VSCode v1.97.0
This problem should be resolved in VSCode v1.98: https://github.com/microsoft/vscode/pull/237557
Upvotes: 0
Reputation: 59
I found a "solution" to my issue with copy-pasting text.
The file ~/.config/code-flags.conf
contained the following lines:
--ozone-platform-hint=wayland
--disable-gpu
By removing the line --ozone-platform-hint=wayland
, the copy-paste functionality started working again as expected. VSCode now runs under XWayland instead of natively on Wayland, which seems to solve the problem.
Switching VSCode to run under XWayland resolved the clipboard issues. It appears that the configuration forcing VSCode to use Wayland was causing the problem.
Upvotes: 0