Android Studio keyboard shortcuts
Android Studio's default keymap covers tool windows, search and navigation, visual layout tools, code generation and editing, builds, debugging, refactoring, and version control. Windows and Linux share one documented column, while macOS has its own combinations.
Windows, macOS, Linux · 133 shortcutsTool windows
Open the most-used Android Studio tool windows, return focus to the editor, or clear the workspace by hiding every tool window at once.
| Action | Windows | macOS | Linux |
|---|---|---|---|
| Open the Project tool window | Alt1 | Cmd1 | Alt1 |
| Open the Version Control tool window | Alt9 | Cmd9 | Alt9 |
| Open the Run tool window | ShiftF10 | ControlR | ShiftF10 |
| Open the Debug tool window | ShiftF9 | ControlD | ShiftF9 |
| Open the Logcat tool window | Alt6 | Cmd6 | Alt6 |
| Return focus to the editor | Esc | Esc | Esc |
| Hide all tool windows | ControlShiftF12 | CmdShiftF12 | ControlShiftF12 |
General IDE actions
Save and synchronize the project, inspect the current file, open settings and project structure, and switch focus between tabs and tool windows.
| Action | Windows | macOS | Linux |
|---|---|---|---|
| Save all | ControlS | CmdS | ControlS |
| Synchronize | ControlAltY | CmdOptionY | ControlAltY |
| Maximize or minimize the editor | ControlShiftF12 | ControlCmdF12 | ControlShiftF12 |
| Add the selected item to Favorites | AltShiftF | OptionShiftF | AltShiftF |
| Inspect the current file with the current profile | AltShiftI | OptionShiftI | AltShiftI |
| Open Quick Switch Scheme | Control` | Control` | Control` |
| Open the Settings dialog | ControlAltS | Cmd, | ControlAltS |
| Open Project Structure | ControlAltShiftS | Cmd; | ControlAltShiftS |
| Switch between tabs and tool windows | ControlTab | ControlTab | ControlTab |
Layout and Navigation editors
Change preview modes and device orientation, refresh rendering, zoom the canvas, open XML, and navigate components or destinations in Android design tools.
| Action | Windows | macOS | Linux |
|---|---|---|---|
| Zoom in within a visual layout | Control+ | Cmd+ | Control+ |
| Zoom out within a visual layout | Control- | Cmd- | Control- |
| Fit a visual layout to the available space | Control0 | Cmd0 | Control0 |
| Show a visual layout at actual size | ControlShift1 | CmdShift1 | ControlShift1 |
| Toggle Layout Editor Design and Blueprint modes | B | B | B |
| Toggle portrait and landscape modes | O | O | O |
| Toggle Layout Editor devices | D | D | D |
| Force a Layout Editor refresh | R | R | R |
| Toggle the Layout Editor render-errors panel | E | E | E |
| Delete selected constraints | Delete | Delete | Delete |
| Zoom in within the Layout Editor | Control+ | Cmd+ | Control+ |
| Zoom out within the Layout Editor | Control- | Cmd- | Control- |
| Zoom the Layout Editor to fit | Control0 | Cmd0 | Control0 |
| Go from the Layout Editor to XML | ControlB | CmdB | ControlB |
| Select all Layout Editor components | ControlA | CmdA | ControlA |
| Zoom in within the Navigation Editor | Control+ | Cmd+ | Control+ |
| Zoom out within the Navigation Editor | Control- | Cmd- | Control- |
| Zoom the Navigation Editor to fit | Control0 | Cmd0 | Control0 |
| Go from the Navigation Editor to XML | ControlB | CmdB | ControlB |
| Toggle the Navigation Editor render-errors panel | E | E | E |
| Group selected destinations into a nested graph | ControlG | CmdG | ControlG |
| Cycle forward through destinations | Tab | Tab | Tab |
| Cycle backward through destinations | ShiftTab | ShiftTab | ShiftTab |
| Select all Navigation Editor destinations | ControlA | CmdA | ControlA |
Code generation and editing
Generate and implement methods, complete and inspect code, navigate declarations, reshape selections, format lines, manage imports, and move between errors.
| Action | Windows | macOS | Linux |
|---|---|---|---|
| Generate code | AltInsert | CmdN | AltInsert |
| Override methods | ControlO | ControlO | ControlO |
| Implement methods | ControlI | ControlI | ControlI |
| Surround the selection with a language construct | ControlAltT | CmdOptionT | ControlAltT |
| Delete the line at the caret | ControlY | CmdDelete | ControlY |
| Duplicate the current line or selection | ControlD | CmdD | ControlD |
| Show basic code completion | ControlSpace | ControlSpace | ControlSpace |
| Show smart code completion | ControlShiftSpace | ControlShiftSpace | ControlShiftSpace |
| Complete the current statement | ControlShiftEnter | CmdShiftEnter | ControlShiftEnter |
| Open quick documentation | ControlQ | ControlJ | ControlQ |
| Show parameters for the selected method | ControlP | CmdP | ControlP |
| Go to the declaration | ControlB | CmdB | ControlB |
| Go to implementations | ControlAltB | CmdOptionB | ControlAltB |
| Go to the supermethod or superclass | ControlU | CmdU | ControlU |
| Open quick definition | ControlShiftI | CmdY | ControlShiftI |
| Toggle the Project tool window | Alt1 | Cmd1 | Alt1 |
| Toggle a bookmark | F11 | F3 | F11 |
| Toggle a bookmark with a mnemonic | ControlF11 | OptionF3 | ControlF11 |
| Comment or uncomment with a line comment | Control/ | Cmd/ | Control/ |
| Comment or uncomment with a block comment | ControlShift/ | CmdShift/ | ControlShift/ |
| Select successively larger code blocks | ControlW | OptionUp | ControlW |
| Shrink the selection to its previous state | ControlShiftW | OptionDown | ControlShiftW |
| Move to the start of the code block | Control[ | OptionCmd[ | Control[ |
| Move to the end of the code block | Control] | OptionCmd] | Control] |
| Select through the start of the code block | ControlShift[ | OptionCmdShift[ | ControlShift[ |
| Select through the end of the code block | ControlShift] | OptionCmdShift] | ControlShift] |
| Delete through the end of the word | ControlDelete | OptionDelete | ControlDelete |
| Delete through the start of the word | ControlBackspace | OptionDelete | ControlBackspace |
| Optimize imports | ControlAltO | ControlOptionO | ControlAltO |
| Show intention actions and quick fixes | AltEnter | OptionEnter | AltEnter |
| Reformat code | ControlAltL | CmdOptionL | ControlAltL |
| Auto-indent lines | ControlAltI | ControlOptionI | ControlAltI |
| Indent lines | Tab | Tab | Tab |
| Unindent lines | ShiftTab | ShiftTab | ShiftTab |
| Join lines intelligently | ControlShiftJ | ControlShiftJ | ControlShiftJ |
| Split the current line intelligently | ControlEnter | CmdEnter | ControlEnter |
| Start a new line | ShiftEnter | ShiftEnter | ShiftEnter |
| Collapse or expand the current code block | Control-orControl+ | Cmd-orCmd+ | Control-orControl+ |
| Collapse or expand all code blocks | ControlShift-orControlShift+ | CmdShift-orCmdShift+ | ControlShift-orControlShift+ |
| Move to the next or previous highlighted error | F2orShiftF2 | F2orShiftF2 | F2orShiftF2 |
Build and run
Build the project, run the selected configuration, or send code and resource changes to a running Android app with the documented apply commands.
| Action | Windows | macOS | Linux |
|---|---|---|---|
| Build the project | ControlF9 | CmdF9 | ControlF9 |
| Build and run | ShiftF10 | ControlR | ShiftF10 |
| Apply changes and restart the activity | ControlF10 | ControlCmdR | ControlF10 |
| Apply code changes | ControlAltF10 | ControlCmdShiftR | ControlAltF10 |
Debugging
Start a debug session, step through program execution, run to the cursor, inspect an expression, resume execution, and manage breakpoints.
| Action | Windows | macOS | Linux |
|---|---|---|---|
| Debug the selected configuration | ShiftF9 | ControlD | ShiftF9 |
| Step over | F8 | F8 | F8 |
| Step into | F7 | F7 | F7 |
| Smart step into | ShiftF7 | ShiftF7 | ShiftF7 |
| Step out | ShiftF8 | ShiftF8 | ShiftF8 |
| Run to the cursor | AltF9 | OptionF9 | AltF9 |
| Evaluate an expression | AltF8 | OptionF8 | AltF8 |
| Resume the program | F9 | CmdOptionR | F9 |
| Toggle a breakpoint | ControlF8 | CmdF8 | ControlF8 |
| View breakpoints | ControlShiftF8 | CmdShiftF8 | ControlShiftF8 |
Refactoring
Copy, move, rename, or safely delete code and extract reusable methods, variables, fields, constants, and parameters through IDE-aware refactors.
| Action | Windows | macOS | Linux |
|---|---|---|---|
| Copy a code element | F5 | F5 | F5 |
| Move a code element | F6 | F6 | F6 |
| Safely delete a code element | AltDelete | CmdDelete | AltDelete |
| Rename a code element | ShiftF6 | ShiftF6 | ShiftF6 |
| Change a method signature | ControlF6 | CmdF6 | ControlF6 |
| Inline the selected element | ControlAltN | CmdOptionN | ControlAltN |
| Extract a method | ControlAltM | CmdOptionM | ControlAltM |
| Extract a variable | ControlAltV | CmdOptionV | ControlAltV |
| Extract a field | ControlAltF | CmdOptionF | ControlAltF |
| Extract a constant | ControlAltC | CmdOptionC | ControlAltC |
| Extract a parameter | ControlAltP | CmdOptionP | ControlAltP |
Version control and local history
Commit or update the project, review recent changes, and open the version-control operations popup from the default Android Studio keymap.
| Action | Windows | macOS | Linux |
|---|---|---|---|
| Commit the project to version control | ControlK | CmdK | ControlK |
| Update the project from version control | ControlT | CmdT | ControlT |
| View recent changes | AltShiftC | OptionShiftC | AltShiftC |
| Open the version-control operations popup | Alt` | ControlV | Alt` |