Insert Line Below command shortcut overruled by some Copilot Chat shortcut
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:
- Open an editor, type ctrl+enter to instert a line below
- Instead, no line is inserted, and Copilot Chat opens
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.
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.
@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".
I removed Open Copilot Panel shortcut, because it conflicts with Inser Line Below
Ok, that makes sense. As mentioned, the easiest solution is to remove that keybinding:
the copilot extension has removed that keybinding