Android Studio includes keyboard shortcuts for different actions. Here is some default keyboard shortcuts of Android Studio for Windows/Linux and Mac operating systems.
Find: ctrl + F in Windows/Linux and cmd + F in Mac
Replace: ctrl + R in Windows/Linux and cmd + R in Mac
Find class: ctrl + N in Windows/Linux and cmd + O in Mac
Find file: ctrl + shift+ N in Windows/Linux and cmd + shift+ N in Mac
Zoom in/out: ctrl + plus/minus in Windows/Linux and cmd + plus/minus in Mac
Fit to screen: ctrl + 0 in Windows/Linux and cmd + 0 in Mac
Go to xml: ctrl + B in Windows/Linux and cmd + B in Mac
Toggle device: D in Windows/Linux and D in Mac
Override methods: ctrl + O in Windows/Linux and cmd + O in Mac
Implement methods: ctrl + I in Windows/Linux and cmd + I in Mac
Generate code: alt + ins in Windows/Linux and cmd + N in Mac
Start new line: shift + enter in Windows/Linux and shift + enter in Mac
Debug: shift + F9 in Windows/Linux and ctrl + D in Mac
Copy: F5 in Windows/Linux and F5 in Mac
Commit project in VCS: ctrl + K in Windows/Linux and cmd + K in Mac
General
Description
Windows/Linux
Mac
Save all
Control + S
Command + S
Synchronize
Control + Alt + Y
Command + Option + Y
Maximize/minimize editor
Control + Shift + F12
Control + Command + F12
Add to favorites
Alt + Shift + F
Option + Shift + F
Inspect current file with current profile
Alt + Shift + I
Option + Shift + I
Quick switch scheme
Control + ` (backquote)
Control + ` (backquote)
Open settings dialogue
Control + Alt + S
Command + , (comma)
Open project structure dialog
Control + Alt + Shift + S
Command + ; (semicolon)
Switch between tabs and tool window
Control + Tab
Control + Tab
Navigating and searching within Studio
Description
Windows/Linux
Mac
Search everything (including code and menus)
Press Shift twice
Press Shift twice
Find
Control + F
Command + F
Find next
F3
Command + G
Find previous
Shift + F3
Command + Shift + G
Replace
Control + R
Command + R
Find action
Control + Shift + A
Command + Shift + A
Search by symbol name
Control + Alt + Shift + N
Command + Option + O
Find class
Control + N
Command + O
Find file (instead of class)
Control + Shift + N
Command + Shift + O
Find in path
Control + Shift + F
Command + Shift + F
Open file structure pop-up
Control + F12
Command + F12
Navigate between open editor tabs
Alt + Right/Left Arrow
Control + Right/Left Arrow
Jump to source
F4 / Control + Enter
F4 / Command + Down Arrow
Open current editor tab in new window
Shift + F4
Shift + F4
Recently opened files pop-up
Control + E
Command + E
Recently edited files pop-up
Control + Shift + E
Command + Shift + E
Go to last edit location
Control + Shift + Backspace
Command + Shift + Backspace
Close active editor tab
Control + F4
Command + W
Return to editor window from a tool window
Esc
Esc
Hide active or last active tool window
Shift + Esc
Shift + Esc
Go to line
Control + G
Command + L
Open type hierarchy
Control + H
Control + H
Open method hierarchy
Control + Shift + H
Command + Shift + H
Open call hierarchy
Control + Alt + H
Control + Option + H
Viewing layouts
Description
Windows/Linux
Mac
Zoom in/out
Control + plus/minus
Command + plus/minus
Fit to screen
Control + 0
Command + 0
Actual size
Control + Shift + 1
Command + Shift + 1
Design tools: Layout Editor
Description
Windows/Linux
Mac
Toggle between Design and Blueprint modes
B
B
Toggle between Portrait and Landscape modes
O
O
Toggle devices
D
D
Force refresh
R
R
Toggle render errors panel
E
E
Delete constraints
Delete or Ctrl + Click
Delete or Command + Click
Zoom in
Ctrl + plus
Command + plus
Zoom out
Ctrl + minus
Command + minus
Zoom to fit
Ctrl + 0
Command + 0
Pan
Hold Space + Click and drag
Hold Space + Click and drag
Go to XML
Ctrl + B
Command + B
Select all components
Ctrl + A
Command + A
Select multiple components
Shift + Click or Ctrl + Click
Shift + Click or Command + Click
Design tools: Navigation Editor
Description
Windows/Linux
Mac
Zoom in
Ctrl + plus
Command + plus
Zoom out
Ctrl + minus
Command + minus
Zoom to fit
Ctrl + 0
Command + 0
Pan
Hold Space + Click and drag
Hold Space + Click and drag
Go to XML
Ctrl + B
Command + B
Toggle render errors panel
E
E
Group into nested graph
Ctrl + G
Command + G
Cycle through destinations
Tab / Shift + Tab
Tab / Shift + Tab
Select all destinations
Ctrl + A
Command + A
Select multiple destinations
Shift + Click or Ctrl + Click
Shift + Click or Command + Click
Writing code
Description
Windows/Linux
Mac
Generate code (getters, setters, constructors, hashCode/equals, toString, new file, new class)
Alt + Insert
Command + N
Override methods
Control + O
Control + O
Implement methods
Control + I
Control + I
Surround with (if…else / try…catch / etc.)
Control + Alt + T
Command + Option + T
Delete line at caret
Control + Y
Command + Backspace
Collapse/expand current code block
Control + minus/plus
Command + minus/plus
Collapse/expand all code blocks
Control + Shift + minus/plus
Command + Shift + minus/plus
Duplicate current line or selection
Control + D
Command + D
Basic code completion
Control + Space
Control + Space
Smart code completion (filters the list of methods and variables by expected type)
Control + Shift + Space
Control + Shift + Space
Complete statement
Control + Shift + Enter
Command + Shift + Enter
Quick documentation lookup
Control + Q
Control + J
Show parameters for selected method
Control + P
Command + P
Go to declaration (directly)
Control + B or Control + Click
Command + B or Command + Click
Go to implementations
Control + Alt + B
Command + Alt + B
Go to super-method/super-class
Control + U
Command + U
Open quick definition lookup
Control + Shift + I
Command + Y
Toggle project tool window visibility
Alt + 1
Command + 1
Toggle bookmark
F11
F3
Toggle bookmark with mnemonic
Control + F11
Option + F3
Comment/uncomment with line comment
Control + /
Command + /
Comment/uncomment with block comment
Control + Shift + /
Command + Shift + /
Select successively increasing code blocks
Control + W
Option + Up
Decrease current selection to previous state
Control + Shift + W
Option + Down
Move to code block start
Control + [
Option + Command + [
Move to code block end
Control + ]
Option + Command + ]
Select to the code block start
Control + Shift + [
Option + Command + Shift + [
Select to the code block end
Control + Shift + ]
Option + Command + Shift + ]
Delete to end of word
Control + Delete
Option + Delete
Delete to start of word
Control + Backspace
Option + Backspace
Optimize imports
Control + Alt + O
Control + Option + O
Project quick fix (show intention actions and quick fixes)