'Shortcut to comment code on codesandbox.io

I'm learning React on codesandbox.io which it's exactly like VSCode, my main code editor currently.

However I'm not able to find the shortcut to comment and uncomment lines of code and this is very frustrating for me.

The keyboard shortcut to comment code in VSCode is CMD + Shift + 7 (in a Spanish keyboard) but it doesn't work in codesandbox.io. I think the shortcut in English keyboards is just CMD + /



Solution 1:[1]

Select the code you want to comment out then press CMD+k then CMD+c.

To remove the comment, press CMD+k then CMD+u.

Solution 2:[2]

Try with Ctrl+Shift+A, it worked for me. I am using Linux - Elementary OS 0.5.

For example:

Solution 3:[3]

I was facing the same problem and for me this works fine.

To comment a line: ctrl+k ctrl+c

To uncomment a line: ctrl+k ctrl+u

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jeremy Caney
Solution 2 TylerH
Solution 3 Jeremy Caney