windows 连接到剪贴板?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/522362/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 11:56:15  来源:igfitidea点击:

Concatenating to Clipboard?

windowslinuxmacosclipboardappend

提问by leeand00

Does anyone know of a utility (for Windows or Linux or MacOSX) that will append the selected contents to the clipboard? Rather than killing what's already there...(maybe using a different keyboard shortcut instead of Ctrl+Cto do this?

有谁知道将所选内容附加到剪贴板的实用程序(适用于 Windows 或 Linux 或 MacOSX)?而不是杀死已经存在的东西......(也许使用不同的键盘快捷键而不是Ctrl+C来做到这一点?

And I don't mean multiple-clipboard items...

我不是指多个剪贴板项目...

I mean concatenating multiple strings of text to the same clip that resides on the clipboard.

我的意思是将多个文本字符串连接到位于剪贴板上的同一个剪辑。

采纳答案by leeand00

I found one! Lifehacker has featured it, although abet it being only for Windows here it is:

我找到了一个!Lifehacker 已经介绍了它,尽管它仅适用于 Windows,但它是:

Clipchain

夹链

回答by ahockley

There are a bunch of utilities that will keep a buffer/queue of the most recently clipped items.

有一堆实用程序可以保留最近剪辑项目的缓冲区/队列。

To do the specific function you mention (append to existing item), it would seem fairly trivial to write an app to get the clipboard, save what's there, append the new stuff, then transfer the combined contents back to the clipboard.

要执行您提到的特定功能(附加到现有项目),编写一个应用程序来获取剪贴板,保存那里的内容,附加新内容,然后将组合内容传输回剪贴板似乎相当简单。

A big caveat/gotcha... this would work fairly simply for text, but what about other formats? If there's an image on the clipboard, how would you handle appending text? Or vice versa?

一个很大的警告/问题......这对于文本来说非常简单,但是其他格式呢?如果剪贴板上有图像,您将如何处理附加文本?或相反亦然?

回答by Nic

LaunchBar has this functionality, and I use it extensively.

LaunchBar 具有此功能,我广泛使用它。

To be honest, I don't use it for pictures, so I don't know how they handle it, but it handles text beautifully.

说实话,我不把它用于图片,所以我不知道他们是如何处理的,但它处理文本很漂亮。

And the launch key is a double CMD/C (that's hold command and press C twice). Which is intuitive, because it is the same key combination. And next time you just do a normal CMD/C (once) for a normal copy, then we start again.

启动键是双 CMD/C(即按住命令并按 C 两次)。这是直观的,因为它是相同的组合键。下次您只需为普通副本执行普通 CMD/C(一次)时,我们将重新开始。

And what's more, there's clipboard history, so if you forget to double C, you haven't lost anything. And even more… I believe the shortcut access and paste options for the clipboard history is the best I have come across (and I have tried many utilities).

更重要的是,有剪贴板历史记录,所以如果你忘记将 C 加倍,你并没有丢失任何东西。甚至更多......我相信剪贴板历史的快捷方式访问和粘贴选项是我遇到的最好的(并且我尝试了许多实用程序)。

And, (finally), you get the benefits of LaunchBar's main asset as a launcher, which I've become so used to it, I can't live without it.

而且,(最后),您可以从 LaunchBar 的主要资产作为启动器的好处中受益,我已经习惯了它,没有它我就活不下去。

回答by ConsultUtah

No, but it would be relatively easy to write one in C# (or lots of other languages too):

不,但用 C#(或许多其他语言)编写一个相对容易:

  1. Create an app that hides to the "system tray"
  2. It creates a keyboard hook
  3. When the appropriate key-combo is pressed, if the Clipboard format is text, get the current text, concatenate the selected text (getting the selected text would be the hard part), and puts it back into the Clipboard.
  1. 创建一个隐藏到“系统托盘”的应用程序
  2. 它创建了一个键盘钩子
  3. 当按下适当的组合键时,如果剪贴板格式是文本,则获取当前文本,连接所选文本(获取所选文本将是困难的部分),然后将其放回剪贴板。

回答by Pierluigi Vernetto

on Windows 10, there is a "save multiple clipboard items" setting to enable multiple clipboard items to be stored. With WinLogo-V you can then view and paste them in any sequence.

在 Windows 10 上,有一个“保存多个剪贴板项目”设置可以存储多个剪贴板项目。使用 WinLogo-V,您可以按任意顺序查看和粘贴它们。

回答by Shawn

On Windows 7 and 8 the key combo Ctrl-Shift-C appends to the existing clipboard.

在 Windows 7 和 8 上,组合键 Ctrl-Shift-C 附加到现有剪贴板。

Cheers!

干杯!

回答by Vinayak Gadkari

The Autohotkey script appends to the clipboard when Ctrl-Insert is pressed.

当按下 Ctrl-Insert 时,Autohotkey 脚本会附加到剪贴板。

^Insert::  ; Add to clipboard
bak = %clipboard%
Clip()
clipboard = %bak%`r`n%clipboard%
return

回答by Brian Postow

I'm not sure if this is helpful at all, but emacs keeps its own kill-ring, so you can scroll back, or even search through things that you've cut or copied...

我不确定这是否有帮助,但是 emacs 保留了自己的终止环,因此您可以向后滚动,甚至可以搜索已剪切或复制的内容...