- Notifications
You must be signed in to change notification settings - Fork1k
feat: add copy on ctrl/command+shift+c and selection to web terminal#20129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Conversation
68fbab6
tofdebf61
Compare9dd55b4
to649839a
CompareThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Things look good to me overall, but like I mentioned in one of the comments, I feel like we should delegate some of the clipboard functionality to theuseClipboard
hook
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
if(ev.type==="keydown"){ | ||
copySelection(); | ||
} | ||
returnfalse; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Just to make sure I'm understanding: what do the boolean return values do for the terminal? I would've thought that it stops event propagation, but then I'm also seeing theev.preventDefault
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Nope the return does not stop propagation, it only tells xterm.js to do nothing. Although, at the moment xterm.js does not actually have any default behavior for these keybindings, so the default is already to do nothing.
I'll defer to michael here, he knows way more about the clipboard apis than me |
966c34c
to568e677
Compare568e677
to31b7ba2
Compare31b7ba2
to302b791
Compare
Closes#20044