I use PyCharm as Python IDE editor.
When I push default keyboard shortcut ctrl+slash
to comment a line - caret (keyboard cursor) is moved to the next line (if text is not selected).
There is a way to make caret stay on the same line?
In case you always want the action to keep caret on the same line, there's an option in 'Advanced Settings' - 'Move caret down after Comment with Line Comment action'.
https://youtrack.jetbrains.com/issue/IDEA-283756/Line-comment-shortcut-without-jumping-to-new-line