Is there any way to set a keyboard shortcut to emulate Ctrl + C when some text or objects are selected, and Ctrl + V when none is? Pasting the clipboard on the top of something wouldn't be possible. It should be easy to code, but I'm curious if there exists some programs that can do it out of the box.


AutoHotkey Edit: updated link, thank you, John Y

It is a sophisticated scripting language with an abundance of conditional checks. I am an intermediate level user of AutoIT, and while it does have some conditional checks, I don't recall seeing a check such as

If any text is selected in active window
  Then send CTRL+C
  Else send CTRL+V

But I've also not looked for that kind of conditional check before. I have seen powerful conditional checks in AutoHotkey before, however, even though I have not written scripts with it. My experience has been that I have used a few scripts designed by other people.

If I could go back in time to when I first found AutoIt, I would wish to learn AutoHotkey instead. (But that might be because the grass is always greener on the other side of the logic gate. Ha!)

To directly answer your question in the narrowest sense, I am unaware of any clipboard management software that does what you are seeking, but I have also not needed clipboard software since Windows 95!

  • 2
    AutoHotkey user here. I have often thought "maybe I should have gone with AutoIt instead". ;) The main patch of grass that is greener on the AutoIt side for me is the cleanliness and regularity of the syntax. Anyway, I think it's important to point out that your link is out of date. You should be directing interested parties to AutoHotkey_L, which for all intents and purposes is the current main branch of AutoHotkey. (The AHK community at large has stopped referring to it with the "_L", except to differentiate it from the original.) – John Y Feb 6 '15 at 0:23
  • 1
    Thanks for the new URL! And yes, AutoIt is usually clean code. I have been able to quickly adapt functions for radically different uses. – hunterhogan Feb 6 '15 at 0:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.