-
How to enable copy select text mouse right click? |
Beta Was this translation helpful? Give feedback.
Answered by
Tyriar
Dec 14, 2022
Replies: 1 comment 1 reply
-
Here's how VS Code does it: Basically, listen to |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Vaman93
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here's how VS Code does it:
https://github.com/microsoft/vscode/blob/e30f8b58daf2a174787ae436c0d5dffda35d6981/src/vs/workbench/contrib/terminal/browser/terminalTabbedView.ts#L354-L381
https://github.com/microsoft/vscode/blob/e30f8b58daf2a174787ae436c0d5dffda35d6981/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts#L1129-L1150
Basically, listen to
mousedown
on the container that xterm was opened on and handle the copy manually viaTerminal.getSelection()
and thenavigator.clipboard
API.