Android Studio, the official integrated development environment (IDE) for Android app development, offers numerous shortcut keys to enhance productivity. These shortcuts are categorized based on their functionality and are tailored for both Windows and MacOS platforms.
Android Studio Windows Shortcut Keys
General
Shortcut
Action
CtrlS
Save all
CtrlAltY
Synchronize
CtrlShiftF12
Minimize or maximize the editor
AltShiftF
Add to favorites
AltShiftI
Inspect the current file with the current profile
Ctrl`
Quick switch the scheme
CtrlAltS
Open the settings dialogue
CtrlAltShiftS
Open the project structure dialogue
CtrlTab
Switch between the tabs and tool window
Navigating and Searching
Shortcut
Action
ShiftShift
Search everything, including code and menus
CtrlF
Find
F3
Find next
ShiftF3
Find previous
CtrlR
Replace
CtrlShiftA
Find action
CtrlAltShiftN
Search by a symbol name
CtrlN
Find class
CtrlShiftN
Find file, instead of class
CtrlShiftF
Find in path
CtrlF12
Open file structure pop-up
AltRight/Left
Navigate between open editor tabs
CtrlEnter
Jump to source
ShiftF4
Open the current editor tab in a new window
CtrlE
Recently opened files pop-up
CtrlShiftE
Recently edited files pop-up
CtrlShiftBackspace
Go to last edit location
CtrlF4
Close active editor tab
Esc
Return to editor window from a tool window
ShiftEsc
Hide active or last active tool window
CtrlG
Go to line
CtrlH
Open type hierarchy
CtrlShiftH
Open method hierarchy
CtrlAltH
Open call hierarchy
Writing Code
Shortcut
Action
AltInsert
Generate code, e.g. getters, setters, constructors, new class
CtrlO
Override methods
CtrlI
Implement methods
CtrlAltT
Surround with if...else, try...catch, etc
CtrlY
Delete line at caret
Ctrl-
Collapse the current code block
Ctrl+
Expand the current code block
CtrlShift-
Collapse all code blocks
CtrlShift+
Expand all code blocks
CtrlD
Duplicate the current line or selection
CtrlSpace
Basic code completion
CtrlShiftSpace
Smart code completion, filters the list of methods and variables by expected type
CtrlShiftEnter
Complete statement
CtrlQ
Quick documentation lookup
CtrlP
Show parameters for selected method
CtrlB
Go to declaration, directly
CtrlAltB
Go to implementations
CtrlU
Go to super-method or super-class
CtrlShiftI
Open quick definition lookup
Alt1
Toggle project tool window visibility
F11
Toggle bookmark
CtrlF11
Toggle bookmark with mnemonic
Ctrl/
Comment or uncomment with line comment
CtrlShift/
Comment or uncomment with block comment
CtrlW
Select successively increasing code blocks
CtrlShiftW
Decrease current selection to previous state
Ctrl[
Move to code block start
Ctrl]
Move to code block end
CtrlShift[
Select to the code block start
CtrlShift]
Select to the code block end
CtrlDel
Delete to the end of a word
CtrlBackspace
Delete to the start of a word
CtrlAltO
Optimize imports
AltEnter
Project quick fix, show intention actions and quick fixes
CtrlAltL
Reformat code
CtrlAltI
Auto-indent lines
Tab
Indent lines
ShiftTab
Unindent lines
CtrlShiftJ
Smart line join
CtrlEnter
Smart line split
ShiftEnter
Start new line
F2
Next highlighted error
ShiftF2
Previous highlighted error
Viewing Layouts
Shortcut
Action
Ctrl+
Zoom in
Ctrl-
Zoom out
Ctrl0
Fit to screen
CtrlShift1
Actual size
Layout Editor
Shortcut
Action
B
Toggle between Design and Blueprint modes
O
Toggle between Portrait and Landscaope modes
D
Toggle devices
R
Force refresh
E
Toggle render errors panel
Del
Delete constraints
Ctrl+
Zoom in
Ctrl-
Zoom out
Ctrl0
Zoom to fit
CtrlB
Go to XML
CtrlA
Select all components
Shift(click)
Select multiple components
Navigation Editor
Shortcut
Action
Ctrl+
Zoom in
Ctrl-
Zoom out
Ctrl0
Zoom to fit
CtrlB
Go to XML
E
Toggle render errors panel
CtrlG
Group into a nested graph
Tab
Cycle through destinations
CtrlA
Select all destinations
Ctrl(click)
Select multiple destinations
Build and Run
Shortcut
Action
CtrlF9
Build
ShiftF10
Build and run
CtrlF10
Apply changes and restart activity
CtrlAltF10
Apply code changes
Debugging
Shortcut
Action
ShiftF9
Debug
F8
Step over
F7
Step into
ShiftF7
Smart step into
ShiftF8
Step out
AltF9
Run to cursor
AltF8
Evaluate expression
F9
Resume program
CtrlF8
Toggle breakpoint
CtrlShiftF8
View breakpoints
Refactoring
Shortcut
Action
F5
Copy
F6
Move
AltDel
Safe delete
ShiftF6
Rename
CtrlF6
Change signature
CtrlAltN
Inline
CtrlAltM
Extract method
CtrlAltV
Extract variable
CtrlAltF
Extract field
CtrlAltC
Extract constant
CtrlAltP
Extract parameter
Version Control
Shortcut
Action
CtrlK
Commit project to VCS
CtrlT
Update project from VCS
AltShiftC
View recent changes
Alt`
Open VCS pop-up
Android Studio MacOS Shortcut Keys
Code Editing
Shortcut Key
Function Description
Command + Space
Basic code completion
Command + Shift + Enter
Complete statement
Command + Option + L
Reformat code
Command + Option + O
Optimize imports
Option + Shift + Up/Down
Move statement up/down
Command + D
Duplicate line
Command + /
Comment/uncomment line
Command + Option + /
Add a documentation comment
Command + J
Insert live template
Command + Option + T
Surround with…
Command + Option + Left/Right
Expand/collapse code block
Option + Enter
Show intention actions and quick fixes
Command + Option + Shift + U
Toggle case (upper/lower)
Navigation
Shortcut Key
Function Description
Command + O
Find a class
Command + Shift + O
Find a file
Command + Shift + M
Locate related files
Control + Command + Left/Right
Navigate back/forward
Command + E
Recent files
Command + Shift + E
Recently edited files
Command + 1 (or 2, 3, etc.)
Jump to tool windows
Command + Option + Left/Right
Jump to last/next edit location
Command + Shift + [/]
Navigate between editor tabs
Command + Option + F
Jump to navigation bar
Debugging
Shortcut Key
Function Description
Control + F9
Resume program
Control + F8
Step over
Control + F7
Step into
Command + Option + R
Run/debug configurations
Command + Option + F8
Evaluate expression
Option + Shift + F9
Debug last launched program
Command + Option + Shift + F7
Force step into
Command + Option + Shift + F8
Force step over
Control + Command + P
View runtime value of an expression
Command + Option + Break
Stop debugging
Search
Shortcut Key
Function Description
Command + Shift + F
Find in path
Command + Shift + R
Replace in path
Command + Shift + L
Find usages
Command + F
Find in file
Command + Option + F
Find in path with options
Command + Option + L
Navigate to line
Command + G
Find next occurrence
Command + Shift + G
Find previous occurrence
Command + Option + Shift + F7
Highlight usages in file
Command + U
Show usage in a file
Refactoring
Shortcut Key
Function Description
Command + T
Refactor this element
Command + Option + Shift + M
Extract method
Command + Option + Shift + V
Extract variable
Command + Option + Shift + C
Extract constant
Command + Option + Shift + F
Rename
Command + Option + Shift + T
Change signature
Command + Option + Shift + D
Inline variable
Command + Option + Shift + B
Move
Command + Option + Shift + U
Safe delete
Command + Option + Shift + R
Refactor this file
Build and Run
Shortcut Key
Function Description
Command + Option + Shift + M
Build project
Command + Option + Shift + P
Rebuild project
Command + Option + F10
Select and run configuration
Command + R
Run current configuration
Command + Option + F11
Run current configuration with options
Control + Option + Shift + P
Run with coverage
About Android Studio
Android Studio is developed by Google to provide the best tools for app developers. It supports features like intelligent code editing, debugging, and performance tooling, making it an essential platform for Android development.
Frequently Asked Questions about Android Studio Shortcut Keys
What is the most commonly used shortcut in Android Studio?
Basic code completion using Ctrl + Space (Windows) or Command + Space (MacOS).
How can I customize shortcuts in Android Studio?
Go to File > Settings > Keymap (Windows) or Android Studio > Preferences > Keymap (MacOS).
Are there specific shortcuts for XML files?
Yes, for example, Ctrl + / (Windows) or Command + / (MacOS) to comment lines in XML.
How to toggle between files?
Use Ctrl + Tab (Windows) or Command + Tab (MacOS).
What shortcut runs the current project? Shift + F10 (Windows) or Control + R (MacOS).
How to open recently used files? Ctrl + E (Windows) or Command + E (MacOS).
Is there a shortcut to open the terminal? Alt + F12 (Windows) or Option + F12 (MacOS).
Conclusion
Mastering Android Studio shortcuts can significantly streamline your development process. Familiarize yourself with the shortcuts listed here to enhance productivity and focus more on building exceptional Android applications.
Discussion
New Comments
No comments yet. Be the first one!