Contents

[copy]Android Studio Shortcuts (Mac)

Contents

Notes:

  • Two of the most useful shortcuts utilize the Fn (function) keys. It is therefore recommended that you enable the “Use all F1, F2, etc. keys as standard function keys” option [System Preferences > Keyboard].
  • Be sure to enable the Mac OS X 10.5+ keymap in Android Studio [Preferences > Keymap].
  • A fairly complete shortcut list can be found here .

Useful symbols:

⌘ = Command Key ⌥ = Option Key ⇧ = Shift Key ⌃ = Control Key

Essential Shortcuts:

Learn these shortcuts right away.

DescriptionShortcut
Display list of available auto-fixes for code warning/error at cursorOption-Enter
Go to the declaration of the variable/method/class at cursorOption-B
Rename all copies of the variable/method/class at cursorShift-F6
List all usages of the variable/method/class at cursorCommand-Option-F7
Generate code (incl. getters, setters, constructors, method overrides)Command-N
Search for and open any file by name (filters as you type)Command-Shift-O
Find text in the current file (Enter = cycle through results, Esc. = cancel)Command-F

Frequently Useful Shortcuts:

Learn these shortcuts once you have the essential shortcuts nailed.

DescriptionShortcut
View javadoc of symbol at cursor in pop-upF1
View definition of method at cursor in pop-upCommand-Y
Skip back/forward through cursor position historyCommand-[, Command-]
Search for and list any occurrences of textCommand-Shift-F
Go to next highlighted error in current fileF2
RunControl-R
Comment/Uncomment all selected lines (also works in xml files)Command-/
Show available parameters for current method (must be inside parentheses)Command-P
Find and replace in current fileCommand-R

Shortcuts For Wizards:

Check these shortcuts out if you are bored. To use ’navigate through open tabs’, you will have to change or disable the corresponding Mission Control shortcuts [System Preferences > Keyboard > Keyboard Shortcuts > Mission Control].

DescriptionShortcut
Go to given line number in current fileCommand-L
Duplicate current lineCommand-D
Format code to conform to Android Studio’s default styleCommand-Option-L
List implementations/overrides of class/interface/method at cursorCommand-Option-B
Search for and go to any symbol (incl. variables and methods)Command-Option-O
Show class structure in pop-upCommand-F12
List recently viewed files in pop-upCommand-E
List recently edited files in pop-upCommand-Shift-E
View code hierarchy for symbol in pop-upControl-Option-H
Move code block at cursor up/down⌘-⇧-up arrow, ⌘-⇧-down arrow
Navigate through open tabs⌃-left arrow, ⌃-right arrow
View full refactor menuControl-T
Collapse all code blocks / Expand all code blocks⌘⇧+, ⌘⇧-
Insert new line below current cursor positionShift-Enter
Complete statement (add braces, parentheses, semi-colon)Command-Shift-Enter
Toggle schemeControl-`
 

post from: https://gist.github.com/stkent/349cdda974fdb9697be5