question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

editor.action.commentLine key binding not working on Macos

See original GitHub issue

Summary

Currently it appears that one of our default keybindings is colliding with the commentLine command in fresh mac os installs. We should be able to just simply choose a new keybinding for this but I am not 100% sure which one too choose 🤔 .

Work

  • Use a different default keybinding for mac users
  • Decide on new keybinding by reviewing existing vscode defaults

Dev Triage

https://github.com/ryanluker/vscode-coverage-gutters/blob/master/package.json#L192-L195 https://code.visualstudio.com/docs/getstarted/keybindings#_detecting-keybinding-conflicts


Original Ticket

Describe the bug Key binding for command editor.action.commentLine doesn’t work anymore on MacOS.

To Reproduce Steps to reproduce the behavior:

  1. Install the extension.
  2. Try to use editor.action.commentLine command with default key binding command + shift + 7 on a selected portion of code.
  3. command is not triggered.

Expected behaviour The command should be triggered and the selected code should be commented.

Desktop (please complete the following information):

  • OS: macos
  • Extension; Version v2.7.4
  • VSCode Versio:n 1.56.2 (Universal)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ryanlukercommented, Jun 20, 2021

@massicer Thanks for getting back to me with the solution to the mystery hah. Happy coding 😁 .

0reactions
massicercommented, Jun 19, 2021

@ryanluker yes, I also checked my custom keybindings using the tip reported here: https://code.visualstudio.com/docs/getstarted/keybindings#_viewing-modified-keybindings

But I also figured out this issue was caused by my keyboard layout (ITALIAN) since when I set it to USA everything worked well and additionally the keybinding for the command with id editor.action.commentLine changed from cmd+shift+7 to cmd+/.

I suppose this happens since in my layout in order to produce / you have to type shift+7.

I will solve my issue by changing the default keybinding for coverage-gutters.displayCoverage.

Thanks anyway for your support 😊

Read more comments on GitHub >

github_iconTop Results From Across the Web

Keybinding Issues · microsoft/vscode Wiki - GitHub
This page documents workarounds for known issues related to VS Code keybindings and explains how VS Code handles keybindings and why it does ......
Read more >
Visual Studio Code Key Bindings
Here you will find the complete list of key bindings for Visual Studio Code and how to change them.
Read more >
Key Bindings for Visual Studio Code - vscode-docs
Note: If you visit this page on a Mac, you will see the key bindings for the Mac. ... commentLine), Toggle Line Comment,...
Read more >
Is there a way to add a keybinding shortcut that doesn't conflict ...
I'm trying to add a keyword shortcut that will close all the editors on the right side from the selected one. Somehow this...
Read more >
Keyboard shortcuts in Terminal on Mac - Apple Support
Work with Terminal windows and tabs · New window. Command-N ; Edit a command line · Reposition the insertion point. Press and hold...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found