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

划词翻译会覆盖剪切板的内容 #36

Closed
leeeeeeo opened this issue Feb 25, 2020 · 6 comments
Closed

划词翻译会覆盖剪切板的内容 #36

leeeeeeo opened this issue Feb 25, 2020 · 6 comments
Labels
bug Something isn't working

Comments

@leeeeeeo
Copy link

运行环境

  • Device: MacBook Pro (15-inch, 2018)
  • macOS: 10.15.3
  • Bob Version: 0.3.0

描述问题

按Option+D划词翻译后,Cmd+V粘贴出来的是划词内容,也就是会覆盖剪切板原始内容。

@leeeeeeo leeeeeeo added the bug Something isn't working label Feb 25, 2020
@ripperhe
Copy link
Owner

ripperhe commented Feb 26, 2020

这个确实是会的,目前取词的原理就是划词翻译快捷键之后,Bob 执行了 cmd + c 将选中了文本拷贝到了剪切板,然后从剪切板获取的文本。

现在我做了一些改进,下个版本不全是利用这种方式取词,在某些情况下不会影响剪切板,但有些情况还是会。

目前 Mac 上的 APP 我尚未发现有取词完全不影响剪切板的,我也没有找到比较完美的方案,即便是这方面做得比较好的 PopClip 也还是会有影响剪切板的情况。

还有就是,即便如此,目前有些 APP 还是获取不到当前选中的文本,以至于无法使用划词翻译

如果你有更好的方案,欢迎告知 🤝

@ripperhe ripperhe pinned this issue Feb 26, 2020
@leeeeeeo
Copy link
Author

leeeeeeo commented Mar 2, 2020

@ripperhe 我以为是这样的:先保存原始剪切版内容;再执行cmd+c拷贝到剪切板;翻译后恢复保存的原始剪切版内容。这样为什么不可行?

@ripperhe
Copy link
Owner

ripperhe commented Mar 2, 2020

@leeeeeeo 这个方案我还没试过,不确定是否可行,回头可以试下

@ripperhe
Copy link
Owner

@leeeeeeo
你好,我在 0.4.0 版本用了多种取词方案取词,在迫不得已要使用剪切板的情况下,按照你说的,在取词之后,恢复了剪切板的内容,你可以尝试下现在还影不影响剪切板了。

@lfengzhang
Copy link

@ripperhe 我试了下,这边暂时没发现还有覆盖剪贴板的情形

@cc978
Copy link

cc978 commented May 16, 2020

建议配合 paste 等软件使用,新复制会自动队列到活跃区,旧的复制被压入队列,通过 粘贴复制 软件,比如 paste 来管理。
这个数据流,不是 bob 独自应该处理的。
image

@ripperhe ripperhe unpinned this issue Aug 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants