I\'m searching for useful Android Studio keyboard shortcut for commenting code, as in Sublime Text or Eclipse.
When I press either cmd+/ or
Be sure you use the slash (/) on right side of keyboard.
For Line Comment:
Ctrl + /
For Block Comment:
Ctrl + Shift + /
You can see all keymap in Android Studio: Help ➤ Default Keymap Reference
for German Layout (Deutsches Layout) the default is:
for line Comment: strg + Numpad(/)
for block Comment: strg+shift+Numpad(/)
Mac:
To comment/uncomment one line, use: Ctrl + /.
To comment/uncomment a block, use: Ctrl + Shift + /.
On Mac and Turkish Keyboard it is (both for commenting out and uncommenting)
line comment: cmd +.
block comment: cmd+alt +.
In the Icelandic MAC keyboard: CMD + -
An Example for a Mac OS X 10.5+ with a German layout keyboard without NumPads:
This way you can be sure that those keys are not mapped (except if you assigned them before to another function)