Android Studio Discovery Trail Series: Android Studio shortcut keys

Source: Internet
Author: User
Tags code tag

Guo Xiaoxing
Weibo: Guo Xiaoxing's Sina Weibo
Email:[email protected]
Blog: http://blog.csdn.net/allenwells
Github:https://github.com/allenwell

This article describes the shortcut keys for Android Studio, because there are many shortcut keys, so the article begins to list the most common set of shortcuts, and gives detailed shortcut key descriptions at the end of the article.

Common shortcut keys for Android Studio

  1. CTRL+G/CTRL+ALT+SHIFT+G: The query variable or function or class where is used or called, the latter is the former complex performance, you can choose the scope of the query and so on.
  2. Alt+h: Find function, global find
  3. F4: Viewing class inheritance Relationships
  4. F2: View document description (function usage instructions)
  5. Ctrl+e: View recently opened files
  6. Ctrl+shift+e: View recently edited files
  7. Double Shift: Global lookup, this view and alt+h slightly different, this is the global file lookup, to the file name level.
  8. Ctrl+shift+r: Quickly navigate to the file you want to open.
  9. Ctrl+k: When a variable is selected, quickly navigates to the next place where the variable is used (although there are still some bugs in this shortcut, see: After Android Studio keymap to eclipse, find the next same variable shortcut key ctrl+k invalid)
  10. Alt+↑: The line of code where the cursor is located moves upwards
  11. Alt+↓: The line of code where the cursor is located moves down
  12. Ctrl+d: Delete the line of code where the cursor is located
  13. Ctrl+x: The line of code where the cursor is clipped
  14. ALT+SHIFT+↓/CTRL+C: Copy cursor line code to next line
  15. Ctrl+o: Quick Find functions in the current class, variables
  16. Ctrl+shift+r: Modify Name
  17. Alt+enter: Importing Packages
  18. alt+←: Back, go to the last view or edit location
  19. alt+→: Move forward, for example, after you locate the last point, want to go back, you can use this shortcut key
  20. ctrl+/: When line comment, counter-comment press once again
  21. ctrl+shift+/: module comments, counter-comment and then press once, note that this "/" can not use the keypad
  22. ctrl+shift+ keypad/: Folding Code (ctrl+shift+ small keyboard * This is not the spirit, today is not free, the latter will be addressed to solve this problem, and update up), of course, the notebook does not have a small keyboard, you can change the shortcut key
  23. Ctrl+alt+s: Open Settings interface
  24. Ctrl+alt+shift+s: Open the Project Structure interface
  25. Alt+shift+x: Running (run)
  26. Alt+shift+d: Debug Run (Debug)
  27. CTRL+F9: Compiling the project
  28. Ctrl+shift+k:push file to server (git)
  29. Debug class shortcut keys
  30. F6: But does not debug does not enter function interior
  31. F7: returned by function inside the call
  32. F8: Execution to the next breakpoint, no breakpoint execution completed
  33. ctrl+alt+f8/Double click: View the value of the selected position directly
  34. Ctrl+alt+w Extraction Method

