Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comment line or various lines using the shortcut in MacOS (CMD+/) #1704

Closed
SergioSuarezDev opened this issue Oct 13, 2021 · 4 comments · Fixed by #1715
Closed

Comment line or various lines using the shortcut in MacOS (CMD+/) #1704

SergioSuarezDev opened this issue Oct 13, 2021 · 4 comments · Fixed by #1715

Comments

@SergioSuarezDev
Copy link

I'm trying to use the shortcut to comment line based in docs:

Captura de pantalla 2021-10-13 a las 21 09 42

But is not working :(

I think it's because on mac the backslash is at number 7 key in the spanish keyboard, and it is also necessary to press shift, but in my case it does not work, someone who can shed more light on this matter?

Captura de pantalla 2021-10-13 a las 21 12 22

@imolorhe
Copy link
Collaborator

I have no idea what the expected key bindings here should be. On my keyboard, it is the key beside the right Shift key which seems to be the "-" key, so maybe you can try that instead?

@SergioSuarezDev
Copy link
Author

SergioSuarezDev commented Oct 14, 2021

Unfortunately it does not work, perhaps in mac would be better to add the command similar to VSCode which would be CMD+ SHIFT+7

In some places they talk about this issue. https://stackoverflow.com/questions/34316156/how-to-comment-multiple-lines-in-visual-studio-code

Sadly, cmd+/ is not a valid shortcut for a German (Mac) keyboard. FWIW: I changed it to { "key": "cmd+shift+7", "command": "editor.action.commentLine", "when": "editorTextFocus" } to match Atom.

Same in IntelliJ IDEA editor:
https://youtrack.jetbrains.com/issue/JBR-216

Perhaps the best option would be to add a way to configure keyboard shortcuts, like other apps. So some European users would not have problems with them

Captura de pantalla 2021-10-14 a las 9 24 43

Captura de pantalla 2021-10-14 a las 9 41 30

@imolorhe
Copy link
Collaborator

With the changes introduced, you would be able to customize the shortcuts in the query editor by specifying the mapping in the editor.shortcuts settings option. e.g. { "Ctrl-7": "toggleComment" }

@SergioSuarezDev
Copy link
Author

brilliant! this is very useful for european users, i'm looking forward to trying it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants