Keyboard shortcuts conflict with VS Code shortcuts
rdebeasi opened this issue · comments
Initial checklist
- I read the support docs
- I read the contributing guide
- I agree to follow the code of conduct
- I searched issues and couldn’t find anything (or linked relevant results below)
Affected packages and versions
MDX for Visual Studio Code v1.8.2
Steps to reproduce
- Open Visual Studio Code.
- Confirm that MDX for Visual Studio Code is installed.
- Open a Markdown file.
- Press Cmd+B (or ctrl+B).
More info on this keyboard shortcut:
- MDX shortcut: #353
- VS Code shortcut https://code.visualstudio.com/docs/getstarted/userinterface#_basic-layout
Expected behavior
Sidebar toggles.
Actual behavior
Sidebar does not toggle.
To confirm that the MDX plugin's keyboard shortcut is taking precedence:
- Press Cmd+P (or Control+P) and choose "Preferences: Open Keyboard Shortcuts"
- In the "type to search" field, type "Cmd+B" (or "ctrl+B").
- Note that MDX "toggle strong" keyboard shortcut has taken precedence over VS Code's "Toggle Primary Side Bar Visibility" keyboard shortcut.
Would it be possible to choose a default shortcut that does not overlap with existing VS Code shortcuts? Thank you!
OS
macOS
Build and bundle tools
Other (please specify in steps to reproduce)
Welcome @rdebeasi! 👋
A counter point. Markdown is a document language.
Pretty much every document editor uses ctrl + b
for bold/strong text.
- Word (https://support.microsoft.com/en-us/office/keyboard-shortcuts-in-word-95ef89dd-7142-4b50-afb2-f762f663ceb2)
- Google docs (https://support.google.com/docs/answer/179738?hl=en&co=GENIE.Platform%3DDesktop)
- Gutenberg/Wordpress (https://www.zettahost.com/wordpress-tutorials/gutenberg-keyboard-shortcuts/)
- And many more
As a default, ctrl + b
for bold feels reasonable, it's what every other editor does, choosing something different would be unexpected to most users.
Though you are welcome to re-bind on your personal editor it if you feel that fast access to the sidebar is more of a priority to your document editing experience.
The rationale is indeed as @ChristianMurphy describes. Also Markdown All in One has the same behaviour.
I do understand your point, but I don’t think it’s generally better to use a different default shortcut. If you want to use Ctrl + B for toggling the side bar, you can use a custom key mapping.
I do notice just now that the toggle commands are broken, which I will look into.
Makes sense - thanks for explaining the thinking there! I'll go ahead and close this issue.
Hi! This was closed. Team: If this was fixed, please add phase/solved
. Otherwise, please add one of the no/*
labels.
Hi team! Could you describe why this has been marked as wontfix?
Thanks,
— bb