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

User installed extension is logged as "built-in extension" #97906

Closed
Nokel81 opened this issue May 15, 2020 · 8 comments
Closed

User installed extension is logged as "built-in extension" #97906

Nokel81 opened this issue May 15, 2020 · 8 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Milestone

Comments

@Nokel81
Copy link

Nokel81 commented May 15, 2020

  • VSCode Version: 1.45.0
  • OS Version: Darwin 10.15.3

Steps to Reproduce:

  1. Have a file open
  2. Have the Global Find left sidebar open
  3. Have cursor select one of the text boxes in the find sidebar
  4. Press ⌘+J or "join lines" and notice that even though there is no flashing cursor on the main file display, nonetheless, lines are joined.

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

@alexdima alexdima self-assigned this May 15, 2020
@alexdima
Copy link
Member

@Nokel81 This appears to be a problem with your user configured keybindings.json. By default, we do not ship with cmd+j bound to join lines. I am guessing that the problem is a missing context key, e.g.:

{ "key": "cmd+j", "command": "editor.action.joinLines", "when": "textInputFocus" }

Can you please double check your keybindings?

@alexdima alexdima added the info-needed Issue requires more information from poster label Nov 11, 2020
@Nokel81
Copy link
Author

Nokel81 commented Nov 18, 2020

Sorry for the late response. This is the content of my keybindings.json file:

// Place your key bindings in this file to override the defaults
[
]

Screen Shot 2020-11-18 at 8 14 10 AM

This is what I see when I searched for "join" in the keyboard shortcuts UI.

@alexdima
Copy link
Member

@Nokel81 I think this is a keybinding contributed by one of your extensions. Could you please try the following:

  • Run the command Developer: Toggle Keyboard Shortcuts Troubleshooting
    • This will activate logging of dispatched keyboard shortcuts and will open an output panel with the corresponding log file.
  • You can then press cmd+j and check what keyboard shortcut VS Code detects and what command is invoked.

This will output if the keybinding rule is a built-in one or contributed by an extension.

If you are having trouble understanding the output, please feel free to paste here and we can help decipher it for you.

@Nokel81
Copy link
Author

Nokel81 commented Nov 18, 2020

This is the relevant logs:

[2020-11-18 13:59:55.901] [renderer1] [info] [KeybindingService]: / Received  keydown event - modifiers: [meta], code: MetaLeft, keyCode: 91, key: Meta
[2020-11-18 13:59:55.901] [renderer1] [info] [KeybindingService]: | Converted keydown event - modifiers: [meta], code: MetaLeft, keyCode: 57 ('Meta')
[2020-11-18 13:59:55.901] [renderer1] [info] [KeybindingService]: \ Keyboard event cannot be dispatched.
[2020-11-18 13:59:56.168] [renderer1] [info] [KeybindingService]: / Received  keydown event - modifiers: [meta], code: KeyJ, keyCode: 74, key: j
[2020-11-18 13:59:56.168] [renderer1] [info] [KeybindingService]: | Converted keydown event - modifiers: [meta], code: KeyJ, keyCode: 40 ('J')
[2020-11-18 13:59:56.168] [renderer1] [info] [KeybindingService]: | Resolving meta+[KeyJ]
[2020-11-18 13:59:56.168] [renderer1] [info] [KeybindingService]: \ From 2 keybinding entries, matched editor.action.joinLines, when: no when condition, source: built-in extension ms-vscode.atom-keybindings.

Namely, this shows that it is the "built-in extension ms-vscode.atom-keybindings"

@alexdima
Copy link
Member

  • Oh, that's a bug in the debugged output. ms-vscode.atom-keybindings is an extension, but not a built-in extension. The output should read: "source: extension ms-vscode.atom-keybindings". I suggest we use this issue to track this bug.
  • Basically the atom keybindings extension defines cmd+j for join lines, but forgets to define a when clause. Let's track that at Join Lines (cmd+j) should use a "when" clause. vscode-atom-keybindings#70

@alexdima alexdima reopened this Nov 18, 2020
@alexdima alexdima added bug Issue identified by VS Code Team member as probable bug and removed info-needed Issue requires more information from poster labels Nov 18, 2020
@alexdima alexdima changed the title Join line in main window when cursor after in find window User installed extension is logged as "built-in extension" Nov 18, 2020
@alexdima
Copy link
Member

Until microsoft/vscode-atom-keybindings#70 is addressed, you can use the following in your keybindings.json:

{ "key":"cmd+j", "command":"-editor.action.joinLines" }, // remove the keybinding with missing when clause
{ "key":"cmd+j", "command":"editor.action.joinLines", "when": "editorTextFocus && !editorReadonly" },

@Nokel81
Copy link
Author

Nokel81 commented Nov 18, 2020

Thanks for the quick response and will do.

chenjigeng pushed a commit to chenjigeng/vscode that referenced this issue Nov 22, 2020
@rzhao271 rzhao271 added this to the November 2020 milestone Dec 2, 2020
@RMacfarlane RMacfarlane added the verified Verification succeeded label Dec 3, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Jan 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

5 participants
@RMacfarlane @alexdima @rzhao271 @Nokel81 and others