Code Monkey home page Code Monkey logo

Comments (6)

lfengzhang avatar lfengzhang commented on May 22, 2024 1

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

from bob.

ripperhe avatar ripperhe commented on May 22, 2024

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

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

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

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

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

from bob.

leeeeeeo avatar leeeeeeo commented on May 22, 2024

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

from bob.

ripperhe avatar ripperhe commented on May 22, 2024

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

from bob.

ripperhe avatar ripperhe commented on May 22, 2024

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

from bob.

cc978 avatar cc978 commented on May 22, 2024

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

from bob.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.