Eclipse keyboard shortcuts
Eclipse is the open-source Java IDE from the Eclipse Foundation. These defaults open types and resources, fix code, refactor, run and debug.
Most used Eclipse keyboard shortcuts
The Eclipse shortcuts worth learning first. The full list follows, grouped by task.
- Open a file (resource)MacShiftCmdRWindowsCtrlShiftRLinuxCtrlShiftR
- Open a typeMacShiftCmdTWindowsCtrlShiftTLinuxCtrlShiftT
- Quick Access (any command)MacCmd3WindowsCtrl3LinuxCtrl3
- Quick fixMacCmd1WindowsCtrl1LinuxCtrl1
- Content assistMacCtrlSpaceWindowsCtrlSpaceLinuxCtrlSpace
- Format the codeMacShiftCmdFWindowsCtrlShiftFLinuxCtrlShiftF
- Organize importsMacShiftCmdOWindowsCtrlShiftOLinuxCtrlShiftO
- Toggle commentMacCmd/WindowsCtrl/LinuxCtrl/
- RenameMacOptionShiftRWindowsAltShiftRLinuxAltShiftR
- Open the declarationMacF3WindowsF3LinuxF3
- Show Key AssistMacShiftCmdLWindowsCtrlShiftLLinuxCtrlShiftL
Search and navigation
15 shortcuts| Action | Mac | Windows | Linux |
|---|---|---|---|
| Open a file (resource) | ShiftCmdR | CtrlShiftR | CtrlShiftR |
| Open a type | ShiftCmdT | CtrlShiftT | CtrlShiftT |
| Quick Access (any command) | Cmd3 | Ctrl3 | Ctrl3 |
| Quick outline of the file | CmdO | CtrlO | CtrlO |
| Open the declaration | F3 | F3 | F3 |
| Open the call hierarchy | CtrlOptionH | CtrlAltH | CtrlAltH |
| References in the workspace | ShiftCmdG | CtrlShiftG | CtrlShiftG |
| Go to a line | CmdL | CtrlL | CtrlL |
| Back | Cmd[ | Alt← | Alt← |
| Forward | Cmd] | Alt→ | Alt→ |
| Last edit location | CtrlQ | CtrlQ | CtrlQ |
| Quick switch editor | CmdE | CtrlE | CtrlE |
| Next editor | CmdF6 | CtrlF6 | CtrlF6 |
| Maximize the active view | CtrlM | CtrlM | CtrlM |
| Show Key Assist | ShiftCmdL | CtrlShiftL | CtrlShiftL |
Editing
13 shortcuts| Action | Mac | Windows | Linux |
|---|---|---|---|
| Quick fix | Cmd1 | Ctrl1 | Ctrl1 |
| Content assist | CtrlSpace | CtrlSpace | CtrlSpace |
| Format the code | ShiftCmdF | CtrlShiftF | CtrlShiftF |
| Organize imports | ShiftCmdO | CtrlShiftO | CtrlShiftO |
| Toggle comment | Cmd/ | Ctrl/ | Ctrl/ |
| Add a block comment | ShiftCmd/ | CtrlShift/ | CtrlShift/ |
| Delete the line | CmdD | CtrlD | CtrlD |
| Move the line up | Option↑ | Alt↑ | Alt↑ |
| Move the line down | Option↓ | Alt↓ | Alt↓ |
| Copy the line down | OptionCmd↓ | CtrlAlt↓ | CtrlAlt↓ |
| Insert a line below | ShiftEnter | ShiftEnter | ShiftEnter |
| Insert a line above | ShiftCmdEnter | CtrlShiftEnter | CtrlShiftEnter |
| Source menu (generate getters, constructors) | OptionShiftS | AltShiftS | AltShiftS |
Refactoring
5 shortcuts| Action | Mac | Windows | Linux |
|---|---|---|---|
| Rename | OptionShiftR | AltShiftR | AltShiftR |
| Extract method | OptionShiftM | AltShiftM | AltShiftM |
| Extract a local variable | OptionShiftL | AltShiftL | AltShiftL |
| Inline | OptionShiftI | AltShiftI | AltShiftI |
| Refactor menu | OptionShiftT | AltShiftT | AltShiftT |
Search
5 shortcuts| Action | Mac | Windows | Linux |
|---|---|---|---|
| Find and replace | CmdF | CtrlF | CtrlF |
| Find next | CmdK | CtrlK | CtrlK |
| Find previous | ShiftCmdK | CtrlShiftK | CtrlShiftK |
| Incremental find | CmdJ | CtrlJ | CtrlJ |
| Open the Search dialog | CtrlH | CtrlH | CtrlH |
Files, run and debug
14 shortcuts| Action | Mac | Windows | Linux |
|---|---|---|---|
| Save | CmdS | CtrlS | CtrlS |
| Save all | ShiftCmdS | CtrlShiftS | CtrlShiftS |
| Close the editor | CmdW | CtrlW | CtrlW |
| Close all editors | ShiftCmdW | CtrlShiftW | CtrlShiftW |
| New (wizard) | CmdN | CtrlN | CtrlN |
| Build all | CmdB | CtrlB | CtrlB |
| Run the last launch | ShiftCmdF11 | CtrlF11 | CtrlF11 |
| Debug the last launch | CmdF11 | F11 | F11 |
| Toggle a breakpoint | ShiftCmdB | CtrlShiftB | CtrlShiftB |
| Step intoDebugging | F5 | F5 | F5 |
| Step overDebugging | F6 | F6 | F6 |
| Step returnDebugging | F7 | F7 | F7 |
| ResumeDebugging | F8 | F8 | F8 |
| Run to lineDebugging | CmdR | CtrlR | CtrlR |
No shortcuts match. Try fewer words, the key names only, or search every app.
Show the key map: which keys Eclipse uses mostDarker orange = used by more shortcuts
Eclipse editing shortcuts: format, comment, duplicate and move lines
- Add a block commentMacShiftCmd/WindowsCtrlShift/LinuxCtrlShift/
- Delete the lineMacCmdDWindowsCtrlDLinuxCtrlD
- Move the line upMacOption↑WindowsAlt↑LinuxAlt↑
- Move the line downMacOption↓WindowsAlt↓LinuxAlt↓
- Copy the line downMacOptionCmd↓WindowsCtrlAlt↓LinuxCtrlAlt↓
- Insert a line belowMacShiftEnterWindowsShiftEnterLinuxShiftEnter
- Insert a line aboveMacShiftCmdEnterWindowsCtrlShiftEnterLinuxCtrlShiftEnter
- Source menu (generate getters, constructors)MacOptionShiftSWindowsAltShiftSLinuxAltShiftS
- System.out.println and main
- Type sysout and press Ctrl+Space for System.out.println(), and main then Ctrl+Space for a main method.
- Getters, setters and Javadoc
- Alt+Shift+S opens the Source menu (then R for getters and setters); Alt+Shift+J adds a Javadoc comment to the method under the cursor.
- Uppercase, lowercase and indentation
- Ctrl+Shift+X makes the selection uppercase and Ctrl+Shift+Y lowercase. Ctrl+I corrects the indentation of the selected lines.
- Assign to a variable
- Put the cursor on an expression and press Ctrl+2, then L, to assign it to a new local variable.
Refactoring and code assist in Eclipse
- Extract methodMacOptionShiftMWindowsAltShiftMLinuxAltShiftM
- Extract a local variableMacOptionShiftLWindowsAltShiftLLinuxAltShiftL
- InlineMacOptionShiftIWindowsAltShiftILinuxAltShiftI
- Refactor menuMacOptionShiftTWindowsAltShiftTLinuxAltShiftT
Run and debug Java programs in Eclipse
- Build allMacCmdBWindowsCtrlBLinuxCtrlB
- Debug the last launchMacCmdF11WindowsF11LinuxF11
- Toggle a breakpointMacShiftCmdBWindowsCtrlShiftBLinuxCtrlShiftB
- Step intoMacF5WindowsF5LinuxF5
- Step overMacF6WindowsF6LinuxF6
- Step returnMacF7WindowsF7LinuxF7
- ResumeMacF8WindowsF8LinuxF8
- Run to lineMacCmdRWindowsCtrlRLinuxCtrlR
- Save allMacShiftCmdSWindowsCtrlShiftSLinuxCtrlShiftS
- Close the editorMacCmdWWindowsCtrlWLinuxCtrlW
- Close all editorsMacShiftCmdWWindowsCtrlShiftWLinuxCtrlShiftW
- New (wizard)MacCmdNWindowsCtrlNLinuxCtrlN
Change Eclipse keyboard shortcuts, or use them in IntelliJ
- Change keys
- Window > Preferences > General > Keys (Eclipse > Settings on Mac). Search for a command, click Binding, press the keys and Apply. Restore Defaults undoes your changes.
- Eclipse keys in IntelliJ or VS Code
- IntelliJ IDEA has a built-in Eclipse keymap in Settings > Keymap; in VS Code, install the Eclipse Keymap extension.
Eclipse keyboard shortcuts: questions
- How do I see all Eclipse keyboard shortcuts?
- Press Ctrl+Shift+L (Cmd+Shift+L on a Mac) for Key Assist, a list of every shortcut that works in the current view. Press it again to open the Keys preferences.
These are the default key bindings in Eclipse IDE 2025-09, as published by Eclipse Foundation. Shortcuts that need an extension, an add-in or a changed keymap are left out. Where two combinations do the same thing, both are shown.
Single-system lists: Eclipse keyboard shortcuts for Mac, Eclipse keyboard shortcuts for Windows, Eclipse keyboard shortcuts for Linux.
Each shortcut has its own page with the keys for every system, related shortcuts and the same action in other apps. The printable cheat sheet fits the whole list on one or two pages.