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

Ctrl+Enter doesn't add comment #5914

Closed
johnknoop opened this issue Apr 9, 2024 · 6 comments
Closed

Ctrl+Enter doesn't add comment #5914

johnknoop opened this issue Apr 9, 2024 · 6 comments

Comments

@johnknoop
Copy link

  • Extension version: 0.82.1
  • VsCode:
    Version: 1.87.2 (system setup)
    Commit: 863d2581ecda6849923a2118d93a088b0745d9d6
    Date: 2024-03-08T15:20:17.278Z
    Electron: 27.3.2
    ElectronBuildId: 26836302
    Chromium: 118.0.5993.159
    Node.js: 18.17.1
    V8: 11.8.172.18-electron.0
    OS: Windows_NT x64 10.0.22631

Steps to Reproduce:

  1. Enter some text into the Reply textbox of a comment
  2. Hit ctrl+enter

Expected result:
The reply would be saved

Observed result:
Nothing happens

53414686-1de8-420b-b36c-b91dc3755ea3

@alexr00
Copy link
Member

alexr00 commented May 2, 2024

I'm not able to reproduce this. Do you have another extension installed that's taking that keybinding. You can check by running the command "Developer: Toggle Keyboard Shortcuts Troubleshooting" and looking at the logs that are shown.

@alexr00 alexr00 closed this as completed May 2, 2024
@johnknoop
Copy link
Author

I found that the extension GitHub Copilot has added this keyboard shortcut, which was being invoked:

{
  "key": "ctrl+enter",
  "command": "github.copilot.generate",
  "when": "editorTextFocus && github.copilot.activated && !inInteractiveInput && !interactiveEditorFocused"
}

However, I don't understand why the editorTextFocus predicate would be satisfied when it's the comment textbox that has focus. But that would be a VS Code bug, not a bug in your extension so let's not re-open this issue.

@alexr00
Copy link
Member

alexr00 commented May 7, 2024

The input where you enter your comment counts as editorTextFocus. Let me see if I can get the Copilot folks to add !commentEditorFocused to their keybinding.

@johnknoop
Copy link
Author

Should it really count as an editor though? Isn't that the problem?

@alexr00
Copy link
Member

alexr00 commented May 7, 2024

Yes, it is a code editor. This is how we get nice things like markdown syntax highlighting pasting markdown links in the comment widget input.

@alexr00
Copy link
Member

alexr00 commented May 8, 2024

Copilot folks have fixed the issue and it should be in one of their upcoming releases.

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

No branches or pull requests

2 participants