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

Keybindings not working #396

Closed
DarkCreekWay opened this issue Mar 13, 2019 · 6 comments
Closed

Keybindings not working #396

DarkCreekWay opened this issue Mar 13, 2019 · 6 comments
Labels
Area: Input Related to editor input processing (key presses, key bindings). Res: External Outside of our control/codebase. Upstream Pertaining to an upstream component, or blocked by an upstream issue.

Comments

@DarkCreekWay
Copy link

DarkCreekWay commented Mar 13, 2019

What is the problem?

keybindings do not work at all.

How can I reproduce it?

Try Ctrl+B on Windows with

VSCode V1.32.1
Extension 2.2.1

I suspected an issue with the When Clause for the KeyBinding of

markdown.editing.toggleBold

changed the when clause

Before:
editorTextFocus && !editorReadonly && editorLangId == 'markdown'

After:
editorTextFocus && !editorReadOnly && editorLangId == 'markdown'

notice Casing change of parameter editorReadonly vs. editorReadOnly

After editing the clause, the key binding worked as expected.

Seems, package.json needs to be fixed.

@yzhang-gh
Copy link
Owner

Thanks for the report. It is a good catch, although editorReadonly should also work. The default key bindings also use it pretty often.

vscode keybindings

Maybe there is another reason causing this problem?

@DarkCreekWay
Copy link
Author

I tested further and found the root cause. The Visual Studio Keymap Extension interfers with the keybindings of this extension. As soon, as the other extension is deactivated, keybindings work as expected.

Editing the when clause changes the key binding from "Standard" to "User". Seems, VS Code evaluates the user defined binding first. This led me on the wrong track.

Having both extensions side by side would be great, but I am not sure, if this is feasible.

@yzhang-gh
Copy link
Owner

That makes sense then.

I am wondering what is the functionality of ctrl+b in that extension. If it is not applicable for Markdown, we can open an issue there to exclude Markdown documents.
Besides that, overriding it with a user-level key binding is always a simple solution.

@DarkCreekWay
Copy link
Author

Is there a way to control priorities of key bindings ?

I think about a prioritized approach like

Prio - Area
0 - VS Code
1 - Keymap Extension
2 - Filetype Extension
3 - User Defined

Even if this is possible, it would be cumbersome to sync with other extension author's in order to avoid conflicts.

@yzhang-gh
Copy link
Owner

As far as I know, we can't. Maybe we should open an issue in the vscode repository. But I don't think there is a good solution...

@DarkCreekWay
Copy link
Author

I browsed the vscode issues. There are a lot of issues regarding keybindings.
This issue Feature Request: Keybinding Overloading made it to the Backlog and looks promising.

So, as we can't do much here, I close the issue.

Keep up the good work!

@Lemmingh Lemmingh added Area: Input Related to editor input processing (key presses, key bindings). Res: External Outside of our control/codebase. Upstream Pertaining to an upstream component, or blocked by an upstream issue. labels Aug 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Input Related to editor input processing (key presses, key bindings). Res: External Outside of our control/codebase. Upstream Pertaining to an upstream component, or blocked by an upstream issue.
Projects
None yet
Development

No branches or pull requests

3 participants