Hello, here are some of the most essential keyboard shortcuts to dramatically improve your productivity in Android Studio. This tutorial covers the most useful shortcuts organized by category.

File and Project Navigation

  • Ctrl + Shift + N (Cmd + Shift + O on Mac) - Go to file
  • Ctrl + Alt + Shift + N (Cmd + Option + Shift + O on Mac) - Go to symbol
  • Ctrl + N (Cmd + O on Mac) - Go to class
  • Ctrl + E (Cmd + E on Mac) - Recent files
  • Ctrl + Shift + E (Cmd + Shift + E on Mac) - Recent locations
  • Alt + F1 (Option + F1 on Mac) - Select current file in project view
  • Ctrl + F12 (Cmd + F12 on Mac) - File structure popup

Window and Tool Navigation

  • Alt + 1 (Cmd + 1 on Mac) - Project tool window
  • Alt + 6 (Cmd + 6 on Mac) - TODO tool window
  • Alt + 7 (Cmd + 7 on Mac) - Structure tool window
  • Shift + Escape - Hide active tool window
  • Ctrl + Shift + F12 (Cmd + Shift + F12 on Mac) - Hide all tool windows

Code Navigation

  • Ctrl + B (Cmd + B on Mac) - Go to declaration
  • Ctrl + Alt + B (Cmd + Option + B on Mac) - Go to implementation
  • Ctrl + U (Cmd + U on Mac) - Go to super method/class
  • Ctrl + Alt + Left/Right (Cmd + Option + Left/Right on Mac) - Navigate back/forward
  • Ctrl + G (Cmd + L on Mac) - Go to line
  • Ctrl + [ or Ctrl + ] (Cmd + [ or Cmd + ] on Mac) - Move to code block start/end

Editing Shortcuts

Basic Editing

  • Ctrl + D (Cmd + D on Mac) - Duplicate line or selection
  • Ctrl + Y (Cmd + Backspace on Mac) - Delete line
  • Ctrl + Shift + Enter (Cmd + Shift + Enter on Mac) - Complete current statement
  • Ctrl + / (Cmd + / on Mac) - Comment/uncomment line
  • Ctrl + Shift + / (Cmd + Shift + / on Mac) - Block comment/uncomment
  • Ctrl + W (Option + Up on Mac) - Extend selection
  • Ctrl + Shift + W (Option + Down on Mac) - Shrink selection

Advanced Editing

  • Alt + Enter (Option + Enter on Mac) - Show intention actions and quick fixes
  • Ctrl + Alt + L (Cmd + Option + L on Mac) - Reformat code
  • Ctrl + Alt + O (Ctrl + Option + O on Mac) - Optimize imports
  • Ctrl + Shift + Up/Down (Cmd + Shift + Up/Down on Mac) - Move line up/down
  • Alt + Shift + Up/Down (Option + Shift + Up/Down on Mac) - Move statement up/down
  • Ctrl + Alt + T (Cmd + Option + T on Mac) - Surround with template

Multiple Cursors and Selection

  • Alt + J (Ctrl + G on Mac) - Add selection for next occurrence
  • Alt + Shift + J (Ctrl + Shift + G on Mac) - Unselect occurrence
  • Ctrl + Alt + Shift + J (Ctrl + Cmd + G on Mac) - Select all occurrences
  • Alt + Click (Option + Click on Mac) - Add cursor
  • Alt + Shift + Click (Option + Shift + Click on Mac) - Create rectangular selection

Search and Replace

Finding

  • Ctrl + F (Cmd + F on Mac) - Find in current file
  • Ctrl + R (Cmd + R on Mac) - Replace in current file
  • Ctrl + Shift + F (Cmd + Shift + F on Mac) - Find in project
  • Ctrl + Shift + R (Cmd + Shift + R on Mac) - Replace in project
  • F3 (Cmd + G on Mac) - Find next
  • Shift + F3 (Cmd + Shift + G on Mac) - Find previous
  • Alt + F7 (Option + F7 on Mac) - Find usages
  • Ctrl + F7 (Cmd + F7 on Mac) - Find usages in file
  • Ctrl + Shift + F7 (Cmd + Shift + F7 on Mac) - Highlight usages in file

