It seems a bit counter-intuitive to me that in many text editors / IDEs, pressing Ctrl+C with nothing selected, clears your clipboard, or replaces it with whatever is on the same line as the caret.

Is there a standard for dealing with this behaviour?

  • 1
    IMHO it is counter-intuitive, yet once I learned how Visual Studio does it (copy the whole line) it is incredible awesome to use.
    – Uwe Keim
    Commented Nov 30, 2013 at 14:14
  • 1
    it's absolutely infuriating, you place your cursor to paste then hit ctrl+c which is right next to ctrl+v and you are back a step, a different key for copy whole line is MUCH better
    – Toni Leigh
    Commented Nov 30, 2013 at 22:05
  • Interestingly this always used to happen to me, then I upgraded to Windows 8 and has been ok ever since...
    – tim.baker
    Commented Dec 1, 2013 at 18:42

2 Answers 2


The copy command is used to make a copy of a selection. If there is no active selection, the command shouldn't go and copy something all by itself, because there is no way for a user to understand beforehand what the copy command would do without an active selection.

Also, ctrl-c might be hit accidentally instead of hitting ctrl-v. If ctrl-c then clears the clipboard, you're punishing the user for this accident without any obvious gains (what use is an empty clipboard?).

Text-editors and IDE's however are very task specific and their users tend to spend many hours a day using them (for many, using a text-edtior pretty much makes up their working day). This allows users to learn hidden functionality by watching the application's behaviour. If there is even a small gain to be had by deviating from the normal behaviour, that might be warranted. Being able to copy or cut a line without having to make a selection is super handy when you're spending many hours a day shifting code.

A lot of software should be super easy to use for first-timers. Many people never get beyond that first-timer skill level. However, some software is inherently focused at power users. Power users need to be able to go further up the learning curve to become more efficient at using the software. Some software has an easy curve and doesn't break too many common patterns, so users can get an easy start. Other software, like Sublime Text, or more extremely Vim, hardly have any real first-time users. Their users will already be familiar with the basics and need to have tools at their disposal to become more efficient fast. With this head start and a motivated and experienced user base allows them to deviate from the defaults.

It's just another example where UX doesn't have a clear-cut answer that applies to all situations. Deviating from established standard patterns can actually be good UX even though UX-ers will spend a lot of their time fighting such deviations.

  • fair point about speeding things up in a specific use case, however, the accidental alteration of clip board contents when mistakenly pressing the key right next to the one you want to use is a bad idea (we always want to use paste after copy, why put a key right next to paste that can be accidentally pressed and removes our copy from the last step). Personally I switched it off and haven't missed it, though I'd be interested to see the results of testing / surveying.
    – Toni Leigh
    Commented Nov 30, 2013 at 22:09
  • 2
    Just on "what use is an empty clipboard?" — security. Plenty of times, I've copied a blank space or some nonsense data to remove things from the clipboard, especially on a public computer. Commented Nov 30, 2013 at 23:10

My suggestion is when typing ctrl-c with no selection the editor should do nothing by default, and offer the option to change the action in the settings. Power-users are used to opening the settings anyway when they first start with a new IDE or text editor. Besides, importing settings from other IDE's is becoming more and more common.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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