views:

374

answers:

4

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+C to do this?

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

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

A: 

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...

Brian Postow
+3  A: 

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?

ahockley
Yeah that's true...kudos for figuring out what I meant! I refined my question though.
leeand00
Writing that would be a native-windows app wouldn't it?
leeand00
It would be a native app on the platform. You mentioned Windows, it would be pretty easy with .NET - the clipboard interfaces are in System.Windows.Clipboard
ahockley
Oh sweet! Maybe I'll have to try that...I even thought of a cool feature for when you're copying images...a dialog pops up (with keyboard controls of course) and asks the user where they want to append the image to on the text. (or we have a different keyboard shortcut for each placement)
leeand00
Think it small enough for the free edition that MS offers?
leeand00
+1  A: 

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

  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.
consultutah
@consultutah I'm going to get a C# book in the mail in a few days, I'm going to have to give this a try.
leeand00
Keyboard hook is the wrong way to go. A properly-implemented clipboard viewer is what you want.
Chris Thornton
A: 

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

Clipchain

leeand00