Comment shortcut Android Studio

I'm searching for useful Android Studio keyboard shortcut for commenting code, as in Sublime Text or Eclipse.

When I press either cmd+/ or cmd+maj+/ nothing happens...


Mac With Numeric pad

Line Comment hold both: Cmd + /

Block Comment hold all three: Cmd + Alt + /

Mac

Line Comment hold both: Cmd + + =

Block Comment hold all three: Cmd + Alt + + =


Windows/linux :

Line Comment hold both: Ctrl + /

Block Comment hold all three: Ctrl + Shift + /

Same way to remove the comment block.


To Provide Method Documentation comment type /** and press Enter just above the method name (

It will create a block comment with parameter list and return type like this

/**
 * @param userId 
 * @return
 */
public int getSubPlayerCountForUser(String userId){}

In spanish keyboard without changing anything I can make a comment with the keys:

cmd + -

OR

cmd + alt + -

This works because in english keyboard / is located at the same place than - on a spanish keyboard


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