Shortcut for commenting is folding the code instead of commenting
Answered
I'm using IDEA 2017.1.1, Fedora 25, Gnome. I'm using default key map settings. But when I press shortcut for commenting (Ctrl + /) - it doesn't comment the code. It folds the block of code instead. Checked the key map settings - Ctrl + . is used for folding and Ctrl + / for commenting.
How can I fix it to have default shortcut for commenting?
Below are the screenshots with the settings.


Please sign in to leave a comment.
Try to remap the actions to different shortcuts, see how IDE recognizes the keys you press.
Hi Serge,
So I tried to reassign the comment shortcut to Ctrl+Alt+Shift+/, but IDEA recognised the / key as a period:
Is it related to IDEA or to OS?
It depends on the OS and JDK version used to run IntelliJ IDEA.
See https://youtrack.jetbrains.com/issue/IDEA-165950 for details.
Didn't quite understand the discussion in that thread. Is it an open issue in the current stable build of IDEA?
See if https://youtrack.jetbrains.com/issue/JRE-215#comment=27-1954691 works for you. Make sure to run under JetBrains Runtime: https://intellij-support.jetbrains.com/hc/articles/206544879.
it looks like problem is back. Probably starting with jidea 2023.1, however still present in IntelliJ IDEA 2023.2.2 (Ultimate Edition)
Had the same problem on PHPStorm 2023.3.3. Enabling the “Use national layout for shortcuts” fixed it.
This issue came up using the following configuration:
Toggling “Use national layouts for shortcuts” to checked fixed the issue.