Skip to content

Conversation

@bkneis
Copy link
Contributor

@bkneis bkneis commented Apr 9, 2025

This PR fixes copy and pasting from the desktop app logs.

The issue was a known xterm limitation in that ctrl +c is mapped to the terminals key handlers. Previously we relied on document.execCommand("copy") but this is deprecated in web view. Looking at the dependency GH issues xtermjs/xterm.js#2478 and xtermjs/xterm.js#292 a user offered an alternative solution which is to use attachCustomKeyEventHandler and return false on Ctrl + C to prevent the terminal key binding being used on ctrl +c.

https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand

@bkneis bkneis requested a review from a team April 9, 2025 09:50
@pascalbreuninger pascalbreuninger merged commit 5b44d6a into loft-sh:main Apr 9, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants