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 shortcuts

Tool 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.

ActionWindowsmacOSLinux
Open the Project tool windowAlt1Cmd1Alt1
Open the Version Control tool windowAlt9Cmd9Alt9
Open the Run tool windowShiftF10ControlRShiftF10
Open the Debug tool windowShiftF9ControlDShiftF9
Open the Logcat tool windowAlt6Cmd6Alt6
Return focus to the editorEscEscEsc
Hide all tool windowsControlShiftF12CmdShiftF12ControlShiftF12

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.

ActionWindowsmacOSLinux
Save allControlSCmdSControlS
SynchronizeControlAltYCmdOptionYControlAltY
Maximize or minimize the editorControlShiftF12ControlCmdF12ControlShiftF12
Add the selected item to FavoritesAltShiftFOptionShiftFAltShiftF
Inspect the current file with the current profileAltShiftIOptionShiftIAltShiftI
Open Quick Switch SchemeControl`Control`Control`
Open the Settings dialogControlAltSCmd,ControlAltS
Open Project StructureControlAltShiftSCmd;ControlAltShiftS
Switch between tabs and tool windowsControlTabControlTabControlTab

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.

ActionWindowsmacOSLinux
Zoom in within a visual layoutControl+Cmd+Control+
Zoom out within a visual layoutControl-Cmd-Control-
Fit a visual layout to the available spaceControl0Cmd0Control0
Show a visual layout at actual sizeControlShift1CmdShift1ControlShift1
Toggle Layout Editor Design and Blueprint modesBBB
Toggle portrait and landscape modesOOO
Toggle Layout Editor devicesDDD
Force a Layout Editor refreshRRR
Toggle the Layout Editor render-errors panelEEE
Delete selected constraintsDeleteDeleteDelete
Zoom in within the Layout EditorControl+Cmd+Control+
Zoom out within the Layout EditorControl-Cmd-Control-
Zoom the Layout Editor to fitControl0Cmd0Control0
Go from the Layout Editor to XMLControlBCmdBControlB
Select all Layout Editor componentsControlACmdAControlA

Code generation and editing

Generate and implement methods, complete and inspect code, navigate declarations, reshape selections, format lines, manage imports, and move between errors.

ActionWindowsmacOSLinux
Generate codeAltInsertCmdNAltInsert
Override methodsControlOControlOControlO
Implement methodsControlIControlIControlI
Surround the selection with a language constructControlAltTCmdOptionTControlAltT
Delete the line at the caretControlYCmdDeleteControlY
Duplicate the current line or selectionControlDCmdDControlD
Show basic code completionControlSpaceControlSpaceControlSpace
Show smart code completionControlShiftSpaceControlShiftSpaceControlShiftSpace
Complete the current statementControlShiftEnterCmdShiftEnterControlShiftEnter
Open quick documentationControlQControlJControlQ
Show parameters for the selected methodControlPCmdPControlP
Go to the declarationControlBCmdBControlB
Go to implementationsControlAltBCmdOptionBControlAltB
Go to the supermethod or superclassControlUCmdUControlU
Open quick definitionControlShiftICmdYControlShiftI
Toggle the Project tool windowAlt1Cmd1Alt1
Toggle a bookmarkF11F3F11
Toggle a bookmark with a mnemonicControlF11OptionF3ControlF11
Comment or uncomment with a line commentControl/Cmd/Control/
Comment or uncomment with a block commentControlShift/CmdShift/ControlShift/
Select successively larger code blocksControlWOptionUpControlW
Shrink the selection to its previous stateControlShiftWOptionDownControlShiftW
Move to the start of the code blockControl[OptionCmd[Control[
Move to the end of the code blockControl]OptionCmd]Control]
Select through the start of the code blockControlShift[OptionCmdShift[ControlShift[
Select through the end of the code blockControlShift]OptionCmdShift]ControlShift]
Delete through the end of the wordControlDeleteOptionDeleteControlDelete
Delete through the start of the wordControlBackspaceOptionDeleteControlBackspace
Optimize importsControlAltOControlOptionOControlAltO
Show intention actions and quick fixesAltEnterOptionEnterAltEnter
Reformat codeControlAltLCmdOptionLControlAltL
Auto-indent linesControlAltIControlOptionIControlAltI
Indent linesTabTabTab
Unindent linesShiftTabShiftTabShiftTab
Join lines intelligentlyControlShiftJControlShiftJControlShiftJ
Split the current line intelligentlyControlEnterCmdEnterControlEnter
Start a new lineShiftEnterShiftEnterShiftEnter
Collapse or expand the current code blockControl-orControl+Cmd-orCmd+Control-orControl+
Collapse or expand all code blocksControlShift-orControlShift+CmdShift-orCmdShift+ControlShift-orControlShift+
Move to the next or previous highlighted errorF2orShiftF2F2orShiftF2F2orShiftF2

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.

ActionWindowsmacOSLinux
Build the projectControlF9CmdF9ControlF9
Build and runShiftF10ControlRShiftF10
Apply changes and restart the activityControlF10ControlCmdRControlF10
Apply code changesControlAltF10ControlCmdShiftRControlAltF10

Debugging

Start a debug session, step through program execution, run to the cursor, inspect an expression, resume execution, and manage breakpoints.

ActionWindowsmacOSLinux
Debug the selected configurationShiftF9ControlDShiftF9
Step overF8F8F8
Step intoF7F7F7
Smart step intoShiftF7ShiftF7ShiftF7
Step outShiftF8ShiftF8ShiftF8
Run to the cursorAltF9OptionF9AltF9
Evaluate an expressionAltF8OptionF8AltF8
Resume the programF9CmdOptionRF9
Toggle a breakpointControlF8CmdF8ControlF8
View breakpointsControlShiftF8CmdShiftF8ControlShiftF8

Refactoring

Copy, move, rename, or safely delete code and extract reusable methods, variables, fields, constants, and parameters through IDE-aware refactors.

ActionWindowsmacOSLinux
Copy a code elementF5F5F5
Move a code elementF6F6F6
Safely delete a code elementAltDeleteCmdDeleteAltDelete
Rename a code elementShiftF6ShiftF6ShiftF6
Change a method signatureControlF6CmdF6ControlF6
Inline the selected elementControlAltNCmdOptionNControlAltN
Extract a methodControlAltMCmdOptionMControlAltM
Extract a variableControlAltVCmdOptionVControlAltV
Extract a fieldControlAltFCmdOptionFControlAltF
Extract a constantControlAltCCmdOptionCControlAltC
Extract a parameterControlAltPCmdOptionPControlAltP

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.

ActionWindowsmacOSLinux
Commit the project to version controlControlKCmdKControlK
Update the project from version controlControlTCmdTControlT
View recent changesAltShiftCOptionShiftCAltShiftC
Open the version-control operations popupAlt`ControlVAlt`

Make a printable Android Studio sheet