Skip to content
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

Can't copy translation #3

Open
komape opened this issue Jun 12, 2024 · 5 comments
Open

Can't copy translation #3

komape opened this issue Jun 12, 2024 · 5 comments
Assignees

Comments

@komape
Copy link

komape commented Jun 12, 2024

It's impossible to copy the translation. In the input field, I can select the text and copy it. I can also paste text into the input field. However, the output is unreachable.

This is very annoying if I translate longer texts and don't want to type the translation by hand.

@cluttrdev
Copy link
Member

Thanks for the feedback. I added support for this in v0.3.0.

  • Copy: Ctrl + C (both input and output)
  • Cut: Ctrl + X (only input)
  • Paste: Ctrl + V (only input)

Can you try and see if this works for you?

@cluttrdev cluttrdev self-assigned this Jun 16, 2024
@komape
Copy link
Author

komape commented Jun 16, 2024

Can you try and see if this works for you?

Can't try it. See #4 for the reason.

@komape
Copy link
Author

komape commented Jun 17, 2024

  • opy: Ctrl + C (both input and output)

  • Cut: Ctrl + X (only input)

  • Paste: Ctrl + V (only input)

On Mac, you normally use the Cmd key instead of the Ctrl key for these actions. Can you configure deepl-tui to use those keys?

@cluttrdev
Copy link
Member

cluttrdev commented Jun 17, 2024

I'm aware of that, but the framework I'm using to create this terminal UI does not natively support this.

From its docs:

Note that using your terminal's /
operating system's key bindings for copy+paste functionality may not have the
expected effect as tview will not be able to handle these keys. Pasting text
using your operating system's or terminal's own methods may be very slow as
each character will be pasted individually.

and

The default clipboard is an internal text buffer local to this text area
instance, i.e. the operating system's clipboard is not used.

I had to override the default clipboard functionality to be able to use the system's clipboard in the first place. I might also be able to replicate the Cmd + C/V/X shortcuts behavior (not making any promises though).
Until then, do Ctrl + C/V/X key bindings work as you'd expect them to?

@komape
Copy link
Author

komape commented Jun 17, 2024

With Ctrl the keybindings are working 👍

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

No branches or pull requests

2 participants