The Complete collection of Android studio shortcut keys

  1. Ctrl+d: Collection Copy and paste two operations, if there is a selected part of the copy of the selected section, and after the selection of paste out, if there is no selected section, copy the line of the cursor, and paste it under the line.
  2. CTRL + Spaces: When you enter code, this key combination lists the classes, method names, member variables, and so on that match the function of smart hints. is as useful as editing an XML file.
  3. CTRL + DOWN ARROW or CTRL + UP ARROW: When there is an auto-match drop-down list, this shortcut automatically closes the drop-down list and the cursor moves to the next/previous line.
  4. Automatic matching drop-down list arrangement: In the bottom right corner of the auto-match drop-down list there is a "π" icon, which can be selected by the following: practicality, letter two arrangement.
  5. Ctrl + Slash, ctrl+shift+ slash: Ctrl + Slash: Comment or uncomment the current line or the selected code block in a double slash, i.e. "//" ctrl+shift+ slash: Comment or uncomment the selected code block to "/... /"Way Note,
  6. Ctrl+shift+enter: Automatic matching of the corresponding grammatical structure, such as if,do-while,try-catch structure.
  7. Ctrl+f: Search
  8. CTRL + Period: In the auto-match drop-down list, select the first item
  9. Exclamation point: In the auto-match drop-down list, the upper and lower keys select an item that returns a Boolean, and the exclamation point automatically takes the reverse:
  10. Ctrl+enter: In the auto-match drop-down list, the first item is selected by default when no item is selected.
  11. Ctrl+shift+a: Quickly find the menu in Android Studio.
  12. CTRL + N: Quickly find the class name, file
  13. Ctrl+b: Jumps directly to the place where the class, method, member variable is defined. Same as CTRL + Mouse left button effect
  14. CTRL+ALT+B: Queries which classes implement the interface where the cursor is located.
  15. Ctrl+alt+shift+i: Detects code, such as detecting variables or methods that are defined but not used. The purpose of detection is to improve code efficiency.
  16. Ctrl+alt+shift+n: Quickly open the input method or variable.
  17. Ctrl+shift+f7: In the form of a highlight some related things, here mainly by three kinds of situations:

    • When the cursor position is implement, the class implements the method name of the interface to sign out;
    • The position of the cursor at return will mark all exits where the method is exited;
    • When the cursor is at the try or throws keyword, the statement that produces an exception is flagged.
  18. shift+ Mouse scrolling: Enables horizontal scrolling of the editing interface.
  19. Ctrl+alt+v: When calling a method when the parameter passed in is a more complex expression, this key combination can be used to refactor the variable to simplify the complexity of the code.
  20. Ctrl+d: Compare two jar files, in the same project, select two jar files, press this key combination
  21. Ctrl+o: When a subclass wants to override a method of a parent class, press this key combination to display the methods of all the parent classes. Ctrl+i when the key combination of the interface corresponds.
  22. Ctrl+shift+i: Quick look at the method body, want to see how a method is implemented, you can move the cursor to the method, press this key combination.
  23. CTRL+Q: Move the cursor to the method, press this key combination to quickly see the description of the method document.
  24. ctrl+~: Toggle the editing interface style, shortcut key design
  25. Alt+shift+c: View Recent changes to the project.
  26. Ctrl+e: Quickly view open files that have been opened recently.
  27. Shift+f6: You can rename classes, methods, and variables, and the names will be updated automatically when you use them.
  28. ALT+F1: Quickly open project view, structure view, and more to see the appropriate elements.
  29. Ctrl+alt+f7: View the usage of a class, method, member variable throughout the project.
  30. ctrl+shift+ Spaces: Lists the method name, member variable name of the type match, when the parameter is assigned or is passed in the method.
  31. Ctrl+alt+t: Select a piece of code, press this key combination, you can quickly add if, for, Try/catch and other statements.
  32. Ctrl+tab: Open the Interface Toggle window, hold down the CTRL key, and select the appropriate window to open.
  33. CTRL+W: Select the word in which the cursor is located (a member variable or a method name), press one more time to select the statement you are in, and then press one more time to select the code block. Each increment, in turn, expands the range of the selected level.
  34. ALT + ENTER import package, auto fix
  35. CTRL + N Find class
  36. Ctrl+shift+n Finding files
  37. Ctrl+alt+l Formatting Code
  38. Ctrl+alt+o Optimizing imported classes and Packages
  39. Alt+insert generate code (such as Get,set method, constructor, etc.)
  40. Ctrl+e or Alt+shift+c recently changed code
  41. Ctrl+r replacing text
  42. Ctrl+f finding text
  43. Ctrl+shift+space Auto-Complete code
  44. CTRL + Space Code hints
  45. Ctrl+alt+space class name or interface name hint
  46. Ctrl+p Method Parameter Hints
  47. Ctrl+shift+alt+n find a method or variable in a class
  48. Alt+shift+c vs. recently modified code
  49. Shift+f6 Refactoring-Renaming
  50. ctrl+shift+ First up key
  51. Ctrl+x Deleting rows
  52. Ctrl+d Copying rows
  53. ctrl+/or ctrl+shift+/Comments (/////... / )
  54. CTRL+J Automatic Code
  55. Ctrl+e recently opened files
  56. CTRL+H Display class structure diagram
  57. Ctrl+q displaying comment documents
  58. Alt+f1 find where the code is located
  59. Alt+1 quickly open or hide the engineering panel
  60. ctrl+alt+ Left/right back to the last viewed location
  61. ALT + Left/right Toggle Code View
  62. ALT + Up/down Fast move location between methods
  63. The Ctrl+shift+up/down code moves up/down.
  64. F2 or SHIFT+F2 highlighting error or warning when the quick position code tag is entered, press TAB to generate the code.
  65. CTRL+SHIFT+F7, highlight all of the text and press ESC to highlight the disappear.
  66. Ctrl+w selected code, continuous press will have other effects
  67. ALT+F3, find the same text down one by one and highlight it.
  68. Ctrl+up/down cursor jumps to the first or last line
  69. Ctrl+b quickly open the class or method at the cursor
  70. Ctrl+e, you can display a list of recently edited files
  71. Shift+click can close files
  72. ctrl+[or] can jump to the beginning of the curly brace
  73. Ctrl+shift+backspace can jump to the last edited place
  74. CTRL+F12, the structure of the current file can be displayed
  75. Ctrl+f7 can query the current element's reference in the current file, and then press F3 to select
  76. CTRL + N, you can quickly open class
  77. Ctrl+shift+n, you can quickly open files
  78. Alt+q can see the declaration of the current method
  79. Ctrl+w can select words followed by statements followed by functions.
  80. ALT+F1 you can position the element you are editing in each panel
  81. Ctrl+p, can display parameter information
  82. Ctrl+shift+insert can select Clipboard contents and insert
  83. Alt+insert can generate constructors/getter/setter, etc.
  84. Ctrl+alt+v can introduce variables. For example, to assign a variable to a SQL in parentheses
  85. Ctrl+alt+t can wrap code inside a piece, such as Try/catch
  86. Alt+up and Alt+down can be moved quickly between methods
  87. Alt+enter can get some intention Action, for example, change "= =" to "Equals ()"
  88. Ctrl+shift+alt+n to quickly open symbols
  89. Ctrl+shift+space can give smart hints in many cases
  90. ALT+F3 can quickly find
  91. ctrl+/and ctrl+shift+/can annotate code
  92. Ctrl+alt+b can jump to the implementation of an abstract method
  93. Ctrl+o can choose a method of the parent class to override
  94. Ctrl+q can see Javadoc
  95. Ctrl+alt+space is the class name auto-complete
  96. Ctrl+shift+f7 can highlight the current element's use in the current file
  97. Ctrl+alt+up/ctrl+alt+down can quickly jump to search results
  98. Ctrl+shift+j can integrate two lines
  99. Alt+f8 is the value of the calculated variable

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Android Studio Discovery Trail Series: Android Studio shortcut keys

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.