Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse keyboard shortcuts: "alt+shift+" vs. "shift+" vs. "ctrl+alt+" etc. -- Is there an underlying logic?

There are a zillion questions on SO about keyboard shortcuts in Eclipse, but there's I've always wondered if there is an underlying logic to the decisions of which shortcuts would be ctrl+alt+[some letter], and which would be just ctrl+[some letter] etc. Obviously there is a need to use a variety of combinations because there are only so many keys on the keyboard, but why, for example, is "add import" ctrl+shift+m, while "extract method" is alt+shift+m, instead of the other way around?

I think if there is some underlying logic to these decisions, it will make it easier to remember more shortcuts without having to scan through the huge right-click menus to find them, and I won't accidentally use the wrong one as often.

like image 618
Tyler Avatar asked Apr 12 '10 00:04

Tyler


1 Answers

I have no definitive answer, but some elements could include:

  • Ctrl+...: those are mainly legacy shortcuts (for copy-paste for instance, or "new documents", or "save", ...).
  • Alt+...: reserved for certain OS for menu shortcuts.

  • Ctrl+Shift+...: shortcuts for (mainly not always) direct actions (on the text or source code), like "add import")

  • Alt+Shift+...: shortcuts for (mainly, not always) indirect actions (a menu or windows is opened first, the user enter some other informations, and then the action is performed), like "extract method".
    Plus, Alt+Shift+... is sometimes followed by a letter, like Alt+Shift+Q (Show view), B (for showing breakpoints). Again: indirect action.
like image 71
VonC Avatar answered Oct 14 '22 04:10

VonC