Home >Java >javaTutorial >Summary of using Android Studio shortcut keys
This article introduces a series of commonly used shortcut keys in Android Studio. I hope it can help you become more comfortable in using Android Studio.
Ctrl+G / Ctrl+Alt+Shift+G: Query where variables, functions or classes are used or called. The latter is a complex manifestation of the former. You can choose the query range, etc.
Alt+H: Search function, global search
F4: View class inheritance relationship
F2: View document description (function usage instructions)
Ctrl+E: View recently opened files
Ctrl+Shift+E : View recently edited files
double Shift: Global search. This view is slightly different from Alt+H. This is a global file search, down to the file name level.
Ctrl+Shift+R: Quickly locate the file you want to open.
Alt+↑: The line of code at the cursor position moves up
Alt+↓: The line of code at the cursor position moves down
Ctrl+D: Delete the line of code at the cursor position
Ctrl+X: Cut the cursor The line of code where the cursor is located
Alt+Shift+↓/Ctrl+C: Copy the line of code where the cursor is to the next line
Ctrl+O: Quickly find functions in the current class, variables
Ctrl+Shift+R: Modify the name
Alt+Enter: Import package
Alt+←: Go back and navigate to the last viewing or editing place
Alt+→: Navigate forward. For example, if you want to go back after locating to the previous point, you can use this shortcut key
Ctrl+/: When commenting on a line, press it again to uncomment.
Ctrl+Shift+/: To comment on a module, press it again to uncomment. Note that the "/" here cannot be used on the small keyboard
Ctrl+Shift+ Numpad/: Folding code (Ctrl+Shift+Numpad* this doesn’t work, I’m not available today, I will solve this problem later and update it). Of course, the notebook does not have a nippad, you can change the shortcut keys yourself
Ctrl+Alt+S: Open the settings interface
Ctrl+Alt+Shift+S: Open the Project Structure interface
Alt+Shift+X: Run (Run)
Alt+Shift+D: Debug and run (Debug)
Ctrl+F9: Compile the project
Ctrl+Shift+K: Push the file to Server (git)
Debug shortcut key
F5: But do not debug and enter the function.
F6: But do not enter the function without debugging.
F7: Return to the calling location from inside the function.
F8: Execute to the next breakpoint. If there is no breakpoint, the execution will be completed.
Action using ) Cmd + Option + / Ctrl + Shift + / Format code Cmd + Option + L Ctrl + Alt + L Clear invalid package references Option + Control + O Alt + Ctrl + O
Find Cmd + F Ctrl + F
Find + Replace Cmd + R Ctrl + R
Move code up and down Option + Shift + Up/Down Alt + Shift + Up/Down
Delete lines Cmd + Delete Ctrl + Y
Expand and reduce the selection Option + Up/Down Ctrl + W/Ctrl + Shift + W体 Quickly generate structure CMD + Option + T Ctrl + ALT + T
Quickly covered method Ctrl + O Ctrl + O
Quick positioning to the first/tail CMD + left/right Ctrl + left/right folding Expand code block Cmd + Plus,Minus Ctrl + Plus/Minus Collapse and expand all code blocks Cmd + Shift + Plus,Minus Ctrl + Shift + Plus,Minus
File method structure Cmd + F12 Ctrl + F12 Find calls of Position Ctrl + Option + H Ctrl + Alt + H
Case conversion Cmd + Shift + U Ctrl + Shift + U