Android Studio HotKeys

2025 年 1 月 3 日

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
Ctrl S Save all
Ctrl Alt Y Synchronize
Ctrl Shift F12 Minimize or maximize the editor
Alt Shift F Add to favorites
Alt Shift I Inspect the current file with the current profile
Ctrl ` Quick switch the scheme
Ctrl Alt S Open the settings dialogue
Ctrl Alt Shift S Open the project structure dialogue
Ctrl Tab Switch between the tabs and tool window

Navigating and Searching

Shortcut Action
Shift Shift Search everything, including code and menus
Ctrl F Find
F3 Find next
Shift F3 Find previous
Ctrl R Replace
Ctrl Shift A Find action
Ctrl Alt Shift N Search by a symbol name
Ctrl N Find class
Ctrl Shift N Find file, instead of class
Ctrl Shift F Find in path
Ctrl F12 Open file structure pop-up
Alt Right/Left Navigate between open editor tabs
Ctrl Enter Jump to source
Shift F4 Open the current editor tab in a new window
Ctrl E Recently opened files pop-up
Ctrl Shift E Recently edited files pop-up
Ctrl Shift Backspace Go to last edit location
Ctrl F4 Close active editor tab
Esc Return to editor window from a tool window
Shift Esc Hide active or last active tool window
Ctrl G Go to line
Ctrl H Open type hierarchy
Ctrl Shift H Open method hierarchy
Ctrl Alt H Open call hierarchy

Writing Code

Shortcut Action
Alt Insert Generate code, e.g. getters, setters, constructors, new class
Ctrl O Override methods
Ctrl I Implement methods
Ctrl Alt T Surround with if...else, try...catch, etc
Ctrl Y Delete line at caret
Ctrl - Collapse the current code block
Ctrl + Expand the current code block
Ctrl Shift - Collapse all code blocks
Ctrl Shift + Expand all code blocks
Ctrl D Duplicate the current line or selection
Ctrl Space Basic code completion
Ctrl Shift Space Smart code completion, filters the list of methods and variables by expected type
Ctrl Shift Enter Complete statement
Ctrl Q Quick documentation lookup
Ctrl P Show parameters for selected method
Ctrl B Go to declaration, directly
Ctrl Alt B Go to implementations
Ctrl U Go to super-method or super-class
Ctrl Shift I Open quick definition lookup
Alt 1 Toggle project tool window visibility
F11 Toggle bookmark
Ctrl F11 Toggle bookmark with mnemonic
Ctrl / Comment or uncomment with line comment
Ctrl Shift / Comment or uncomment with block comment
Ctrl W Select successively increasing code blocks
Ctrl Shift W Decrease current selection to previous state
Ctrl [ Move to code block start
Ctrl ] Move to code block end
Ctrl Shift [ Select to the code block start
Ctrl Shift ] Select to the code block end
Ctrl Del Delete to the end of a word
Ctrl Backspace Delete to the start of a word
Ctrl Alt O Optimize imports
Alt Enter Project quick fix, show intention actions and quick fixes
Ctrl Alt L Reformat code
Ctrl Alt I Auto-indent lines
Tab Indent lines
Shift Tab Unindent lines
Ctrl Shift J Smart line join
Ctrl Enter Smart line split
Shift Enter Start new line
F2 Next highlighted error
Shift F2 Previous highlighted error

Viewing Layouts

Shortcut Action
Ctrl + Zoom in
Ctrl - Zoom out
Ctrl 0 Fit to screen
Ctrl Shift 1 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
Ctrl 0 Zoom to fit
Ctrl B Go to XML
Ctrl A Select all components
Shift (click) Select multiple components

Navigation Editor

Shortcut Action
Ctrl + Zoom in
Ctrl - Zoom out
Ctrl 0 Zoom to fit
Ctrl B Go to XML
E Toggle render errors panel
Ctrl G Group into a nested graph
Tab Cycle through destinations
Ctrl A Select all destinations
Ctrl (click) Select multiple destinations

Build and Run

Shortcut Action
Ctrl F9 Build
Shift F10 Build and run
Ctrl F10 Apply changes and restart activity
Ctrl Alt F10 Apply code changes

Debugging

Shortcut Action
Shift F9 Debug
F8 Step over
F7 Step into
Shift F7 Smart step into
Shift F8 Step out
Alt F9 Run to cursor
Alt F8 Evaluate expression
F9 Resume program
Ctrl F8 Toggle breakpoint
Ctrl Shift F8 View breakpoints

Refactoring

Shortcut Action
F5 Copy
F6 Move
Alt Del Safe delete
Shift F6 Rename
Ctrl F6 Change signature
Ctrl Alt N Inline
Ctrl Alt M Extract method
Ctrl Alt V Extract variable
Ctrl Alt F Extract field
Ctrl Alt C Extract constant
Ctrl Alt P Extract parameter

Version Control

Shortcut Action
Ctrl K Commit project to VCS
Ctrl T Update project from VCS
Alt Shift C 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.

Android Studio Official Information

Frequently Asked Questions about Android Studio Shortcut Keys

  1. What is the most commonly used shortcut in Android Studio?
    Basic code completion using Ctrl + Space (Windows) or Command + Space (MacOS).

  2. How can I customize shortcuts in Android Studio?
    Go to File > Settings > Keymap (Windows) or Android Studio > Preferences > Keymap (MacOS).

  3. Are there specific shortcuts for XML files?
    Yes, for example, Ctrl + / (Windows) or Command + / (MacOS) to comment lines in XML.

  4. How to toggle between files?
    Use Ctrl + Tab (Windows) or Command + Tab (MacOS).

  5. What shortcut runs the current project?
    Shift + F10 (Windows) or Control + R (MacOS).

  6. How to open recently used files?
    Ctrl + E (Windows) or Command + E (MacOS).

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

5/5 - (2 votes)