Skip to content

Fix copy/paste behavior when interacting with terminals #498

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dymk
Copy link

@dymk dymk commented Mar 14, 2025

  • I have added an entry to CHANGELOG.md, or an entry is not needed for this change

(I'm not sure how you would like changes recorded in the changelog; should a new version number be created?) 

Summary of changes

  • Fixed copy/paste into the gdb & program pty terminals. The clipboard APIs being used were outdated and did not work in modern browsers.
  • Changed copy/paste hotkeys to ctrl + alt + c / ctrl + alt + v, because ctrl + alt + c is already bound by some browsers to open developer tools, sometimes in a way which cannot be unbound.
  • Added a text input field below the terminals which accept user keypresses, for easier copying and pasting with a native widget in a situation where the user wants to use ctrl + c / ctrl + v without those keypresses being captured by the terminal.\

Fixes #374

Screenshots:
image

Test plan

  • Tested ctrl+alt+c with terminal windows focused, observe that the "copied" toast is triggered and the clipboard is changed.
  • Tested ctrl+alt+v with terminal windows focused, observe that clipboard contents are pasted into the terminal
  • Tested entering / copying / pasting content in the text input below the terminal input, press "enter" key, observe that input is correctly relayed to the pty with proper newline at the end.

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.

Can't paste to gdb prompt/terminal
1 participant