Eclipse copy/paste entire line keyboard shortcut

Anyone know the keyboard shortcut to copy/paste a line into a new line in Eclipse, without having to highlight the entire line?

ctrl-alt-down turns my whole screen upside down (I'm on windows). Interestingly, that's what's specified in the windows->preferences.


Ctrl-Alt-Down: copies current line or selected lines to below

Ctrl-Alt-Up:: copies current line or selected lines to above

Ctrl-Shift-L: brings up a List of shortcut keys

See Windows/Preference->General->Keys.


(Tested on Windows) [Per below comments, works as well in Ubuntu, IBM RTC 4 / RSA 9]

  1. In Eclipse, press Ctrl+Shift+L two times in succession (or Ctrl + 3 > type: Keys > Enter).
  2. In 'type filter text' (search) text box, type Copy Lines
  3. Select the filtered row, right click the 'Binding' field, and do Select All
  4. Press Ctrl+Shift+V
  5. Give OK

From now on, for any line you want to duplicate, just press Ctrl+Shift+V.


You have to turn off the graphics hot keys that flip the screen. If you're on Windows, you need to right click on the Windows desktop and select "Graphics Properties..." (or something similar depending on your version of Windows). This will bring up a screen where you can manage graphics and display options, look for a place where you can disable hot keys, sometimes it's hidden under something like "Options and Support". Turn off the CTRL + ALT + and CTRL + ALT + hotkeys (alternatively you can just disable all graphics hot keys if you're not using them).


If you want to copy a line to the clipboard you can also use the trick:

Ctrl-Alt-Down followed by Ctrl-X

The drawback is that the file where you copy the line from becomes dirty.