vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Insert Line Below command shortcut overruled by some Copilot Chat shortcut

Open aryzing opened this issue 9 months ago • 5 comments

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version: 1.97.2
  • OS Version: Ubuntu 24.04

Steps to Reproduce:

  1. Open an editor, type ctrl+enter to instert a line below
  2. Instead, no line is inserted, and Copilot Chat opens

Image

aryzing avatar Mar 05 '25 15:03 aryzing

can you run Developer: Toggle Keyboard Shortcuts Troubleshooting and see which command it's actually running. I assume it's GitHub Copilot: Open Completions Panel, but you mentioned copilot chat, so I'm not sure.

amunger avatar Mar 05 '25 16:03 amunger

Hi, ran into the same issue, this is quite annoying. Here's debug output from my case in case it helps (OS = Windows 11).

The Ctrl+Enter used to trigger the "Insert line below" fine before I activated Copilot. After changing to keybinding to something else for the "GitHub Copilot: Open Completions Panel" entry things are back to normal.

2025-03-07 10:21:47.377 [info] [Window] [KeybindingService]: / Soft dispatching keyboard event 2025-03-07 10:21:47.378 [info] [Window] [KeybindingService]: \ Keyboard event cannot be dispatched 2025-03-07 10:21:47.378 [info] [Window] [KeybindingService]: / Received keydown event - modifiers: [ctrl], code: ControlLeft, keyCode: 17, key: Control 2025-03-07 10:21:47.379 [info] [Window] [KeybindingService]: | Converted keydown event - modifiers: [ctrl], code: ControlLeft, keyCode: 5 ('Ctrl') 2025-03-07 10:21:47.379 [info] [Window] [KeybindingService]: \ Keyboard event cannot be dispatched in keydown phase. 2025-03-07 10:21:47.497 [info] [Window] [KeybindingService]: / Soft dispatching keyboard event 2025-03-07 10:21:47.498 [info] [Window] [KeybindingService]: | Resolving ctrl+Enter 2025-03-07 10:21:47.498 [info] [Window] [KeybindingService]: \ From 30 keybinding entries, matched github.copilot.generate, when: editorTextFocus && github.copilot.activated && !commentEditorFocused, source: user extension GitHub.copilot. 2025-03-07 10:21:47.498 [info] [Window] [KeybindingService]: / Received keydown event - modifiers: [ctrl], code: Enter, keyCode: 13, key: Enter 2025-03-07 10:21:47.499 [info] [Window] [KeybindingService]: | Converted keydown event - modifiers: [ctrl], code: Enter, keyCode: 3 ('Enter') 2025-03-07 10:21:47.499 [info] [Window] [KeybindingService]: | Resolving ctrl+Enter 2025-03-07 10:21:47.499 [info] [Window] [KeybindingService]: \ From 30 keybinding entries, matched github.copilot.generate, when: editorTextFocus && github.copilot.activated && !commentEditorFocused, source: user extension GitHub.copilot. 2025-03-07 10:21:47.499 [info] [Window] [KeybindingService]: + Invoking command github.copilot.generate. 2025-03-07 10:21:47.744 [info] [Window] [KeybindingService]: + Storing single modifier for possible chord ctrl. 2025-03-07 10:21:48.050 [info] [Window] [KeybindingService]: + Clearing single modifier due to 300ms elapsed.

harriha avatar Mar 07 '25 08:03 harriha

@amunger the full logs are somewhat large, I take it these entries are the ones of interest:

2025-03-07 11:07:14.367 [info] [Window] [KeybindingService]: | Resolving ctrl+[Enter]
2025-03-07 11:07:14.367 [info] [Window] [KeybindingService]: \ From 30 keybinding entries, matched github.copilot.generate, when: editorTextFocus && github.copilot.activated && !commentEditorFocused, source: user extension GitHub.copilot.
2025-03-07 11:07:14.367 [info] [Window] [KeybindingService]: + Invoking command github.copilot.generate.
2025-03-07 11:07:16.099 [info] [Window] [KeybindingService]: + Ignoring single modifier ctrl due to it being pressed together with other keys.

I mentioned "chat" as a generic way of referring to the copilot feature that comes up, I didn't pay much attention to it. The title of the panel seems to be "GitHub Copilot Suggestions".

aryzing avatar Mar 07 '25 11:03 aryzing

I removed Open Copilot Panel shortcut, because it conflicts with Inser Line Below

sazarkin avatar Mar 07 '25 14:03 sazarkin

Ok, that makes sense. As mentioned, the easiest solution is to remove that keybinding:

Image

amunger avatar Mar 07 '25 17:03 amunger

the copilot extension has removed that keybinding

amunger avatar May 27 '25 17:05 amunger