Code Generation and Refactoring

Code Generation

  • Alt + Insert (Cmd + N on Mac) - Generate code (getters, setters, constructors, etc.)
  • Ctrl + O (Ctrl + O on Mac) - Override methods
  • Ctrl + I (Ctrl + I on Mac) - Implement methods
  • Ctrl + Alt + M (Cmd + Option + M on Mac) - Extract method
  • Ctrl + Alt + V (Cmd + Option + V on Mac) - Extract variable
  • Ctrl + Alt + F (Cmd + Option + F on Mac) - Extract field
  • Ctrl + Alt + C (Cmd + Option + C on Mac) - Extract constant

Refactoring

  • Shift + F6 - Rename
  • F6 - Move
  • Ctrl + F6 (Cmd + F6 on Mac) - Change signature
  • Ctrl + Alt + N (Cmd + Option + N on Mac) - Inline
  • F5 - Copy
  • Ctrl + Alt + Shift + T (Ctrl + T on Mac) - Refactor this (shows refactoring menu)

Running and Debugging

Execution

  • Shift + F10 (Ctrl + R on Mac) - Run
  • Shift + F9 (Ctrl + D on Mac) - Debug
  • Ctrl + F2 (Cmd + F2 on Mac) - Stop
  • Ctrl + Shift + F10 (Ctrl + Shift + R on Mac) - Run context configuration
  • Ctrl + Shift + F9 (Ctrl + Shift + D on Mac) - Debug context configuration

Debugging

  • F8 - Step over
  • F7 - Step into
  • Shift + F8 - Step out
  • Alt + F9 (Option + F9 on Mac) - Run to cursor
  • F9 (Cmd + Option + R on Mac) - Resume program
  • Ctrl + F8 (Cmd + F8 on Mac) - Toggle breakpoint
  • Ctrl + Shift + F8 (Cmd + Shift + F8 on Mac) - View breakpoints

Android-Specific Shortcuts

Layout Editor

  • Ctrl + Alt + Shift + A - Add component to favorites
  • B - Toggle between Blueprint and Design modes (when in Layout Editor)
  • Ctrl + +/- (Cmd + +/- on Mac) - Zoom in/out in Layout Editor

Logcat and Testing

  • Alt + 6 (Cmd + 6 on Mac) - Open Logcat
  • Ctrl + Shift + T (Cmd + Shift + T on Mac) - Create test
  • Ctrl + Shift + F10 (Ctrl + Shift + R on Mac) - Run tests

Version Control (Git)

VCS Operations

  • Ctrl + K (Cmd + K on Mac) - Commit changes
  • Ctrl + Shift + K (Cmd + Shift + K on Mac) - Push
  • Ctrl + T (Cmd + T on Mac) - Update project
  • Alt + 9 (Cmd + 9 on Mac) - Version Control tool window
  • Ctrl + Alt + Z (Cmd + Option + Z on Mac) - Rollback changes

Customizing Your Shortcuts

  • Go to File → Settings → Keymap (Android Studio → Preferences → Keymap on Mac)
  • Search for any action and assign your preferred shortcut
  • Consider using a keymap that matches your previous IDE experience

Using the Help

  • Ctrl + Shift + A (Cmd + Shift + A on Mac) - Find any action by name
  • This is perfect when you can't remember a specific shortcut

Pro Tips

  1. Double Shift - Search everywhere (files, classes, symbols, actions)
  2. Ctrl + Tab (Ctrl + Tab on Mac) - Switcher (recent files and tool windows)
  3. Ctrl + Shift + A (Cmd + Shift + A on Mac) - Find any action
  4. Alt + F12 (Option + F12 on Mac) - Terminal
  5. Ctrl + Shift + V (Cmd + Shift + V on Mac) - Paste from history

Remember, the key to mastering shortcuts is consistent practice. Start with a few essential ones and gradually expand your repertoire. Your productivity will increase significantly once these become second nature!